r13291 - Products.Archetypes/branches/plip11017-tag-selector-rmattb/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: Thu Nov 25 06:27:07 2010
New Revision: 13291
Modified:
Products.Archetypes/branches/plip11017-tag-selector-rmattb/Products/Archetypes/skins/archetypes/widgets/js/keywordmultiselect.js
Log:
Improve performance by removing call of each. Commented other potential performance improvement. Refs #11017.
Modified: Products.Archetypes/branches/plip11017-tag-selector-rmattb/Products/Archetypes/skins/archetypes/widgets/js/keywordmultiselect.js
==============================================================================
--- Products.Archetypes/branches/plip11017-tag-selector-rmattb/Products/Archetypes/skins/archetypes/widgets/js/keywordmultiselect.js (original)
+++ Products.Archetypes/branches/plip11017-tag-selector-rmattb/Products/Archetypes/skins/archetypes/widgets/js/keywordmultiselect.js Thu Nov 25 06:27:07 2010
@@ -545,6 +545,8 @@
multiSelect.data("callback", callback);
// Serialize the select options into json options
+ // This may be the slowest part of this js,
+ // and is not currently used in Plone.
var options = [];
$(select).children().each( function() {
if(this.tagName.toUpperCase() == 'OPTGROUP')
@@ -654,7 +656,7 @@
// get a coma-delimited list of selected values
selectedValuesString: function() {
var selectedValues = "";
- $(this).next('.multiSelectOptions').find('INPUT:checkbox:checked').not('.optGroup, .selectAll').each(function() {
+ $(this).next('.multiSelectOptions').find('INPUT:checkbox:checked').not('.optGroup, .selectAll')(function() {
selectedValues += $(this).attr('value') + ",";
});
// trim any end comma and surounding whitespace
------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev