You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2011/11/01 10:07:54 UTC

svn commit: r1195883 - in /myfaces/tobago/trunk: tobago-example/tobago-example-test/src/main/webapp/script/ tobago-example/tobago-example-test/src/main/webapp/tc/attribute/ tobago-example/tobago-example-test/src/main/webapp/tx/ tobago-theme/tobago-them...

Author: lofwyr
Date: Tue Nov  1 09:07:54 2011
New Revision: 1195883

URL: http://svn.apache.org/viewvc?rev=1195883&view=rev
Log:
Moving utils to its own source file

Modified:
    myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/script/tobago-assert.js
    myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/tc/attribute/mode-valueIfSet.xhtml
    myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/tx/id-and-fieldId.xhtml
    myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/msie_6_0/script/tobago.js
    myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-menu.js
    myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-sheet.js
    myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-utils.js
    myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/script/tobago-assert.js
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/script/tobago-assert.js?rev=1195883&r1=1195882&r2=1195883&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/script/tobago-assert.js (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/script/tobago-assert.js Tue Nov  1 09:07:54 2011
@@ -96,7 +96,7 @@ var TobagoAssert = {
   jQueryElement: function(elementOrId) {
     var element;
     if (typeof elementOrId == "string") {
-      element = jQuery(Tobago.escapeClientId(elementOrId));
+      element = jQuery(Tobago.Utils.escapeClientId(elementOrId));
     } else { // JQuery Object Array
       element = elementOrId;
     }

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/tc/attribute/mode-valueIfSet.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/tc/attribute/mode-valueIfSet.xhtml?rev=1195883&r1=1195882&r2=1195883&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/tc/attribute/mode-valueIfSet.xhtml (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/tc/attribute/mode-valueIfSet.xhtml Tue Nov  1 09:07:54 2011
@@ -119,10 +119,10 @@
         TobagoAssert.assertAttribute("page:v4", "value", "value from model");
         TobagoAssert.assertAttribute("page:vu", "value", "");
 
-        var i1 = jQuery(Tobago.escapeClientId("page:id-box")).find("input:eq(0)");
+        var i1 = jQuery(Tobago.Utils.escapeClientId("page:id-box")).find("input:eq(0)");
         TobagoAssert.assertAttribute(i1, "id", "page:my_number_1");
 //        TobagoAssert.assertAttribute(..., "id", "");
-        var i3 = jQuery(Tobago.escapeClientId("page:id-box")).find("input:eq(2)");
+        var i3 = jQuery(Tobago.Utils.escapeClientId("page:id-box")).find("input:eq(2)");
         TobagoAssert.assertAttribute(i3, "id", "page:my_number_3");
 //        TobagoAssert.assertAttribute(..., "id", "");
       }

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/tx/id-and-fieldId.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/tx/id-and-fieldId.xhtml?rev=1195883&r1=1195882&r2=1195883&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/tx/id-and-fieldId.xhtml (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/tx/id-and-fieldId.xhtml Tue Nov  1 09:07:54 2011
@@ -175,9 +175,9 @@
       });
 
       function fillIdDisplay(i, fieldClass) {
-        var panelIn = jQuery(Tobago.escapeClientId("page:panel" + i));
-        var labelIn = jQuery(Tobago.escapeClientId("page:label" + i));
-        var fieldIn = jQuery(Tobago.escapeClientId("page:field" + i));
+        var panelIn = jQuery(Tobago.Utils.escapeClientId("page:panel" + i));
+        var labelIn = jQuery(Tobago.Utils.escapeClientId("page:label" + i));
+        var fieldIn = jQuery(Tobago.Utils.escapeClientId("page:field" + i));
 
         var panel = panelIn.prev();
         var label = panel.children(".tobago-label");
@@ -189,7 +189,7 @@
       }
 
       function test(testId, expected) {
-        var element = jQuery(Tobago.escapeClientId(testId));
+        var element = jQuery(Tobago.Utils.escapeClientId(testId));
         if (element.attr("value") != expected) {
           element.addClass("tobago-in-markup-error");
           element.attr("title", "expected: '" + expected + "'");

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/msie_6_0/script/tobago.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/msie_6_0/script/tobago.js?rev=1195883&r1=1195882&r2=1195883&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/msie_6_0/script/tobago.js (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/msie_6_0/script/tobago.js Tue Nov  1 09:07:54 2011
@@ -23,13 +23,13 @@
 Tobago.fixPngAlphaAll = function(elements) {
   if (jQuery.browser.msie && parseInt(jQuery.browser.version, 10) <= 6) {
     // fix png images
-    var images = Tobago.selectWidthJQuery(elements, "img[src$='.png']");
+    var images = Tobago.Utils.selectWidthJQuery(elements, "img[src$='.png']");
     images.each(function() {
       Tobago.fixPngAlpha(this);
     });
 
     // fix png backgrounds of the labels
-    Tobago.selectWidthJQuery(elements,
+    Tobago.Utils.selectWidthJQuery(elements,
         "label.tobago-label-markup-fatal, label.tobago-label-markup-error, " +
         "label.tobago-label-markup-warn, label.tobago-label-markup-info").each(function() {
       Tobago.fixBackgroundPngAlpha(this);

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-menu.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-menu.js?rev=1195883&r1=1195882&r2=1195883&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-menu.js (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-menu.js Tue Nov  1 09:07:54 2011
@@ -225,7 +225,7 @@ Tobago.Menu.switchOff = function(menuBar
  */
 Tobago.Menu.init = function(elements) {
 
-  var menus = Tobago.selectWidthJQuery(elements, ".tobago-menu-markup-top");
+  var menus = Tobago.Utils.selectWidthJQuery(elements, ".tobago-menu-markup-top");
 
   // a click on the top menu make the complete menu active or inactive respectively.
   menus.click(function(event) {
@@ -257,7 +257,7 @@ Tobago.Menu.init = function(elements) {
 
   jQuery(".tobago-page-menuStore").append(menus.children("ol"));
 
-  var toolBarMenu = Tobago.selectWidthJQuery(
+  var toolBarMenu = Tobago.Utils.selectWidthJQuery(
       elements, ".tobago-toolBar-menu .tobago-boxToolBar-menu .tobago-tabGroupToolBar-menu");
   // a click on toolBar menu opener -> forward to .tobago-menu-markup-top
   toolBarMenu.click(function(event) {
@@ -266,7 +266,7 @@ Tobago.Menu.init = function(elements) {
   });
 
   // init context menus
-  var contextMenu = Tobago.selectWidthJQuery(elements, ".tobago-menu-contextMenu");
+  var contextMenu = Tobago.Utils.selectWidthJQuery(elements, ".tobago-menu-contextMenu");
   contextMenu.parent().bind("contextmenu", function(event) {
     jQuery(this).children(".tobago-menu-contextMenu").find('a').click();
     event.stopPropagation();

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-sheet.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-sheet.js?rev=1195883&r1=1195882&r2=1195883&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-sheet.js (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-sheet.js Tue Nov  1 09:07:54 2011
@@ -88,7 +88,7 @@ Tobago.Sheet = function(sheetId, firstRo
 
 Tobago.Sheet.prototype.setupSortHeaders = function() {
   var sheet = this;
-  jQuery(Tobago.escapeClientId(sheet.id)).find(".tobago-sheet-header[sorterId]").each(function() {
+  jQuery(Tobago.Utils.escapeClientId(sheet.id)).find(".tobago-sheet-header[sorterId]").each(function() {
 
     jQuery(this).click({sheet: sheet, sorterId: jQuery(this).attr("sorterId")}, function(event) {
 
@@ -287,7 +287,7 @@ Tobago.Sheet.prototype.setup = function(
 
   // IE 6+7
   if (jQuery.browser.msie && parseInt(jQuery.browser.version) <= 7) {
-    jQuery(Tobago.escapeClientId(this.id) + ">div>table>colgroup>col").each(function() {
+    jQuery(Tobago.Utils.escapeClientId(this.id) + ">div>table>colgroup>col").each(function() {
       Tobago.Sheet.fixIE67ColWidth(jQuery(this));
     });
   }
@@ -523,7 +523,7 @@ Tobago.Sheet.prototype.isEnabled = funct
 Tobago.Sheet.prototype.getRows = function() {
   // todo: use a util for "id replace"
   // find all rows in current sheet
-  return jQuery(Tobago.escapeClientId(this.id) + ">div>table>tbody>tr");
+  return jQuery(Tobago.Utils.escapeClientId(this.id) + ">div>table>tbody>tr");
 };
 
 Tobago.Sheet.prototype.updateSelectionView = function() {
@@ -742,7 +742,7 @@ Tobago.Sheet.prototype.endResize = funct
     if (this.resizerId) {
       var width = this.newWidth;
       var columnNr = this.resizerId.substring(this.resizerId.lastIndexOf("_") + 1, this.resizerId.length);
-      var table = jQuery(Tobago.escapeClientId(this.id) + ">div>table");
+      var table = jQuery(Tobago.Utils.escapeClientId(this.id) + ">div>table");
       var col = jQuery("colgroup>col", table).eq(columnNr);
       col.width(width);
 
@@ -780,7 +780,7 @@ Tobago.Sheet.fixIE67ColWidth = function(
 Tobago.Sheet.prototype.storeSizes = function() {
     var index = 0;
     var idPrefix = this.id + Tobago.SUB_COMPONENT_SEP + "header_div";
-    var headerDiv = jQuery(Tobago.escapeClientId(idPrefix));
+    var headerDiv = jQuery(Tobago.Utils.escapeClientId(idPrefix));
 
     var widths = "";
     jQuery(headerDiv).children().each(function() {

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=1195883&r1=1195882&r2=1195883&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 Tue Nov  1 09:07:54 2011
@@ -17,6 +17,27 @@
 
 Tobago.Utils = {};
 
+/**
+ *
+ * @param id A JSF client id, type=string
+ * @return A string which can be used as a jQuery selector.
+ */
+Tobago.Utils.escapeClientId = function(id) {
+  return '#' + id.replace(/:/g, '\\:');
+};
+
+/**
+ * Helps to select either elements from the whole DOM or only find in sub trees
+ * (in the case of AJAX partial rendering)
+ * @param elements a jQuery object to initialize (ajax) or null for initializing the whole document (full load).
+ * @param selector a jQuery selector.
+ */
+Tobago.Utils.selectWidthJQuery = function(elements, selector) {
+  return elements == null
+      ? jQuery(selector)
+      : elements.find(selector).add(elements.filter(selector));
+};
+
 Tobago.Utils.findSubComponent = function(element, subId) {
   return jQuery(Tobago.Utils.getSubComponentId(element.attr('id'), subId));
 };

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.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.js?rev=1195883&r1=1195882&r2=1195883&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js Tue Nov  1 09:07:54 2011
@@ -344,7 +344,7 @@ var Tobago = {
   makeOverlaySemitransparent: function() {
     var overlay;
     if (jQuery.browser.webkit) {
-      overlay = jQuery(Tobago.escapeClientId(Tobago.page.id + '-overlay'));
+      overlay = jQuery(Tobago.Utils.escapeClientId(Tobago.page.id + '-overlay'));
       overlay.css('opacity', '0.8');
       overlay.css('background-color', jQuery('.tobago-page').css("background-color"));
     } else {
@@ -1023,7 +1023,7 @@ var Tobago = {
   openPopupWithAction: function(source, popupId, actionId, options) {
 
     // If there is no div, create one.
-    var div = jQuery(Tobago.escapeClientId(popupId));
+    var div = jQuery(Tobago.Utils.escapeClientId(popupId));
     if (div.size() == 0) {
       jQuery('form:first')// add the new div after the page and the popup divs.
           .children('(.tobago-page,.tobago-popup):last')
@@ -1049,28 +1049,23 @@ var Tobago = {
 // -------- Util functions ----------------------------------------------------
 
   /**
-   *
-   * @param id A JSF client id, type=string
-   * @return A string which can be used as a jQuery selector.
+   * @deprecated Please use Tobago.Utils.escapeClientId()
    */
   escapeClientId: function(id) {
-    return '#' + id.replace(/:/g, '\\:');
+    LOG.warn("Deprecated method was called. Please use Tobago.Utils.escapeClientId()");
+    return Tobago.Utils.escapeClientId(id);
   },
 
   /**
-   * Helps to select either elements from the whole DOM or only find in sub trees
-   * (in the case of AJAX partial rendering)
-   * @param elements a jQuery object to initialize (ajax) or null for initializing the whole document (full load).
-   * @param selector a jQuery selector.
+   * @deprecated Please use Tobago.Utils.selectWidthJQuery()
    */
-    selectWidthJQuery: function(elements, selector) {
-    return elements == null
-        ? jQuery(selector)
-        : elements.find(selector).add(elements.filter(selector));
+  selectWidthJQuery: function(elements, selector) {
+    LOG.warn("Deprecated method was called. Please use Tobago.Utils.selectWidthJQuery()");
+    return Tobago.Utils.selectWidthJQuery(elements, selector);
   },
 
   calculateScrollbarWeights: function(id) {
-    var hidden = jQuery(Tobago.escapeClientId(id));
+    var hidden = jQuery(Tobago.Utils.escapeClientId(id));
     var outer = hidden.prev();
     hidden.val(''
         + (100 - outer.prop('clientWidth')) + ';'
@@ -2483,7 +2478,7 @@ Tobago.Updater = {
     }
     switch (data.responseCode) {
       case Tobago.Updater.CODE_SUCCESS:
-        var element = jQuery(Tobago.escapeClientId(data.ajaxId));
+        var element = jQuery(Tobago.Utils.escapeClientId(data.ajaxId));
         // if there is html data, we replace the ajax element with the new data
         if (data.html.length > 0) {
           var newElement = jQuery(data.html);
@@ -2538,7 +2533,7 @@ Tobago.ToolBar.init = function(elements)
   // doing the same for 3 renderer names
   // XXX put this in a loop (the first try doesn't work, because we can't use local variables in a anonymous function)
 
-    Tobago.selectWidthJQuery(elements, ".tobago-toolBar").find('.tobago-toolBar-item')
+    Tobago.Utils.selectWidthJQuery(elements, ".tobago-toolBar").find('.tobago-toolBar-item')
         .not('.tobago-toolBar-item-markup-disabled')
         .hover(function() {
       jQuery(this).toggleClass('tobago-toolBar-item-markup-hover');
@@ -2568,7 +2563,7 @@ Tobago.ToolBar.init = function(elements)
       });
     });
 
-    Tobago.selectWidthJQuery(elements, ".tobago-box-headerToolBar").find('.tobago-boxToolBar-item')
+    Tobago.Utils.selectWidthJQuery(elements, ".tobago-box-headerToolBar").find('.tobago-boxToolBar-item')
         .not('.tobago-boxToolBar-item-markup-disabled')
         .hover(function() {
       jQuery(this).toggleClass('tobago-boxToolBar-item-markup-hover');
@@ -2598,7 +2593,7 @@ Tobago.ToolBar.init = function(elements)
       });
     });
 
-    Tobago.selectWidthJQuery(elements, ".tobago-tabGroup-toolBar").find('.tobago-tabGroupToolBar-item')
+    Tobago.Utils.selectWidthJQuery(elements, ".tobago-tabGroup-toolBar").find('.tobago-tabGroupToolBar-item')
         .not('.tobago-tabGroupToolBar-item-markup-disabled')
         .hover(function() {
       jQuery(this).toggleClass('tobago-tabGroupToolBar-item-markup-hover');
@@ -3047,7 +3042,7 @@ Tobago.TabGroup = {};
  */
 Tobago.TabGroup.init = function(elements) {
 
-  var tabGroups = Tobago.selectWidthJQuery(elements, ".tobago-tabGroup");
+  var tabGroups = Tobago.Utils.selectWidthJQuery(elements, ".tobago-tabGroup");
 
   // initialize the tab header elements
   // client case
@@ -3150,7 +3145,7 @@ Tobago.Tree = {};
 
 Tobago.Tree.toggleNode = function(element) {
   var node = element.closest(".tobago-treeNode, .tobago-treeMenuNode");
-  var content = jQuery(Tobago.escapeClientId(node.attr("id") + Tobago.SUB_COMPONENT_SEP + "content"));
+  var content = jQuery(Tobago.Utils.escapeClientId(node.attr("id") + Tobago.SUB_COMPONENT_SEP + "content"));
   var expanded = node.find(".tobago-treeMenuNode-expanded, .tobago-treeNode-expanded");
   var toggle = node.find(".tobago-treeMenuNode-toggle, .tobago-treeNode-toggle");
   if (content.css("display") == "none") {
@@ -3176,7 +3171,7 @@ Tobago.Tree.toggleNode = function(elemen
 
 Tobago.Tree.init = function(elements) {
 
-  var listboxSelects = Tobago.selectWidthJQuery(elements, ".tobago-treeListbox").find("select");
+  var listboxSelects = Tobago.Utils.selectWidthJQuery(elements, ".tobago-treeListbox").find("select");
 
   // find all option tags and add the dedicated select tag in its data section.
 
@@ -3184,7 +3179,7 @@ Tobago.Tree.init = function(elements) {
     var option = jQuery(this);
     var optionId = option.attr("id");
     var selectId = optionId + "::select";
-    var select = jQuery(Tobago.escapeClientId(selectId));
+    var select = jQuery(Tobago.Utils.escapeClientId(selectId));
     if (select.length == 1) {
       option.data("select", select);
     } else {
@@ -3217,11 +3212,11 @@ Tobago.Tree.init = function(elements) {
 
   });
 
-  Tobago.selectWidthJQuery(elements, ".tobago-treeNode-markup-folder .tobago-treeNode-toggle").click(function() {
+  Tobago.Utils.selectWidthJQuery(elements, ".tobago-treeNode-markup-folder .tobago-treeNode-toggle").click(function() {
     Tobago.Tree.toggleNode(jQuery(this));
   });
 
-  Tobago.selectWidthJQuery(elements, ".tobago-treeMenuNode-markup-folder .tobago-treeMenuNode-toggle")
+  Tobago.Utils.selectWidthJQuery(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
@@ -3233,12 +3228,12 @@ Tobago.Tree.init = function(elements) {
   });
 
   // normal hover effect (not possible with CSS in IE 6)
-  Tobago.selectWidthJQuery(elements, ".tobago-treeMenuNode").hover(function() {
+  Tobago.Utils.selectWidthJQuery(elements, ".tobago-treeMenuNode").hover(function() {
     jQuery(this).toggleClass("tobago-treeMenuNode-markup-hover");
   });
 
   // marked for treeNode
-  Tobago.selectWidthJQuery(elements, ".tobago-treeNode").focus(function() {
+  Tobago.Utils.selectWidthJQuery(elements, ".tobago-treeNode").focus(function() {
     var command = jQuery(this);
     var node = command.parent(".tobago-treeNode");
     var tree = node.closest(".tobago-tree");
@@ -3249,7 +3244,7 @@ Tobago.Tree.init = function(elements) {
   });
 
   // marked for treeMenuNode
-  Tobago.selectWidthJQuery(elements, ".tobago-treeMenuCommand").focus(function() {
+  Tobago.Utils.selectWidthJQuery(elements, ".tobago-treeMenuCommand").focus(function() {
     var command = jQuery(this);
     var node = command.parent(".tobago-treeMenuNode");
     var tree = node.closest(".tobago-treeMenu");
@@ -3264,7 +3259,7 @@ Tobago.SelectManyShuttle = {};
 
 Tobago.SelectManyShuttle.init = function(elements) {
 
-  var shuttles = Tobago.selectWidthJQuery(elements, ".tobago-selectManyShuttle:not(.tobago-selectManyShuttle-disabled)");
+  var shuttles = Tobago.Utils.selectWidthJQuery(elements, ".tobago-selectManyShuttle:not(.tobago-selectManyShuttle-disabled)");
 
   shuttles.find(".tobago-selectManyShuttle-unselected").dblclick(function() {
     Tobago.SelectManyShuttle.moveSelectedItems(jQuery(this).parents(".tobago-selectManyShuttle"), true, false);