From 10567502c702d1dbb37ce54db68231b4769ab50f Mon Sep 17 00:00:00 2001
From: Ivan Tyagov <ivan@nexedi.com>
Date: Tue, 18 Jan 2011 11:37:33 +0000
Subject: [PATCH] Clean up traces from MochiKit.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@42411 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../erp5_xhtml_jquery_style/erp5.js.xml       | 21 +++++++------------
 .../erp5_xhtml_appearance.js.xml              |  1 -
 bt5/erp5_xhtml_jquery_style/bt/revision       |  2 +-
 3 files changed, 8 insertions(+), 16 deletions(-)

diff --git a/bt5/erp5_xhtml_jquery_style/SkinTemplateItem/portal_skins/erp5_xhtml_jquery_style/erp5.js.xml b/bt5/erp5_xhtml_jquery_style/SkinTemplateItem/portal_skins/erp5_xhtml_jquery_style/erp5.js.xml
index 2d19510146..f545643b0b 100644
--- a/bt5/erp5_xhtml_jquery_style/SkinTemplateItem/portal_skins/erp5_xhtml_jquery_style/erp5.js.xml
+++ b/bt5/erp5_xhtml_jquery_style/SkinTemplateItem/portal_skins/erp5_xhtml_jquery_style/erp5.js.xml
@@ -48,13 +48,11 @@ along with this program; if not, write to the Free Software\n
 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n
 */\n
 \n
-//XXX: in erp5_xhtml_style\n
 function submitAction(form, act) {\n
   form.action = act;\n
   form.submit();\n
 }\n
 \n
-//XXX: in erp5_xhtml_style\n
 // This function will be called when the user click the save button. As \n
 // submitAction function may have changed the action before, it\'s better to\n
 // reset the form action to it\'s original behaviour. This is actually\n
@@ -64,7 +62,6 @@ function clickSaveButton(act) {\n
   document.forms[0].action = act;\n
 }\n
 \n
-\n
 // The first input element with an "autofocus" class will get the focus,\n
 // else if no element have autofocus class, the first element which is not the\n
 // search field will get the focus. This is generally the title input text of\n
@@ -86,7 +83,6 @@ function autoFocus() {\n
   }\n
 }\n
 \n
-\n
 function buildTables(element_list, rowPredicate, columnPredicate,\n
                     tableClassName) {\n
   /* Generic code to build a table from elements in element_list.\n
@@ -180,7 +176,7 @@ function submitFormOnEnter(event, form, method_name, clear_changed_flag, element
   }\n
   if(event.keyCode == 13){\n
     if (form == \'main_form\') {\n
-      form = getElement(form); // backward compatibility\n
+      form = $("#"+form); // backward compatibility\n
     }\n
     form.action = method_name;\n
     if (clear_changed_flag==true) {\n
@@ -188,9 +184,11 @@ function submitFormOnEnter(event, form, method_name, clear_changed_flag, element
     }\n
     if(element!=null){\n
       // disable other form elements having same name attribute\n
-      forEach(getElementsByTagAndClassName(element.tagName), function (input){\n
-        if((input.name == element.name) && (input!=element)){input.disabled = true;}\n
-      });\n
+      $(element.tagName).each(\n
+        function (index){\n
+          input = $(this);\n
+          if((input.attr("name") == element.name) && (input!=element)){input.attr("disabled",true);}\n
+        });\n
      }\n
     form.submit();\n
   }\n
@@ -227,7 +225,6 @@ var indexAllCheckBoxesAtBTInstallationOnLoad = function() {\n
     //for(i=0;i<=inputs.length-1;i++) {inputs[i].id = "checkbox" + i; }\n
 }\n
 \n
-\n
 var resizeIFrameOnLoad = function() {\n
   /* Resize all frames in document in order to remove sliders  */\n
   var object_list = $("object.auto_height");\n
@@ -341,15 +338,11 @@ var rewriteIndentedSelect = function() {\n
   }\n
 }\n
 \n
-\n
-\n
 if (navigator.userAgent.toLowerCase().indexOf(\'firefox\') != -1)\n
   $(document).ready(rewriteIndentedSelect);\n
-\n
 $(document).ready(resizeIFrameOnLoad);\n
 $(document).ready(addOnChangeEventHandler);\n
-$(document).ready(indexAllCheckBoxesAtBTInstallationOnLoad);\n
-
+$(document).ready(indexAllCheckBoxesAtBTInstallationOnLoad);
 
 ]]></string> </value>
         </item>
diff --git a/bt5/erp5_xhtml_jquery_style/SkinTemplateItem/portal_skins/erp5_xhtml_jquery_style/erp5_xhtml_appearance.js.xml b/bt5/erp5_xhtml_jquery_style/SkinTemplateItem/portal_skins/erp5_xhtml_jquery_style/erp5_xhtml_appearance.js.xml
index c059a9aa5e..e0b906d3f8 100644
--- a/bt5/erp5_xhtml_jquery_style/SkinTemplateItem/portal_skins/erp5_xhtml_jquery_style/erp5_xhtml_appearance.js.xml
+++ b/bt5/erp5_xhtml_jquery_style/SkinTemplateItem/portal_skins/erp5_xhtml_jquery_style/erp5_xhtml_appearance.js.xml
@@ -49,7 +49,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n
 var fixLeftRightHeightAndFocusOnLoad = function () {\n
   fixLeftRightHeightAndFocus(1);\n
 };\n
-\n
 $(document).ready(fixLeftRightHeightAndFocusOnLoad);\n
 </string> </value>
         </item>
diff --git a/bt5/erp5_xhtml_jquery_style/bt/revision b/bt5/erp5_xhtml_jquery_style/bt/revision
index 7813681f5b..c7930257df 100644
--- a/bt5/erp5_xhtml_jquery_style/bt/revision
+++ b/bt5/erp5_xhtml_jquery_style/bt/revision
@@ -1 +1 @@
-5
\ No newline at end of file
+7
\ No newline at end of file
-- 
2.30.9