myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lof...@apache.org
Subject [myfaces-tobago] 02/02: TOBAGO-1902: Migrate to jQuery 3
Date Thu, 05 Jul 2018 11:36:58 GMT
This is an automated email from the ASF dual-hosted git repository.

lofwyr pushed a commit to branch tobago-2.0.x
in repository https://gitbox.apache.org/repos/asf/myfaces-tobago.git

commit 846066610181cc81a5cb8654062a898c6d557bbc
Author: Udo Schnurpfeil <lofwyr@apache.org>
AuthorDate: Wed May 30 18:04:36 2018 +0200

    TOBAGO-1902: Migrate to jQuery 3
    
    preparation
---
 .../tobago/renderkit/html/standard/standard/script/tobago-tree.js   | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-tree.js
b/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-tree.js
index e55c576..7000fd9 100644
--- a/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-tree.js
+++ b/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-tree.js
@@ -113,7 +113,7 @@ Tobago.Tree.init = function(elements) {
   Tobago.Utils.selectWithJQuery(elements, ".tobago-treeMenuNode-markup-folder .tobago-treeMenuNode-toggle")
       .parent().each(function() {
     // if there is no command, than the whole node element should be the toggle
-    var toggle = jQuery(this).children(".tobago-treeMenuCommand").size() == 0
+    var toggle = jQuery(this).children(".tobago-treeMenuCommand").length === 0
         ? jQuery(this)
         : jQuery(this).find(".tobago-treeMenuNode-toggle");
     toggle.click(function() {
@@ -144,7 +144,7 @@ Tobago.Tree.init = function(elements) {
     var data = select.closest(".tobago-treeMenu, .tobago-tree, .tobago-sheet");
     var hidden = data.children(".tobago-treeMenu-selected, .tobago-tree-selected, .tobago-sheet-selected");
     var newValue;
-    if (select.attr("type") == "radio") {
+    if (select.attr("type") === "radio") {
       newValue = "," + Tobago.Tree.rowIndex(select) + ",";
     } else if (selected) {
       newValue = hidden.val() + Tobago.Tree.rowIndex(select) + ",";
@@ -226,7 +226,7 @@ Tobago.Tree.findChildren = function (node) {
 };
 
 Tobago.Tree.isInSheet = function(node) {
-  return node.parent("td").size() == 1;
+  return node.parent("td").length === 1;
 };
 
 Tobago.registerListener(Tobago.Tree.init, Tobago.Phase.DOCUMENT_READY);


Mime
View raw message