Author: sevein
Date: Tue Oct 4 21:01:42 2011
New Revision: 9922
Log:
Theme switcher, use delegate() and detect clicks on screenshot img
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
Tue Oct 4 20:09:29 2011 (r9921)
+++
trunk/plugins/sfPluginAdminPlugin/modules/sfPluginAdminPlugin/templates/themesSuccess.php
Tue Oct 4 21:01:42 2011 (r9922)
@@ -6,12 +6,21 @@
Drupal.behaviors.sfPluginAdminPlugin = {
attach: function (context, target) {
- $('input[name=\'enabled[]\']').click(function()
+ $('#content').delegate('.screenshot, :checkbox', 'click',
function(event)
{
- $('input[name=\'enabled[]\']')
+ if ($(this)
+ .closest('table')
+ .find(':checkbox')
.prop('checked', false)
- .filter(this)
- .prop('checked', true);
+ .end().end()
+ .closest('tr')
+ .find(':checkbox')
+ .prop('checked', true)
+ .end().end()
+ .is('a'))
+ {
+ event.preventDefault();
+ }
});
}
--
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.