Code

Some style fixes.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 26 Mar 2007 12:19:19 +0000 (12:19 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 26 Mar 2007 12:19:19 +0000 (12:19 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5886 594d385d-05f5-0310-b6e9-bd551577e9d8

include/sieve/class_My_Tree.inc
include/sieve/templates/block_indent_start.tpl
include/sieve/templates/block_indent_stop.tpl
include/sieve/templates/element_else.tpl
include/sieve/templates/element_elsif.tpl
include/sieve/templates/object_container_clear.tpl

index eec29858a5dc324ed794c5adceead5466973fbd7..38d252302e4085fb0cf8824305a85bc4ecd56a09 100644 (file)
@@ -66,16 +66,16 @@ class My_Tree extends Tree
     }
     foreach($this->pap as $key => $object){
       if(is_object($object)){
-        $end = $this->get_block_end($key);
+        $end = $this->get_block_end($key,false);
 
-        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;
         }
+        $this->dump_ .= preg_replace("/>/",">\n",$object->execute()); 
+        if($end != $key && in_array(get_class($object),array("sieve_if","sieve_else","sieve_elsif"))) {
+          $ends[$end] = $end;  
+          $this->dump_  .= $block_indent_start;
+        }
       }
     }
     
@@ -380,7 +380,7 @@ class My_Tree extends Tree
   /* This function returns the id of the element 
    *  where the current block ends  
    */
-  function get_block_end($start)
+  function get_block_end($start,$complete = TRUE)
   {
     /* Only execute if this is a really a block element. 
      * Block elements is only sieve_if
@@ -403,12 +403,22 @@ class My_Tree extends Tree
           $block_depth --;
         }
 
-        if( $block_depth == 0 && 
-            $class == "sieve_block_end" && 
-            !in_array($next_class,array("sieve_else","sieve_elsif"))){
-          $end = TRUE;
-          $start --;
+        if($complete){
+          if( $block_depth == 0 && 
+              $class == "sieve_block_end" && 
+              !in_array($next_class,array("sieve_else","sieve_elsif"))){
+            $end = TRUE;
+            $start --;
+          }
+        }else{
+
+          if( $block_depth == 0 && 
+              $class == "sieve_block_end" ){ 
+            $end = TRUE;
+            $start --;
+          }
         }
+
         $start ++;       
         $class      = get_class($this->pap[$start]);
         
index 017a104c0bf79353ee6f14e46cd336483822dec6..016943a057b9b10c3a233bdb1ce23706df66e266 100644 (file)
@@ -1,13 +1,6 @@
-<table style='width:100%; padding:4px;'>
+<table style='width:100%; padding:0px;' cellspacing=0 cellpadding=0>
        <tr>
-               <td>
+               <td style='padding-left:10px;'>
                        <table cellspacing=0 cellpadding=0 style="width:100%">
                                <tr>
-                                       <td style='height:4px; background-color: #999999;'>
-                                       </td>
-                                       <td style='height:4px; background-color: #999999; border-bottom: 1px solid #EEEEEE'>
-                                       </td>
-                               </tr>
-                               <tr>
-                                       <td style='width:4px; background-color: #999999; border-right: 1px solid #EEEEEE'>
                                        <td>
index 470449e21ee9ca9a52425ed97a50d87a392e46a6..62ee76e63ddea99742ebb30d2658f8ed6bb928b8 100644 (file)
@@ -1,11 +1,5 @@
                                        </td>
                                </tr>
-                               <tr>
-                                       <td style='height:4px; background-color: #999999;'>
-                                       </td>
-                                       <td style='height:4px; background-color: #999999; border-top: 1px solid #EEEEEE'>
-                                       </td>
-                               </tr>
                        </table>
                </td>
        </tr>
index 5c420914f999fdcb0796ba5b3102579a61c481d3..739fd05504feac9087f35dce086493b3aa187aa2 100644 (file)
@@ -1,6 +1,6 @@
-<table cellspacing=0 width='100%'>
+<table class='sieve_default_table'>
        <tr>
-       <td style='width:100%;background-color:#f2bf4c; padding:5px;'>
+               <td>
                        <b>{t}Else{/t}</b>
        </td>
        </tr>
index 9c41e304a0778b1c758629197abf8167cccae951..4da7c47fc43354727fc6394f1dd2a694fd0b7be1 100644 (file)
@@ -1,6 +1,6 @@
-<table cellspacing=0 width='100%'>
+<table class='sieve_default_table'>
        <tr>
-       <td style='width:100%;background-color:#f2bf4c; padding:5px;'>
+               <td>
                        <b>{t}Else If{/t}</b>
                        {$Contents}
        </td>
index 24d66fd94055ca633029f3431cbfbeb9b5187092..d96a2ab6fdebe9b299c409fcd86ebf84a83e836b 100644 (file)
@@ -1,12 +1,9 @@
-<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;'>
-
-
-
+<table class='object_container_container'> 
+       <tr>
+               <td class='object_container_cell_top_left'>
+                       &nbsp;  
+               </td>
+               <td class='object_container_cell_top_right'>
             <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}
@@ -19,7 +16,7 @@
                </td>
     </tr>
     <tr>
-        <td style='width:5px; background-color: #CCCCCC; text-align:center; border-right: solid 1px #AAAAAA;'>
+               <td class='object_container_cell_bottom_left'>
         </td>
         <td>
             %%OBJECT_CONTENT%%