fix strict js/css notices (#1778815)
authorkink <kink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 4 Sep 2007 09:33:10 +0000 (09:33 +0000)
committerkink <kink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 4 Sep 2007 09:33:10 +0000 (09:33 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@12671 7612ce4b-ef26-0410-bec9-ea0150e637f0

plugins/message_details/message_details_bottom.php
plugins/newmail/functions.php
src/login.php
templates/default/js/default.js
templates/default/read_toolbar.tpl

index 2a2a87c391a9cdf565c4ee368e70122a0fb54be6..e4bb3971ea87ddbaf65d6eab7efdb584b238f339 100644 (file)
@@ -287,7 +287,6 @@ function get_message_details($mailbox, $passed_id, $stripHTML=FALSE) {
 $xtra = <<<ECHO
 
 <style type="text/css">
 $xtra = <<<ECHO
 
 <style type="text/css">
-
 <!--
 .ent_body {
   display:inline;
 <!--
 .ent_body {
   display:inline;
@@ -301,8 +300,7 @@ $xtra = <<<ECHO
   display:inline;
   width:99%;
 }
   display:inline;
   width:99%;
 }
-//-->
-
+-->
 </style>
 
 ECHO;
 </style>
 
 ECHO;
index 0dd0e62c3f1149d4bcd8bd2a15ca87e5190a39d2..23f0cab858ceb48525804e69813d66741019f723 100644 (file)
@@ -234,7 +234,8 @@ function newmail_plugin_function() {
 
         if ($newmail_changetitle) {
             echo "<script type=\"text/javascript\">\n" .
 
         if ($newmail_changetitle) {
             echo "<script type=\"text/javascript\">\n" .
-                "function ChangeTitleLoad() {\n";
+                "function ChangeTitleLoad() {\n" .
+                "var BeforeChangeTitle;\n";
             echo 'window.parent.document.title = "' .
                 sprintf(ngettext("%s New Message","%s New Messages",$totalNew), $totalNew) .
                 "\";\n";
             echo 'window.parent.document.title = "' .
                 sprintf(ngettext("%s New Message","%s New Messages",$totalNew), $totalNew) .
                 "\";\n";
index 8888865b0016e050e8838cb3e5b97c4eca1a8d1f..49251d7ed022cc62c5ea67dcd0750952b5e80475 100644 (file)
@@ -68,7 +68,7 @@ $loginname_value = (sqGetGlobalVar('loginname', $loginname) ? htmlspecialchars($
 $header = "<script type=\"text/javascript\">\n" .
           "<!--\n".
           "  function squirrelmail_loginpage_onload() {\n".
 $header = "<script type=\"text/javascript\">\n" .
           "<!--\n".
           "  function squirrelmail_loginpage_onload() {\n".
-          "    var textElements = 0;\n".
+          "    var textElements = 0; var i = 0;\n".
           "    for (i = 0; i < document.forms[0].elements.length; i++) {\n".
           "      if (document.forms[0].elements[i].type == \"text\" || document.forms[0].elements[i].type == \"password\") {\n".
           "        textElements++;\n".
           "    for (i = 0; i < document.forms[0].elements.length; i++) {\n".
           "      if (document.forms[0].elements[i].type == \"text\" || document.forms[0].elements[i].type == \"password\") {\n".
           "        textElements++;\n".
index c7cbab66e65cc99b2404d9610ae61586e2a8717c..2c9af1d2676d6901ff9eafe7bb5c361f8cbfeeed 100644 (file)
@@ -15,7 +15,7 @@ var orig_row_colors = new Array();
  * @param   string   the name of the checkbox that should be (un)checked
  */
 function row_click(chkboxName) {
  * @param   string   the name of the checkbox that should be (un)checked
  */
 function row_click(chkboxName) {
-    chkbox = document.getElementById(chkboxName);
+    var chkbox = document.getElementById(chkboxName);
     if (chkbox) {
         // initialize orig_row_color if not defined already
         if (!orig_row_colors[chkboxName]) {
     if (chkbox) {
         // initialize orig_row_color if not defined already
         if (!orig_row_colors[chkboxName]) {
@@ -33,6 +33,7 @@ function row_click(chkboxName) {
  */
 function getCSSClass (theRow)
 {
  */
 function getCSSClass (theRow)
 {
+    var rowClass;
        // 3.1 ... with DOM compatible browsers except Opera that does not return
        //         valid values with "getAttribute"
        if (typeof(window.opera) == 'undefined'
        // 3.1 ... with DOM compatible browsers except Opera that does not return
        //         valid values with "getAttribute"
        if (typeof(window.opera) == 'undefined'
@@ -65,7 +66,8 @@ function setCSSClass (obj, newClass) {
  * need to predefine the entire array
  */
 function rowOver(chkboxName) {
  * need to predefine the entire array
  */
 function rowOver(chkboxName) {
-    chkbox = document.getElementById(chkboxName);
+    var chkbox = document.getElementById(chkboxName);
+    var rowClass, rowNum, overClass, clickedClass;
     if (chkbox) {
         if (!orig_row_colors[chkboxName]) {
             rowClass = getCSSClass(chkbox.parentNode.parentNode);
     if (chkbox) {
         if (!orig_row_colors[chkboxName]) {
             rowClass = getCSSClass(chkbox.parentNode.parentNode);
@@ -95,8 +97,8 @@ function rowOver(chkboxName) {
  * @param   string   new color of the checked rows
  */
 function toggle_all(formname, fancy) {
  * @param   string   new color of the checked rows
  */
 function toggle_all(formname, fancy) {
-    TargetForm = document.getElementById(formname);
-    j = 0;
+    var TargetForm = document.getElementById(formname);
+    var j = 0;
     for (var i = 0; i < TargetForm.elements.length; i++) {
         if (TargetForm.elements[i].type == 'checkbox' && TargetForm.elements[i].name.substring(0,3) == 'msg') {
             if (fancy) {
     for (var i = 0; i < TargetForm.elements.length; i++) {
         if (TargetForm.elements[i].type == 'checkbox' && TargetForm.elements[i].name.substring(0,3) == 'msg') {
             if (fancy) {
@@ -213,7 +215,7 @@ function comp_in_new_form(comp_uri, button, myform, iWidth, iHeight) {
     }
     if (!iWidth) iWidth   =  640;
     if (!iHeight) iHeight =  550;
     }
     if (!iWidth) iWidth   =  640;
     if (!iHeight) iHeight =  550;
-    sArg = "width=" + iWidth + ",height=" + iHeight + ",scrollbars=yes,resizable=yes,status=yes";
+    var sArg = "width=" + iWidth + ",height=" + iHeight + ",scrollbars=yes,resizable=yes,status=yes";
     var newwin = window.open(comp_uri, "_blank", sArg);
 }
 
     var newwin = window.open(comp_uri, "_blank", sArg);
 }
 
@@ -228,7 +230,7 @@ function comp_in_new(comp_uri, iWidth, iHeight) {
  * Reload the read_body screen on sending an mdn receipt
  */
 function sendMDN() {
  * Reload the read_body screen on sending an mdn receipt
  */
 function sendMDN() {
-    mdnuri=window.location+'&sendreceipt=1';
+    var mdnuri=window.location+'&sendreceipt=1';
     window.location = mdnuri; 
 }
 
     window.location = mdnuri; 
 }
 
index 2d6d8791ecb9b60621aadf90846f519f4b0cb7cb..2bcbb76f421b7fe3e616a044c4a556e84cc49f76 100644 (file)
@@ -40,7 +40,7 @@ extract($t);
  <script type="text/javascript">
  <!--
  function printFormat () {
  <script type="text/javascript">
  <!--
  function printFormat () {
-     print_win = window.open("../src/printer_friendly_main.php<?php echo $link['URL']; ?>", "Print", "width=800; height=600");
+     var print_win = window.open("../src/printer_friendly_main.php<?php echo $link['URL']; ?>", "Print", "width=800; height=600");
      print_win.focus();
  }
  // -->
      print_win.focus();
  }
  // -->