Code

Some design changes
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 20 Mar 2007 10:07:24 +0000 (10:07 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 20 Mar 2007 10:07:24 +0000 (10:07 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5835 594d385d-05f5-0310-b6e9-bd551577e9d8

include/sieve/class_My_Tree.inc
include/sieve/class_sieveElement_If.inc
include/sieve/templates/edit_frame_base.tpl
include/sieve/templates/element_block_end.tpl
include/sieve/templates/element_block_start.tpl
include/sieve/templates/object_container.tpl
include/sieve/templates/object_container_clear.tpl

index 366f4cea8dbf6a65eb755be6c1d49824d68e2431..8525ee32dd5356ae531927789cf301a6b6754549 100644 (file)
@@ -47,10 +47,25 @@ class My_Tree extends Tree
     /* Create html results */
     $smarty = get_smarty();
 
+    $block_indent_start = $smarty->fetch(get_template_path("templates/block_indent_start.tpl",TRUE,dirname(__FILE__)));
+    $block_indent_stop  = $smarty->fetch(get_template_path("templates/block_indent_stop.tpl",TRUE,dirname(__FILE__))); 
+  
+  
+
     $this -> dump_ = "";
+    $ends = array();
     foreach($this->pap as $key => $object){
       if(is_object($object)){
+        $end = $this->get_block_end($key);
+
+        if($end != $key && get_class($object) == "sieve_if") {
+          $ends[$end] = $end;  
+          $this->dump_  .= $block_indent_start;
+        }
         $this->dump_ .= preg_replace("/>/",">\n",$object->execute()); 
+        if(isset($ends[$key])){
+          $this->dump_  .= $block_indent_stop;
+        }
       }
     }
     
index d20f30abf7c699d1b0efc8c46f1ce8545d4028c1..8431dce457c2b524e2e32c662d9ff230831dbf28 100644 (file)
@@ -1132,13 +1132,7 @@ class sieve_if
         } 
         default : 
         {
-          $ret = "<table width='100%'  cellspacing=0 cellpadding=0>
-                    <tr>
-                      <td style='background-color: #FEDCA9 ; border: solid 1px        #EEEEEE'>";
-          $ret.= $key."<br>"; 
-          $ret.= "    </td>
-                    </tr>
-                  </table>";
+          trigger_error(_("Unhandled switch type"));
         }
       }
     }
index 84d2bd62284210803f02a62742d40d22fe518a4b..67c47b4af2255d03ffe0659e593f21c30499676b 100644 (file)
@@ -1,7 +1,7 @@
 
 <table style='width:100%;' cellspacing=0 cellpadding=0>
        <tr>
-               <td style='background-color: #CCCCCC; padding:5px;'>
+               <td style='background-color: #DDDDDD; padding:5px;'>
                        
                        <input type='submit' name='Save_Copy' value="{t}Export{/t}">
                        <input type='submit' name='Import_Script' value="{t}Import{/t}">
index b5af6fbdeb0bec1e4e0acc4f3b7ced293fd5d714..41c3a2c0b8e205df1f3d277c4d0db6b3cb50d08d 100644 (file)
@@ -1,3 +1,5 @@
+<!--
            </td>
     </tr>
 </table>
+-->
index 24cd1b3a539e2393f8deb28abec5a3cff089c24f..52616245391ae25580b2dde044f09d94324dc829 100644 (file)
@@ -1,4 +1,4 @@
-
+<!--
 <table cellspacing=0 style='width:100%;border: solid 1px #BBB;346575;'>
        <tr>
        <td style='width:20px; text-align:center;vertical-align:top; color: #FFFFFF; background-color:#BBBBBB;' >
@@ -9,3 +9,4 @@
         <td style=' background-color:#BBBBBB;
                     border: solid 0px #DDDDDD;
                   '>
+-->
index 9c46115327934bb216a47f18cbc586c323d47bc6..2cb8227851cf5a94b7ecc2c55c98db0d066f5869 100644 (file)
@@ -1,23 +1,29 @@
-<table cellspacing=0 style='width:100%;background-color:#EEEEEE;border: solid 1px #BBB;346575;'>
+<table cellspacing=0 style='width:100%;background-color:#EEEEEE;border: solid 1px #AAAAAA;'>
        <tr>
-               <td  style='background-color: #235464; text-align:center;'>
+               <td  style='background-color: #CCCCCC; text-align:center; '>
                        &nbsp;  
                </td>
-               <td  style='background-color: #235464; text-align:left; padding:2px;' >
+               <td  style='background-color: #CCCCCC; text-align:left; padding:2px;  border-bottom: solid 1px #AAAAAA;'>
+
+                       <input type='image' src='images/sieve_move_object_down.png' name='Move_Down_Object_{$ID}' 
+                               title='{t}Move this object one position down{/t}' alt='{t}Down{/t}' class='center'>
+                       {t}Move down{/t}
+                       <input type='image' src='images/sieve_move_object_up.png' name='Move_Up_Object_{$ID}' 
+                               title='{t}Move this object one position up{/t}' alt='{t}Up{/t}' class='center'>
+                       {t}Move up{/t}
                        <input type='image' src='images/sieve_del_object.png' name='Remove_Object_{$ID}' 
                                title='{t}Remove this object{/t}' alt='R' class='center'>
+                       {t}Remove this element{/t}
                        <input type='image' src='images/sieve_add_new_top.png' name='Add_Object_Top_{$ID}'
                                alt='{t}Add new{/t}' title='{t}Add a new new object on top of this one.{/t}' class='center'>
+                       {t}Add a new element above{/t}
                        <input type='image' src='images/sieve_add_new_bottom.png' name='Add_Object_Bottom_{$ID}'
                                alt='{t}Add new{/t}' title='{t}Add a new new object at the bottom of this one.{/t}' class='center'>     
+                       {t}Add a new element below{/t}
                </td>
        </tr>
        <tr>
-               <td style='width:20px; background-color: #235464; text-align:center;'>  
-                       <input type='image' src='images/sieve_move_object_up.png' name='Move_Up_Object_{$ID}' 
-                               title='{t}Move this object one position up{/t}' alt='{t}Up{/t}'>
-                       <input type='image' src='images/sieve_move_object_down.png' name='Move_Down_Object_{$ID}' 
-                               title='{t}Move this object one position down{/t}' alt='{t}Down{/t}'>
+               <td style='width:5px; background-color: #CCCCCC; text-align:center; border-right: solid 1px #AAAAAA;'>  
                </td>
                <td>
                        %%OBJECT_CONTENT%%
index 852b274b512117545743efd5fee57e4eed47665b..24d66fd94055ca633029f3431cbfbeb9b5187092 100644 (file)
@@ -1,30 +1,28 @@
-<table width="100%" cellpadding=0 cellspacing=0 style='border: solid 1px #BBB;'>
-       <tr>
-               <td style='width:22px; background-color: #BBBBBB;'>
+<table cellspacing=0 style='width:100%;background-color:#EEEEEE;border: solid 1px #AAAAAA;'>
+    <tr>
+        <td  style='background-color: #CCCCCC; text-align:center; '>
+            &nbsp;
+        </td>
+        <td  style='background-color: #CCCCCC; text-align:left; padding:2px;  border-bottom: solid 1px #AAAAAA;'>
+
+
+
+            <input type='image' src='images/sieve_move_object_down.png' name='Move_Down_Object_{$ID}'
+                title='{t}Move this object one position down{/t}' alt='{t}Down{/t}' class='center'>
+            {t}Move down{/t}
+            <input type='image' src='images/sieve_move_object_up.png' name='Move_Up_Object_{$ID}'
+                title='{t}Move this object one position up{/t}' alt='{t}Up{/t}' class='center'>
+            {t}Move up{/t}
+            <input type='image' src='images/sieve_del_object.png' name='Remove_Object_{$ID}'
+                title='{t}Remove this object{/t}' alt='R' class='center'>
+            {t}Remove this element{/t}
                </td>
-               <td>
-                       <table cellspacing=0 style='width:100%;background-color:#EEEEEE;'>
-                               <tr>
-                                       <td  style='background-color: #235464; text-align:center;'>
-                                               &nbsp;  
-                                       </td>
-                                       <td  style='background-color: #235464; text-align:left; padding:2px;' >
-                                               <input type='image' src='images/sieve_add_new_top.png' name='Add_Object_Top_{$ID}'
-                                                       alt='{t}Add new{/t}' title='{t}Add a new new object on top of this one.{/t}' class='center'>&nbsp;      
-                                               <input type='image' src='images/sieve_add_new_bottom.png' name='Add_Object_Bottom_{$ID}'
-                                                       alt='{t}Add new{/t}' title='{t}Add a new new object at the bottom of this one.{/t}' class='center'>     
-                                       </td>
-                               </tr>
-                               <tr>
-                                       <td style='width:20px; background-color: #235464;'>     
-                                               <input type='image' src='images/sieve_del_object.png' name='Remove_Object_{$ID}' 
-                                                       title='{t}Remove this object{/t}' alt='R'>
-                                       </td>
-                                       <td>
-                                               %%OBJECT_CONTENT%%
-                                       </td>
-                               </tr>
-                       </table>
-               </td>
-       </tr>
+    </tr>
+    <tr>
+        <td style='width:5px; background-color: #CCCCCC; text-align:center; border-right: solid 1px #AAAAAA;'>
+        </td>
+        <td>
+            %%OBJECT_CONTENT%%
+        </td>
+    </tr>
 </table>