Андрей (andy) wrote in changelog,
Андрей
andy
changelog

[js] r281: LJSV-878: overhaul of ESN

Committer: ailyin
LJSV-878: overhaul of ESN

See http://community.livejournal.com/changelog/8052313.html (livejournal 16116) for more elaborate commit notes.

U   trunk/checkallbutton.js
Modified: trunk/checkallbutton.js
===================================================================
--- trunk/checkallbutton.js	2009-12-17 08:42:22 UTC (rev 280)
+++ trunk/checkallbutton.js	2010-01-21 12:42:03 UTC (rev 281)
@@ -49,20 +49,9 @@
         continue;
 
       if (box.checked == checkallBox.checked) continue;
-
-      // send a "clicked" event to the checkbox
-      try {
-          // w3c
-          var evt = document.createEvent("MouseEvents");
-          evt.initMouseEvent("click", true, false, window,
-                             0, 0, 0, 0, 0, false, false, false, false, 0, null);
-          box.dispatchEvent(evt);
-      } catch (e) {
-          try {
-              // ie
-              box.click();
-          } catch (e2) { }
-      }
+      if (box.disabled) continue;
+      
+      box.checked = checkallBox.checked;
     }
   }
 });

Tags: andy, js
Subscribe

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 4 comments