myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lof...@apache.org
Subject svn commit: r1644632 - /myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-utils.js
Date Thu, 11 Dec 2014 13:40:33 GMT
Author: lofwyr
Date: Thu Dec 11 13:40:32 2014
New Revision: 1644632

URL: http://svn.apache.org/r1644632
Log:
TOBAGO-1325: jQuery too slow in IE8: Tobago.Util.selectWithJQuery()
- cleanup

Modified:
    myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-utils.js

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-utils.js
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-utils.js?rev=1644632&r1=1644631&r2=1644632&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-utils.js
(original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-utils.js
Thu Dec 11 13:40:32 2014
@@ -46,12 +46,15 @@ Tobago.Utils.selectWithJQuery = function
   }
 
   if (Tobago.browser.isMsie678) {
-    if (selector.match(/^\[[-_a-zA-Z0-9]+\]$/)) {
+    if (selector.match(/^\[[-_a-zA-Z0-9]+\]$/)) { // single attribute set
       return Tobago.Utils.ieSelectWithJQueryAttr(elements, selector);
     }
-    if (selector == Tobago.Command.INPUTS_FOR_DEFAULT) {
+    if (selector == Tobago.Command.INPUTS_FOR_DEFAULT) { // specific list of input elements
       return Tobago.Utils.ieSelectWithJQueryInputs(elements);
     }
+    //if (selector.match(/^\.[-_a-zA-Z0-9]+$/)) { // single class
+    //  return Tobago.Utils.ieSelectWithJQueryClass(elements, selector);
+    //}
   }
 
   return elements.find(selector).add(elements.filter(selector));
@@ -67,6 +70,16 @@ Tobago.Utils.ieSelectWithJQueryAttr = fu
 };
 
 /** internal function for IE <= 8 performance */
+Tobago.Utils.ieFilterAttributes = function (element, filter, result) {
+  if (element[filter] !== undefined) {
+    result.push(element);
+  }
+  for (var i = 0; i < element.childNodes.length; i++) {
+    Tobago.Utils.ieFilterAttributes(element.childNodes[i], filter, result);
+  }
+};
+
+/** internal function for IE <= 8 performance */
 Tobago.Utils.ieSelectWithJQueryInputs = function(elements) {
   var founds = [];
   for (var i = 0; i < elements.length; i++) {
@@ -89,16 +102,6 @@ Tobago.Utils.ieFilterTags = function (el
   }
 };
 
-/** internal function for IE <= 8 performance */
-Tobago.Utils.ieFilterAttributes = function (element, filter, result) {
-  if (element[filter] !== undefined) {
-    result.push(element);
-  }
-  for (var i = 0; i < element.childNodes.length; i++) {
-    Tobago.Utils.ieFilterAttributes(element.childNodes[i], filter, result);
-  }
-};
-
 Tobago.Utils.findSubComponent = function(element, subId) {
   return jQuery(Tobago.Utils.getSubComponentId(element.attr('id'), subId));
 };



Mime
View raw message