Move edit box left to the table
authorJoey Schulze <joey@infodrom.org>
Fri, 26 Feb 2010 10:31:05 +0000 (11:31 +0100)
committerJoey Schulze <joey@infodrom.org>
Fri, 26 Feb 2010 10:31:05 +0000 (11:31 +0100)
lib/mask.php
style.css
stylesheet.css

index 65ee93a..403e9b0 100644 (file)
@@ -14,7 +14,7 @@ function build_form($name, $fields)
 {
   $ret = array();
 
-  $ret[] = '<div class="form" style="clear: both;">';
+  $ret[] = '<div class="form">';
   $ret[] = '<form id="form_edit">';
 
   $ret[] = '<input type="hidden" id="edit_id" name="id" value="">';
@@ -150,6 +150,11 @@ function build_mask($name, $mask)
   else
     $details = array();
 
+  if (array_key_exists('edit', $mask))
+    $edit = build_form($name, $mask['edit']);
+  else
+    $edit = array();
+
   $title = $mask['title'];
   if (array_key_exists('subtitle', $mask))
     $title .= ' &ndash; ' . $mask['subtitle'];
@@ -161,8 +166,9 @@ function build_mask($name, $mask)
   return array_merge($head,
                     $grid,
                     array('</div>','<div class="left">'),
-                    $status,
                     $details,
+                    $edit,
+                    $status,
                     array('</div>'));
 }
 
@@ -182,9 +188,7 @@ function mask($name)
   if (array_key_exists('table',$mask) && array_key_exists('list',$mask))
     $ret = build_mask($name, $mask);
 
-  if (array_key_exists('edit', $mask))
-    $ret = array_merge($ret, build_form($name, $mask['edit']));
-
+  error_log(count($ret));
   return implode("\n", $ret);
 }
 
index 05ceee3..579cc72 100644 (file)
--- a/style.css
+++ b/style.css
@@ -53,7 +53,7 @@ div#header h1 {
 div.right {
        float: right;
        width: 76%;
-       padding: 1em;
+       padding: 0;
        padding-top: 0px;
        margin-bottom: 1.2em;
        text-align: justify;
@@ -61,8 +61,9 @@ div.right {
 
 div.left {
        float: left;
-       width: 20%;
-       margin: 0 0 10px 0;
+       width: 23%;
+       margin: 0;
+       padding: 0;
 }
 
 div.left .box {
index c6cfacc..65da7b7 100644 (file)
@@ -17,7 +17,7 @@ div.ricoLG_cell {
 }
 
 div.form {
-    margin-top: 10px;
+    margin-top: 0px;
     padding: 2px;
     background-color: #DDD;
     border: 1px solid #AAA;