Author: sevein
Date: Thu Sep 22 10:39:08 2011
New Revision: 9791

Log:
Use prop() and fix small bug to avoid users can unset all the themes

Modified:
   
trunk/plugins/sfPluginAdminPlugin/modules/sfPluginAdminPlugin/templates/themesSuccess.php

Modified: 
trunk/plugins/sfPluginAdminPlugin/modules/sfPluginAdminPlugin/templates/themesSuccess.php
==============================================================================
--- 
trunk/plugins/sfPluginAdminPlugin/modules/sfPluginAdminPlugin/templates/themesSuccess.php
   Wed Sep 21 22:30:57 2011        (r9790)
+++ 
trunk/plugins/sfPluginAdminPlugin/modules/sfPluginAdminPlugin/templates/themesSuccess.php
   Thu Sep 22 10:39:08 2011        (r9791)
@@ -4,19 +4,15 @@
 (function ($)
   {
     Drupal.behaviors.sfPluginAdminPlugin = {
-      attach: function (context) {
+      attach: function (context, target) {
 
-        $('input[name=\'enabled[]\']').click(function() {
-          if (!$(this).is(':checked'))
+        $('input[name=\'enabled[]\']').click(function()
           {
-            $(this).removeAttr('checked');
-          }
-          else
-          {
-            $('input[name=\'enabled[]\']').removeAttr('checked');
-            $(this).attr('checked', 'checked');
-          }
-        });
+            $('input[name=\'enabled[]\']')
+              .prop('checked', false)
+              .filter(this)
+              .prop('checked', true);
+          });
 
       }
     };

-- 
You received this message because you are subscribed to the Google Groups 
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/qubit-commits?hl=en.

Reply via email to