Simplify how frames are accessed
authorpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 29 Aug 2007 07:15:40 +0000 (07:15 +0000)
committerpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 29 Aug 2007 07:15:40 +0000 (07:15 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@12623 7612ce4b-ef26-0410-bec9-ea0150e637f0

templates/default_advanced/page_header.tpl

index d85ef9b9c7bf81bb83fb370b11f45d4c2892f9cd..aeec33a0bd8a387bf55be5a70a2eb6df7a36da71 100644 (file)
@@ -170,14 +170,7 @@ $help_link         = makeInternalLink ('src/help.php', $help_str);
    }
    if (first_frame != 0)
    {
-      if (document.all)
-      {
-         parent.document.all["fs2"].<?php echo $orientation; ?> = first_frame + ", " + second_frame;
-      }
-      else if (this.document.getElementById)
-      {
-         parent.document.getElementById("fs2").<?php echo $orientation; ?> = first_frame + ", " + second_frame;
-      }
+      parent.fs2.<?php echo $orientation; ?> = first_frame + ", " + second_frame;
    }
 <?php 
 
@@ -193,29 +186,14 @@ $help_link                = makeInternalLink ('src/help.php', $help_str);
 ?>
    if (self.name == 'right')
    {
-      if (document.all)
-      {
-         parent.document.all["fs2"].<?php echo $orientation; ?> = "*, " + <?php echo $new_size; ?>;
-      }
-      else if (this.document.getElementById)
-      {
-         parent.document.getElementById("fs2").<?php echo $orientation; ?> = "*, " + <?php echo $new_size; ?>;
-      }
+      parent.fs2.<?php echo $orientation; ?> = "*, " + <?php echo $new_size; ?>;
    }
 
    // restores the preview pane if it sucked up the whole page for composing a message
    else if (self.name == 'bottom')
    {
-      if (document.all)
-      {
-         if (parent.document.all["fs2"].<?php echo $orientation; ?> == "*, 100%")
-            parent.document.all["fs2"].<?php echo $orientation; ?> = "*, " + <?php echo $previewPane_size; ?>;
-      }
-      else if (this.document.getElementById)
-      {
-         if (parent.document.getElementById("fs2").<?php echo $orientation; ?> == "*, 100%")
-            parent.document.getElementById("fs2").<?php echo $orientation; ?> = "*, " + <?php echo $previewPane_size; ?>;
-      }
+      if (parent.fs2.<?php echo $orientation; ?> == "*, 100%")
+         parent.fs2.<?php echo $orientation; ?> = "*, " + <?php echo $previewPane_size; ?>;
    }
 <?php } } ?>
 // -->