r13457 - Products.Archetypes/trunk/Products/Archetypes/skins/archetypes/widgets/js
"Matt Barkau" <[email protected]>
| Newsgroups | gmane.comp.web.zope.plone.archetypes.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: rmattb
Date: Sat Feb 5 03:39:39 2011
New Revision: 13457
Modified:
Products.Archetypes/trunk/Products/Archetypes/skins/archetypes/widgets/js/keywordmultiselect.js
Log:
Improved comments & code order in JavaScript for keyword multiple select enhancement PLIP. Refs #11017.
Modified: Products.Archetypes/trunk/Products/Archetypes/skins/archetypes/widgets/js/keywordmultiselect.js
==============================================================================
--- Products.Archetypes/trunk/Products/Archetypes/skins/archetypes/widgets/js/keywordmultiselect.js (original)
+++ Products.Archetypes/trunk/Products/Archetypes/skins/archetypes/widgets/js/keywordmultiselect.js Sat Feb 5 03:39:39 2011
@@ -111,21 +111,6 @@
// Initialize selected options list
updateSelected.call(multiSelectA);
- // Handle mouse click of checkbox
- multiSelectOptions.find('INPUT:checkbox').click( function() {
- // set the label checked class
- $(this).parent('LABEL').toggleClass('checked', $(this).attr('checked'));
-
- updateSelected.call(multiSelectA);
- multiSelectA.focus();
- // If this checkbox was navigated to with the tab key before being checked,
- // then put focus back on it.
- if(typeof(lastNavTabKeyCheckbox) != "undefined" && lastNavTabKeyCheckbox != null) {
- lastNavTabKeyCheckbox.focus();
- lastNavTabKeyCheckbox = null;
- }
- });
-
// Handle mouse hover of option, both
// entering an option, *and*
// mouse moving within an option.
@@ -150,12 +135,28 @@
}
});
- // Handle tab-driven focus of checkbox
+ // Handle mouse click of checkbox
+ multiSelectOptions.find('INPUT:checkbox').click( function() {
+ // set the label checked class
+ $(this).parent('LABEL').toggleClass('checked', $(this).attr('checked'));
+
+ updateSelected.call(multiSelectA);
+ multiSelectA.focus();
+ // If this checkbox was navigated to with the tab key before being checked,
+ // then put focus back on it.
+ if(typeof(lastNavTabKeyCheckbox) != "undefined" && lastNavTabKeyCheckbox != null) {
+ lastNavTabKeyCheckbox.focus();
+ lastNavTabKeyCheckbox = null;
+ }
+ });
+
+ // Track mouse click of option
multiSelectOptions.find('LABEL').mousedown(function(){
// Track mouse clicks,
// so that tab key navigation focus on checkboxes can be maintained separately.
lastNavClickTag = this;
});
+ // Handle tab-key focus of checkbox
multiSelectOptions.find('INPUT').focus(function(){
if(typeof(lastNavClickTag) == "undefined" || lastNavClickTag == null) {
// This only happens with tab key navgation.
------------------------------------------------------------------------------
The modern datacenter depends on network connectivity to access resources
and provide services. The best practices for maximizing a physical server's
connectivity to a physical network are well understood - see how these
rules translate into the virtual world?
http://p.sf.net/sfu/oracle-sfdevnlfb