diff --git a/addressbook/js/app.js b/addressbook/js/app.js index 1ff06ed108..0a2be09ebd 100644 --- a/addressbook/js/app.js +++ b/addressbook/js/app.js @@ -62,8 +62,8 @@ app.classes.addressbook = AppJS.extend( var content = this.et2.getArrayMgr('content').data; if (typeof content.showsearchbuttons == 'undefined' || !content.showsearchbuttons) { - this.show_custom_country($j('select[id*="adr_one_countrycode"]').get(0)); - this.show_custom_country($j('select[id*="adr_two_countrycode"]').get(0)); + this.show_custom_country(jQuery('select[id*="adr_one_countrycode"]').get(0)); + this.show_custom_country(jQuery('select[id*="adr_two_countrycode"]').get(0)); // Instanciate infolog JS too - wrong app, so it won't be done automatically if(typeof window.app.infolog != 'object' && typeof window.app.classes['infolog'] == 'function') @@ -179,7 +179,7 @@ app.classes.addressbook = AppJS.extend( { // Find the infolog list var list = etemplate2.getById( - $j(this.et2.getInstanceManager().DOMContainer).nextAll('.et2_container').attr('id') + jQuery(this.et2.getInstanceManager().DOMContainer).nextAll('.et2_container').attr('id') ); var nm = list ? list.widgetContainer.getWidgetById('nm') : null; if(nm) @@ -547,7 +547,7 @@ app.classes.addressbook = AppJS.extend( { selectbox.value = "-custom-"; // Chosen needs this to update - $j(selectbox).trigger("liszt:updated"); + jQuery(selectbox).trigger("liszt:updated"); custom_field.style.display = "inline"; } diff --git a/admin/js/app.js b/admin/js/app.js index 3f9a20487d..85becb3fef 100644 --- a/admin/js/app.js +++ b/admin/js/app.js @@ -892,8 +892,8 @@ app.classes.admin = AppJS.extend( */ wizard_popup_resize: function () { - var $main_div = $j('#popupMainDiv'); - var $et2 = $j('.et2_container'); + var $main_div = jQuery('#popupMainDiv'); + var $et2 = jQuery('.et2_container'); var w = { width: egw_getWindowInnerWidth(), height: egw_getWindowInnerHeight() diff --git a/api/js/egw_action/egw_action.js b/api/js/egw_action/egw_action.js index 502fd0d961..f7447dede6 100644 --- a/api/js/egw_action/egw_action.js +++ b/api/js/egw_action/egw_action.js @@ -492,7 +492,7 @@ egwAction.prototype.updateActions = function(_actions, _app) */ egwAction.prototype.not_disableClass = function(_action, _senders, _target) { - return !$j(_target.iface.getDOMNode()).hasClass(_action.data.disableClass); + return !jQuery(_target.iface.getDOMNode()).hasClass(_action.data.disableClass); }; /** @@ -505,7 +505,7 @@ egwAction.prototype.not_disableClass = function(_action, _senders, _target) */ egwAction.prototype.enableClass = function(_action, _senders, _target) { - return $j(_target.iface.getDOMNode()).hasClass(_action.data.enableClass); + return jQuery(_target.iface.getDOMNode()).hasClass(_action.data.enableClass); }; /** diff --git a/api/js/egw_action/egw_action_dragdrop.js b/api/js/egw_action/egw_action_dragdrop.js index 4d42e1cdf2..42fc2d5b07 100644 --- a/api/js/egw_action/egw_action_dragdrop.js +++ b/api/js/egw_action/egw_action_dragdrop.js @@ -88,11 +88,11 @@ function egwDragActionImplementation() ai.defaultDDHelper = function (_selected) { // Table containing clone of rows - var table = $j(document.createElement("table")).addClass('egwGridView_grid et2_egw_action_ddHelper_row'); + var table = jQuery(document.createElement("table")).addClass('egwGridView_grid et2_egw_action_ddHelper_row'); // tr element to use as last row to show lable more ... - var moreRow = $j(document.createElement('tr')).addClass('et2_egw_action_ddHelper_moreRow'); + var moreRow = jQuery(document.createElement('tr')).addClass('et2_egw_action_ddHelper_moreRow'); // Main div helper container - var div = $j(document.createElement("div")).append(table); + var div = jQuery(document.createElement("div")).append(table); var rows = []; // Maximum number of rows to show @@ -103,7 +103,7 @@ function egwDragActionImplementation() var index = 0; for (var i = 0; i < _selected.length;i++) { - var row = $j(_selected[i].iface.getDOMNode()).clone(); + var row = jQuery(_selected[i].iface.getDOMNode()).clone(); if (row) { rows.push(row); @@ -113,7 +113,7 @@ function egwDragActionImplementation() if (index == maxRows) { // Lable to show number of items - var spanCnt = $j(document.createElement('span')) + var spanCnt = jQuery(document.createElement('span')) .addClass('et2_egw_action_ddHelper_itemsCnt') .appendTo(div); @@ -129,7 +129,7 @@ function egwDragActionImplementation() } } - var text = $j(document.createElement('div')).addClass('et2_egw_action_ddHelper_tip'); + var text = jQuery(document.createElement('div')).addClass('et2_egw_action_ddHelper_tip'); div.append(text); // Add notice of Ctrl key, if supported @@ -192,24 +192,24 @@ function egwDragActionImplementation() // Tell jQuery to include this property jQuery.event.props.push('dataTransfer'); - $j(node).off("mousedown") + jQuery(node).off("mousedown") .on("mousedown", function(event) { var dragOut = _context.isDragOut(event); - $j(this).attr("draggable", dragOut? "true" : ""); - $j(node).draggable("option","disabled",dragOut); + jQuery(this).attr("draggable", dragOut? "true" : ""); + jQuery(node).draggable("option","disabled",dragOut); if (dragOut) { // Disabling draggable adds some UI classes, but we don't care so remove them - $j(node).removeClass("ui-draggable-disabled ui-state-disabled"); + jQuery(node).removeClass("ui-draggable-disabled ui-state-disabled"); } else { if (_context.isSelection(event)) { - $j(node).draggable("disable"); + jQuery(node).draggable("disable"); // Disabling draggable adds some UI classes, but we don't care so remove them - $j(node).removeClass("ui-draggable-disabled ui-state-disabled"); + jQuery(node).removeClass("ui-draggable-disabled ui-state-disabled"); } else if(event.which != 3) { @@ -220,7 +220,7 @@ function egwDragActionImplementation() }) .on ("mouseup", function (event){ if (_context.isSelection(event)) - $j(node).draggable("enable"); + jQuery(node).draggable("enable"); }) .on("dragstart", function(event) { if(_context.isSelection(event)) return; @@ -272,7 +272,7 @@ function egwDragActionImplementation() // Create drag icon _callback.call(_context, _context, ai); // Drag icon must be visible for setDragImage() - we'll remove it on drag - $j("body").append(ai.helper); + jQuery("body").append(ai.helper); event.dataTransfer.setDragImage(ai.helper[0],-12,-12); }) .on("drag", function(e) { @@ -287,13 +287,13 @@ function egwDragActionImplementation() else { // Use Ctrl key in order to select content - $j(node).off("mousedown") + jQuery(node).off("mousedown") .on({ mousedown: function(event){ if (_context.isSelection(event)){ - $j(node).draggable("disable"); + jQuery(node).draggable("disable"); // Disabling draggable adds some UI classes, but we don't care so remove them - $j(node).removeClass("ui-draggable-disabled ui-state-disabled"); + jQuery(node).removeClass("ui-draggable-disabled ui-state-disabled"); } else if(event.which != 3) { @@ -301,13 +301,13 @@ function egwDragActionImplementation() } }, mouseup: function (){ - $j(node).draggable("enable"); + jQuery(node).draggable("enable"); // Set cursor back to auto. Seems FF can't handle cursor reversion - $j('body').css({cursor:'auto'}); + jQuery('body').css({cursor:'auto'}); } }); } - $j(node).draggable( + jQuery(node).draggable( { "distance": 20, "cursor": "move", @@ -322,8 +322,8 @@ function egwDragActionImplementation() // and the multiple dragDropTypes (ai.ddTypes) _callback.call(_context, false, ai); - $j(node).data("ddTypes", ai.ddTypes); - $j(node).data("selected", ai.selected); + jQuery(node).data("ddTypes", ai.ddTypes); + jQuery(node).data("selected", ai.selected); if (ai.helper) { @@ -334,12 +334,12 @@ function egwDragActionImplementation() // fixes a bug in IE: If the element isn't inserted into // the DOM-tree jquery appends it to the parent node. // In case this is a table it doesn't work correctly - $j("body").append(ai.helper); + jQuery("body").append(ai.helper); return ai.helper; } // Return an empty div if the helper dom node is not set - return ai.defaultDDHelper(ai.selected);//$j(document.createElement("div")).addClass('et2_egw_action_ddHelper'); + return ai.defaultDDHelper(ai.selected);//jQuery(document.createElement("div")).addClass('et2_egw_action_ddHelper'); }, "start": function(e) { return ai.helper != null; @@ -396,8 +396,8 @@ function egwDragActionImplementation() { var node = _aoi.getDOMNode(); - if (node && $j(node).data("uiDraggable")){ - $j(node).draggable("destroy"); + if (node && jQuery(node).data("uiDraggable")){ + jQuery(node).draggable("destroy"); } }; @@ -435,7 +435,7 @@ function egwDragActionImplementation() // Push the dragType of the associated action object onto the // drag type list - this allows an element to support multiple // drag/drop types. - var type = $j.isArray(_links[k].actionObj.dragType) ? _links[k].actionObj.dragType : [_links[k].actionObj.dragType]; + var type = jQuery.isArray(_links[k].actionObj.dragType) ? _links[k].actionObj.dragType : [_links[k].actionObj.dragType]; for(var i = 0; i < type.length; i++) { if (this.ddTypes.indexOf(type[i]) == -1) @@ -544,7 +544,7 @@ function egwDropActionImplementation() if (node) { - $j(node).droppable( + jQuery(node).droppable( { "accept": function(_draggable) { if (typeof _draggable.data("ddTypes") != "undefined") @@ -646,7 +646,7 @@ function egwDropActionImplementation() }, 0); // Timeout is needed to have it working in IE } // Set cursor back to auto. Seems FF can't handle cursor reversion - $j('body').css({cursor:'auto'}); + jQuery('body').css({cursor:'auto'}); _aoi.triggerEvent(EGW_AI_DRAG_OUT,{event: event,ui:ui}); }, @@ -672,8 +672,8 @@ function egwDropActionImplementation() { var node = _aoi.getDOMNode(); - if (node && $j(node).data("uiDroppable")) { - $j(node).droppable("destroy"); + if (node && jQuery(node).data("uiDroppable")) { + jQuery(node).droppable("destroy"); } }; diff --git a/api/js/egw_action/egw_action_popup.js b/api/js/egw_action/egw_action_popup.js index 0c397c9a76..b7ac59f6a4 100644 --- a/api/js/egw_action/egw_action_popup.js +++ b/api/js/egw_action/egw_action_popup.js @@ -165,7 +165,7 @@ function egwPopupActionImplementation() }; if (egwIsMobile()) { - $j(_node).bind('click', defaultHandler); + jQuery(_node).bind('click', defaultHandler); } else { _node.ondblclick = defaultHandler; } @@ -301,8 +301,8 @@ function egwPopupActionImplementation() }; // Safari still needs the taphold to trigger contextmenu // Chrome has default event on touch and hold which acts like right click - $j(_node).bind('taphold', contextHandler); - $j(_node).on('contextmenu', contextHandler); + jQuery(_node).bind('taphold', contextHandler); + jQuery(_node).on('contextmenu', contextHandler); }; ai.doRegisterAction = function(_aoi, _callback, _context) @@ -353,8 +353,8 @@ function egwPopupActionImplementation() // Calculate context menu position from the given DOM-Node var node = _context; - x = $j(node).offset().left; - y = $j(node).offset().top; + x = jQuery(node).offset().left; + y = jQuery(node).offset().top; _context = {"posx": x, "posy": y}; } @@ -727,7 +727,7 @@ function egwPopupActionImplementation() if(document.queryCommandSupported('copy')) { - $j(action.data.target).trigger('copy'); + jQuery(action.data.target).trigger('copy'); } },true); clipboard_action.group = 2.5; @@ -735,9 +735,9 @@ function egwPopupActionImplementation() var os_clipboard_caption = this._context.event.originalEvent.target.innerHTML.trim(); clipboard_action.set_caption(egw.lang('Copy "%1"', os_clipboard_caption.length>20 ? os_clipboard_caption.substring(0,20)+'...':os_clipboard_caption)); clipboard_action.data.target = this._context.event.originalEvent.target; - $j(clipboard_action.data.target).off('copy').on('copy', function(event) { + jQuery(clipboard_action.data.target).off('copy').on('copy', function(event) { // Cancel any no-select css - var target = $j(clipboard_action.data.target); + var target = jQuery(clipboard_action.data.target); var old_select = target.css('user-select'); target.css('user-select','all'); @@ -754,12 +754,12 @@ function egwPopupActionImplementation() // only supported in IE, and make sure there's clipboardData object if (typeof event.target.setActive !='undefined' && window.clipboardData) { - window.clipboardData.setData('Text', $j(clipboard_action.data.target).text().trim()); + window.clipboardData.setData('Text', jQuery(clipboard_action.data.target).text().trim()); } if(event.clipboardData) { - event.clipboardData.setData('text/plain', $j(clipboard_action.data.target).text().trim()); - event.clipboardData.setData('text/html', $j(clipboard_action.data.target).html()); + event.clipboardData.setData('text/plain', jQuery(clipboard_action.data.target).text().trim()); + event.clipboardData.setData('text/html', jQuery(clipboard_action.data.target).html()); } // Show fail message, just in case egw.message(egw.lang('Use Ctrl-C/Cmd-C to copy')); diff --git a/api/js/egw_action/egw_dragdrop_dhtmlx_tree.js b/api/js/egw_action/egw_dragdrop_dhtmlx_tree.js index 2c2b86ae47..f6d14ae61c 100644 --- a/api/js/egw_action/egw_dragdrop_dhtmlx_tree.js +++ b/api/js/egw_action/egw_dragdrop_dhtmlx_tree.js @@ -25,7 +25,7 @@ function dhtmlxTree_getNode(_tree, _itemId) { { // Get the outer html table node of the tree node - return the first // "tr" child of the element - return $j("tr:first", node.htmlNode); + return jQuery("tr:first", node.htmlNode); } } @@ -45,11 +45,11 @@ function dhtmlxtreeItemAOI(_tree, _itemId) aoi.doTriggerEvent = function(_event) { if (_event == EGW_AI_DRAG_OVER) { - $j(this.node).addClass("draggedOver"); + jQuery(this.node).addClass("draggedOver"); } if (_event == EGW_AI_DRAG_OUT) { - $j(this.node).removeClass("draggedOver"); + jQuery(this.node).removeClass("draggedOver"); } } diff --git a/api/js/egw_action/egw_keymanager.js b/api/js/egw_action/egw_keymanager.js index 469c587a0a..2f3249b1be 100644 --- a/api/js/egw_action/egw_keymanager.js +++ b/api/js/egw_action/egw_keymanager.js @@ -145,11 +145,11 @@ function _egw_nodeIsInInput(_node) /** * Register the onkeypress handler on the document */ -$j(document).ready(function() { +jQuery(document).ready(function() { // Fetch the key down event and translate it into browser-independent and // easy to use key codes and shift states - $j(document).keydown( function(e) { + jQuery(document).keydown( function(e) { // Translate the given key code and make it valid var keyCode = e.which; @@ -178,7 +178,7 @@ $j(document).ready(function() { /** * Required to catch the context menu */ -$j(window).on("contextmenu",document, function(event) { +jQuery(window).on("contextmenu",document, function(event) { // Check for actual key press if(!(event.originalEvent.x == 1 && event.originalEvent.y == 1)) return true; if(!event.ctrlKey && egw_keyHandler(EGW_KEY_MENU, event.shiftKey, event.ctrlKey || event.metaKey, event.altKey)) diff --git a/api/js/egw_action/test/js/jquery.js b/api/js/egw_action/test/js/jquery.js index 7cf5af7810..8d1b8722aa 100644 --- a/api/js/egw_action/test/js/jquery.js +++ b/api/js/egw_action/test/js/jquery.js @@ -1071,7 +1071,7 @@ function doScrollCheck() { } // Expose jQuery to the global object -return (window.jQuery = window.$j = jQuery); +return (window.jQuery = window.jQuery = jQuery); })(); diff --git a/api/js/egw_json.js b/api/js/egw_json.js index 75ee1a1c87..00cdedeebe 100644 --- a/api/js/egw_json.js +++ b/api/js/egw_json.js @@ -153,13 +153,13 @@ var egw_json_files = {}; /** * Initialize the egw_json_files object with all files which are already bound in */ -$j(document).ready(function() { - $j("script, link").each(function() { +jQuery(document).ready(function() { + jQuery("script, link").each(function() { var file = false; - if ($j(this).attr("src")) { - file = $j(this).attr("src"); - } else if ($j(this).attr("href")) { - file = $j(this).attr("href"); + if (jQuery(this).attr("src")) { + file = jQuery(this).attr("src"); + } else if (jQuery(this).attr("href")) { + file = jQuery(this).attr("href"); } if (file) { egw_json_files[file] = true; @@ -327,7 +327,7 @@ Use egw.json(menuaction, parameters [,callback, context, async, sender]).sendReq }; //Send the request via the jquery AJAX interface to the server - this.request = $j.ajax({url: this.url, + this.request = jQuery.ajax({url: this.url, async: is_async, context: this, data: request_obj, @@ -514,7 +514,7 @@ egw_json_request.prototype.handleResponse = function(data, textStatus, XMLHttpRe { try { - var jQueryObject = $j(res.data.select, this.context); + var jQueryObject = jQuery(res.data.select, this.context); jQueryObject[res.data.func].apply(jQueryObject, res.data.parms); } catch (e) @@ -764,7 +764,7 @@ function _egw_json_getFormValues(serialized, children, _filterClass) if (typeof child.childNodes != "undefined") _egw_json_getFormValues(serialized, child.childNodes, _filterClass); - if ((!_filterClass || $j(child).hasClass(_filterClass)) && typeof child.name != "undefined") + if ((!_filterClass || jQuery(child).hasClass(_filterClass)) && typeof child.name != "undefined") { //alert('_egw_json_getFormValues(,,'+_filterClass+') calling _egw_json_getFormValue for name='+child.name+', class='+child.class+', value='+child.value); _egw_json_getFormValue(serialized, child); diff --git a/api/js/etemplate/et2_core_DOMWidget.js b/api/js/etemplate/et2_core_DOMWidget.js index 0f987c7fe9..6411b1b405 100644 --- a/api/js/etemplate/et2_core_DOMWidget.js +++ b/api/js/etemplate/et2_core_DOMWidget.js @@ -257,7 +257,7 @@ var et2_DOMWidget = (function(){ "use strict"; return et2_widget.extend(et2_IDOM set_parent_node: function(_node) { if(typeof _node == "string") { - var parent = $j('#'+_node); + var parent = jQuery('#'+_node); if(parent.length == 0 ) { this.egw().debug('warn','Unable to find DOM parent node with ID "%s" for widget %o.',_node,this); @@ -361,11 +361,11 @@ var et2_DOMWidget = (function(){ "use strict"; return et2_widget.extend(et2_IDOM if (_value) { - $j(node).hide(); + jQuery(node).hide(); } else { - $j(node).show(); + jQuery(node).show(); } } }, @@ -376,7 +376,7 @@ var et2_DOMWidget = (function(){ "use strict"; return et2_widget.extend(et2_IDOM var node = this.getDOMNode(this); if (node) { - $j(node).css("width", _value); + jQuery(node).css("width", _value); } }, @@ -386,7 +386,7 @@ var et2_DOMWidget = (function(){ "use strict"; return et2_widget.extend(et2_IDOM var node = this.getDOMNode(this); if (node) { - $j(node).css("height", _value); + jQuery(node).css("height", _value); } }, @@ -396,9 +396,9 @@ var et2_DOMWidget = (function(){ "use strict"; return et2_widget.extend(et2_IDOM { if (this["class"]) { - $j(node).removeClass(this["class"]); + jQuery(node).removeClass(this["class"]); } - $j(node).addClass(_value); + jQuery(node).addClass(_value); } this["class"] = _value; @@ -410,7 +410,7 @@ var et2_DOMWidget = (function(){ "use strict"; return et2_widget.extend(et2_IDOM var node = this.getDOMNode(this); if (node) { - $j(node).css("overflow", _value); + jQuery(node).css("overflow", _value); } }, @@ -423,7 +423,7 @@ var et2_DOMWidget = (function(){ "use strict"; return et2_widget.extend(et2_IDOM for(var i=0; i < pairs.length; ++i) { var name_value = pairs[i].split(':'); - $j(node).attr('data-'+name_value[0], name_value[1]); + jQuery(node).attr('data-'+name_value[0], name_value[1]); } } }, @@ -818,10 +818,10 @@ function et2_action_object_impl(widget, node) switch(_event) { case EGW_AI_DRAG_OVER: - $j(this.node).addClass("ui-state-active"); + jQuery(this.node).addClass("ui-state-active"); break; case EGW_AI_DRAG_OUT: - $j(this.node).removeClass("ui-state-active"); + jQuery(this.node).removeClass("ui-state-active"); break; } }; diff --git a/api/js/etemplate/et2_core_baseWidget.js b/api/js/etemplate/et2_core_baseWidget.js index c3270f45f0..3e7b1fd334 100644 --- a/api/js/etemplate/et2_core_baseWidget.js +++ b/api/js/etemplate/et2_core_baseWidget.js @@ -107,7 +107,7 @@ var et2_baseWidget = (function(){ "use strict"; return et2_DOMWidget.extend(et2_ this.hideMessage(false, true); // Create the message div and add it to the "surroundings" manager - this._messageDiv = $j(document.createElement("div")) + this._messageDiv = jQuery(document.createElement("div")) .addClass("message") .addClass(_type) .addClass(_floating ? "floating" : "") @@ -187,7 +187,7 @@ var et2_baseWidget = (function(){ "use strict"; return et2_DOMWidget.extend(et2_ // Remove the binding to the click handler if (this.node) { - $j(this.node).unbind("click.et2_baseWidget"); + jQuery(this.node).unbind("click.et2_baseWidget"); } this._super.apply(this, arguments); @@ -199,10 +199,10 @@ var et2_baseWidget = (function(){ "use strict"; return et2_DOMWidget.extend(et2_ // Add the binding for the click handler if (this.node) { - $j(this.node).bind("click.et2_baseWidget", this, function(e) { + jQuery(this.node).bind("click.et2_baseWidget", this, function(e) { return e.data.click.call(e.data, e, this); }); - if (typeof this.onclick == 'function') $j(this.node).addClass('et2_clickable'); + if (typeof this.onclick == 'function') jQuery(this.node).addClass('et2_clickable'); } // Update the statustext @@ -262,7 +262,7 @@ var et2_baseWidget = (function(){ "use strict"; return et2_DOMWidget.extend(et2_ this.statustext = _value; //Get the domnode the tooltip should be attached to - var elem = $j(this.getTooltipElement()); + var elem = jQuery(this.getTooltipElement()); if (elem) { @@ -354,15 +354,15 @@ var et2_placeholder = (function(){ "use strict"; return et2_baseWidget.extend([e this.visible = false; // Create the placeholder div - this.placeDiv = $j(document.createElement("span")) + this.placeDiv = jQuery(document.createElement("span")) .addClass("et2_placeholder"); - var headerNode = $j(document.createElement("span")) + var headerNode = jQuery(document.createElement("span")) .text(this._type || "") .addClass("et2_caption") .appendTo(this.placeDiv); - var attrsCntr = $j(document.createElement("span")) + var attrsCntr = jQuery(document.createElement("span")) .appendTo(this.placeDiv) .hide(); @@ -384,7 +384,7 @@ var et2_placeholder = (function(){ "use strict"; return et2_baseWidget.extend([e { if (typeof this.attrNodes[key] == "undefined") { - this.attrNodes[key] = $j(document.createElement("span")) + this.attrNodes[key] = jQuery(document.createElement("span")) .addClass("et2_attr"); attrsCntr.append(this.attrNodes[key]); } diff --git a/api/js/etemplate/et2_core_common.js b/api/js/etemplate/et2_core_common.js index fc1f454722..878b913ada 100644 --- a/api/js/etemplate/et2_core_common.js +++ b/api/js/etemplate/et2_core_common.js @@ -613,7 +613,7 @@ function et2_insertLinkText(_text, _node, _target) egw.debug("warn", "et2_activateLinks gave bad data", s, _node, _target); s.href = ""; } - var a = $j(document.createElement("a")) + var a = jQuery(document.createElement("a")) .attr("href", s.href) .text(s.text); diff --git a/api/js/etemplate/et2_core_inputWidget.js b/api/js/etemplate/et2_core_inputWidget.js index c11815ca0f..cd9ea7da19 100644 --- a/api/js/etemplate/et2_core_inputWidget.js +++ b/api/js/etemplate/et2_core_inputWidget.js @@ -81,8 +81,8 @@ var et2_inputWidget = (function(){ "use strict"; return et2_valueWidget.extend([ var node = this.getInputNode(); if (node) { - $j(node).unbind("change.et2_inputWidget"); - $j(node).unbind("focus"); + jQuery(node).unbind("change.et2_inputWidget"); + jQuery(node).unbind("focus"); } this._super.apply(this, arguments); @@ -113,7 +113,7 @@ var et2_inputWidget = (function(){ "use strict"; return et2_valueWidget.extend([ var node = this.getInputNode(); if (node) { - $j(node) + jQuery(node) .off('.et2_inputWidget') .bind("change.et2_inputWidget", this, function(e) { e.data.change.call(e.data, this); @@ -125,13 +125,13 @@ var et2_inputWidget = (function(){ "use strict"; return et2_valueWidget.extend([ this._super.apply(this,arguments); -// $j(this.getInputNode()).attr("novalidate","novalidate"); // Stop browser from getting involved -// $j(this.getInputNode()).validator(); +// jQuery(this.getInputNode()).attr("novalidate","novalidate"); // Stop browser from getting involved +// jQuery(this.getInputNode()).validator(); }, detatchFromDOM: function() { // if(this.getInputNode()) { -// $j(this.getInputNode()).data("validator").destroy(); +// jQuery(this.getInputNode()).data("validator").destroy(); // } this._super.apply(this,arguments); }, @@ -183,10 +183,10 @@ var et2_inputWidget = (function(){ "use strict"; return et2_valueWidget.extend([ var node = this.getInputNode(); if (node) { - $j(node).val(_value); + jQuery(node).val(_value); if(this.isAttached() && this._oldValue !== et2_no_init && this._oldValue !== _value) { - $j(node).change(); + jQuery(node).change(); } } this._oldValue = _value; @@ -220,7 +220,7 @@ var et2_inputWidget = (function(){ "use strict"; return et2_valueWidget.extend([ if (node) { if(_value && !this.options.readonly) { - $j(node).attr("required", "required"); + jQuery(node).attr("required", "required"); } else { node.removeAttribute("required"); } @@ -235,12 +235,12 @@ var et2_inputWidget = (function(){ "use strict"; return et2_valueWidget.extend([ if (_value === false) { this.hideMessage(); - $j(node).removeClass("invalid"); + jQuery(node).removeClass("invalid"); } else { this.showMessage(_value, "validation_error"); - $j(node).addClass("invalid"); + jQuery(node).addClass("invalid"); // If on a tab, switch to that tab so user can see it var widget = this; @@ -274,7 +274,7 @@ var et2_inputWidget = (function(){ "use strict"; return et2_valueWidget.extend([ var node = this.getInputNode(); if (node) { - var val = $j(node).val(); + var val = jQuery(node).val(); return val; } diff --git a/api/js/etemplate/et2_core_interfaces.js b/api/js/etemplate/et2_core_interfaces.js index c8137e2a06..dc87241236 100644 --- a/api/js/etemplate/et2_core_interfaces.js +++ b/api/js/etemplate/et2_core_interfaces.js @@ -23,7 +23,7 @@ var et2_IDOMNode = new Interface({ * a plain DOM node. If you want to return an jQuery object as you receive * it with * - * obj = $j(node); + * obj = jQuery(node); * * simply return obj[0]; * diff --git a/api/js/etemplate/et2_core_valueWidget.js b/api/js/etemplate/et2_core_valueWidget.js index ca64b5eef7..3b1accee5e 100644 --- a/api/js/etemplate/et2_core_valueWidget.js +++ b/api/js/etemplate/et2_core_valueWidget.js @@ -81,7 +81,7 @@ var et2_valueWidget = (function(){ "use strict"; return et2_baseWidget.extend( // Create the label container if it didn't exist yet if (this._labelContainer == null) { - this._labelContainer = $j(document.createElement("label")) + this._labelContainer = jQuery(document.createElement("label")) .addClass("et2_label"); this.getSurroundings().insertDOMNode(this._labelContainer[0]); } diff --git a/api/js/etemplate/et2_dataview.js b/api/js/etemplate/et2_dataview.js index 3d467df16f..57789dccab 100644 --- a/api/js/etemplate/et2_dataview.js +++ b/api/js/etemplate/et2_dataview.js @@ -61,7 +61,7 @@ var et2_dataview = (function(){ "use strict"; return Class.extend({ init: function(_parentNode, _egw) { // Copy the arguments - this.parentNode = $j(_parentNode); + this.parentNode = jQuery(_parentNode); this.egw = _egw; // Initialize some variables @@ -235,15 +235,15 @@ var et2_dataview = (function(){ "use strict"; return Class.extend({ */ - this.containerTr = $j(document.createElement("tr")); - this.headTr = $j(document.createElement("tr")); + this.containerTr = jQuery(document.createElement("tr")); + this.headTr = jQuery(document.createElement("tr")); - this.thead = $j(document.createElement("thead")) + this.thead = jQuery(document.createElement("thead")) .append(this.headTr); - this.tbody = $j(document.createElement("tbody")) + this.tbody = jQuery(document.createElement("tbody")) .append(this.containerTr); - this.table = $j(document.createElement("table")) + this.table = jQuery(document.createElement("table")) .addClass("egwGridView_outer") .append(this.thead, this.tbody) .appendTo(this.parentNode); @@ -330,14 +330,14 @@ var et2_dataview = (function(){ "use strict"; return Class.extend({ var subBorder = 0; var subHBorder = 0; /* - if ($j.browser.mozilla) + if (jQuery.browser.mozilla) { - var maj = $j.browser.version.split(".")[0]; + var maj = jQuery.browser.version.split(".")[0]; if (maj < 2) { subBorder = 1; // Versions <= FF 3.6 } } - if ($j.browser.webkit) + if (jQuery.browser.webkit) { if (!first) { @@ -345,7 +345,7 @@ var et2_dataview = (function(){ "use strict"; return Class.extend({ } subHBorder = 1; } - if (($j.browser.msie || $j.browser.opera) && first) + if ((jQuery.browser.msie || jQuery.browser.opera) && first) { subBorder = -1; } @@ -399,11 +399,11 @@ var et2_dataview = (function(){ "use strict"; return Class.extend({ var col = this.columns[i]; // Create the column header and the container element - var cont = $j(document.createElement("div")) + var cont = jQuery(document.createElement("div")) .addClass("innerContainer") .addClass(col.divClass); - var column = $j(document.createElement("th")) + var column = jQuery(document.createElement("th")) .addClass(col.tdClass) .attr("align", "left") .append(cont) @@ -472,12 +472,12 @@ var et2_dataview = (function(){ "use strict"; return Class.extend({ */ _buildSelectCol: function() { // Build the "select columns" icon - this.selectColIcon = $j(document.createElement("span")) + this.selectColIcon = jQuery(document.createElement("span")) .addClass("selectcols") - .css('display', 'inline-block'); // otherwise $j('span.selectcols',this.dataview.headTr).show() set it to "inline" causing it to not show up because 0 height + .css('display', 'inline-block'); // otherwise jQuery('span.selectcols',this.dataview.headTr).show() set it to "inline" causing it to not show up because 0 height // Build the option column - this.selectCol = $j(document.createElement("th")) + this.selectCol = jQuery(document.createElement("th")) .addClass("optcol") .append(this.selectColIcon) // Toggle display of option popup @@ -511,7 +511,7 @@ var et2_dataview = (function(){ "use strict"; return Class.extend({ this.grid = new et2_dataview_grid(null, null, this.egw, this.rowProvider, 19); // Insert the grid into the DOM-Tree - var tr = $j(this.grid._nodes[0]); + var tr = jQuery(this.grid._nodes[0]); this.containerTr.replaceWith(tr); this.containerTr = tr; }, @@ -526,7 +526,7 @@ var et2_dataview = (function(){ "use strict"; return Class.extend({ { // Clone the table and attach it to the outer body tag var clone = this.table.clone(); - $j(window.top.document.getElementsByTagName("body")[0]) + jQuery(window.top.document.getElementsByTagName("body")[0]) .append(clone); // Read the scrollbar width @@ -553,18 +553,18 @@ var et2_dataview = (function(){ "use strict"; return Class.extend({ // Create a temporary td and two divs, which are inserted into the // DOM-Tree. The outer div has a fixed size and "overflow" set to auto. // When the second div is inserted, it will be forced to display a scrollbar. - var div_inner = $j(document.createElement("div")) + var div_inner = jQuery(document.createElement("div")) .css("height", "1000px"); - var div_outer = $j(document.createElement("div")) + var div_outer = jQuery(document.createElement("div")) .css("height", "100px") .css("width", "100px") .css("overflow", "auto") .append(div_inner); - var td = $j(document.createElement("td")) + var td = jQuery(document.createElement("td")) .append(div_outer); // Store the scrollbar width statically. - $j("tbody tr", _table).append(td); + jQuery("tbody tr", _table).append(td); var width = Math.max(10, div_outer.outerWidth() - div_inner.outerWidth()); // Remove the elements again @@ -578,14 +578,14 @@ var et2_dataview = (function(){ "use strict"; return Class.extend({ */ _getHeaderBorderWidth: function(_table) { // Create a temporary th which is appended to the outer thead row - var cont = $j(document.createElement("div")) + var cont = jQuery(document.createElement("div")) .addClass("innerContainer"); - var th = $j(document.createElement("th")) + var th = jQuery(document.createElement("th")) .append(cont); // Insert the th into the document tree - $j("thead tr", _table).append(th); + jQuery("thead tr", _table).append(th); // Calculate the total border width var width = th.outerWidth(true) - cont.width(); @@ -601,14 +601,14 @@ var et2_dataview = (function(){ "use strict"; return Class.extend({ */ _getColumnBorderWidth : function(_table) { // Create a temporary th which is appended to the outer thead row - var cont = $j(document.createElement("div")) + var cont = jQuery(document.createElement("div")) .addClass("innerContainer"); - var td = $j(document.createElement("td")) + var td = jQuery(document.createElement("td")) .append(cont); // Insert the th into the document tree - $j("tbody tr", _table).append(td); + jQuery("tbody tr", _table).append(td); // Calculate the total border width _table.addClass("egwGridView_grid"); diff --git a/api/js/etemplate/et2_dataview_controller.js b/api/js/etemplate/et2_dataview_controller.js index 8bcbe6cec5..77f0c58b39 100644 --- a/api/js/etemplate/et2_dataview_controller.js +++ b/api/js/etemplate/et2_dataview_controller.js @@ -266,7 +266,7 @@ var et2_dataview_controller = (function(){ "use strict"; return Class.extend({ */ getRowByNode: function(node) { // Whatever the node, find a TR - var row_node = $j(node).closest('tr'); + var row_node = jQuery(node).closest('tr'); var row = false // Check index map - simple case @@ -371,7 +371,7 @@ var et2_dataview_controller = (function(){ "use strict"; return Class.extend({ // Get the average height, the "-5" derives from the td padding var avg = Math.round(this._grid.getAverageHeight() - 5) + "px"; var prototype = this._grid.getRowProvider().getPrototype("loading"); - $j("div", prototype).css("height", avg); + jQuery("div", prototype).css("height", avg); var node = _entry.row.getJNode(); node.empty(); node.append(prototype.children()); @@ -629,13 +629,13 @@ var et2_dataview_controller = (function(){ "use strict"; return Class.extend({ var d = this.self.getDepth(); if (d > 0) { - $j(tr).addClass("subentry"); - $j("td:first",tr).children("div").last().addClass("level_" + d + " indentation"); + jQuery(tr).addClass("subentry"); + jQuery("td:first",tr).children("div").last().addClass("level_" + d + " indentation"); if(this.entry.idx == 0) { // Set the CSS for the level - required so columns line up - var indent = $j("").appendTo('body'); + var indent = jQuery("").appendTo('body'); egw.css(".subentry td div.innerContainer.level_"+d, "margin-right:" + (parseInt(indent.css("margin-right")) * d) + "px" ); @@ -879,7 +879,7 @@ var et2_dataview_controller = (function(){ "use strict"; return Class.extend({ } else { - var row = $j(".egwGridView_empty",this.self._grid.innerTbody).remove(); + var row = jQuery(".egwGridView_empty",this.self._grid.innerTbody).remove(); this.self._selectionMgr.unregisterRow("",0,row.get(0)); } @@ -899,13 +899,13 @@ var et2_dataview_controller = (function(){ "use strict"; return Class.extend({ */ _emptyRow: function() { - $j(".egwGridView_empty",this._grid.innerTbody).remove(); + jQuery(".egwGridView_empty",this._grid.innerTbody).remove(); if(typeof this._grid._rowProvider != "undefined" && this._grid._rowProvider.getPrototype("empty")) { var placeholder = this._grid._rowProvider.getPrototype("empty"); - if($j("td",placeholder).length == 1) + if(jQuery("td",placeholder).length == 1) { - $j("td",placeholder).css("width",this._grid.outerCell.width() + "px") + jQuery("td",placeholder).css("width",this._grid.outerCell.width() + "px") } placeholder.appendTo(this._grid.innerTbody); diff --git a/api/js/etemplate/et2_dataview_view_aoi.js b/api/js/etemplate/et2_dataview_view_aoi.js index 0df1547167..a2486bd777 100644 --- a/api/js/etemplate/et2_dataview_view_aoi.js +++ b/api/js/etemplate/et2_dataview_view_aoi.js @@ -40,7 +40,7 @@ function et2_dataview_rowAOI(_node) aoi.selectMode = EGW_SELECTMODE_DEFAULT; - aoi.checkBox = null; //($j(":checkbox", aoi.node))[0]; + aoi.checkBox = null; //(jQuery(":checkbox", aoi.node))[0]; // Rows without a checkbox OR an id set are unselectable aoi.doGetDOMNode = function() { @@ -49,7 +49,7 @@ function et2_dataview_rowAOI(_node) // Prevent the browser from selecting the content of the element, when // a special key is pressed. - $j(_node).mousedown(egwPreventSelect); + jQuery(_node).mousedown(egwPreventSelect); /** * Now append some action code to the node @@ -106,7 +106,7 @@ function et2_dataview_rowAOI(_node) }; if (egwIsMobile()) { - $j(_node).swipe({ + jQuery(_node).swipe({ allowPageScroll: "vertical", longTapThreshold: 10, swipe: function (event, direction, distance) @@ -125,10 +125,10 @@ function et2_dataview_rowAOI(_node) }); } else { - $j(_node).click(selectHandler); + jQuery(_node).click(selectHandler); } - $j(aoi.checkBox).change(function() { + jQuery(aoi.checkBox).change(function() { aoi.updateState(EGW_AO_STATE_SELECTED, this.checked, EGW_AO_SHIFT_STATE_MULTI); }); @@ -140,9 +140,9 @@ function et2_dataview_rowAOI(_node) this.checkBox.checked = selected; } - $j(this.node).toggleClass('focused', + jQuery(this.node).toggleClass('focused', egwBitIsSet(_state, EGW_AO_STATE_FOCUSED)); - $j(this.node).toggleClass('selected', + jQuery(this.node).toggleClass('selected', selected); }; diff --git a/api/js/etemplate/et2_dataview_view_grid.js b/api/js/etemplate/et2_dataview_view_grid.js index 73a332f413..d2b9b6c01e 100644 --- a/api/js/etemplate/et2_dataview_view_grid.js +++ b/api/js/etemplate/et2_dataview_view_grid.js @@ -1237,7 +1237,7 @@ var et2_dataview_grid = (function(){ "use strict"; return et2_dataview_container if (this._map.length === 0) { // Add a dummy element to the grid - var dummy = $j(document.createElement("tr")); + var dummy = jQuery(document.createElement("tr")); this.innerTbody.append(dummy); // Append the spacer to the grid @@ -1324,9 +1324,9 @@ var et2_dataview_grid = (function(){ "use strict"; return et2_dataview_container */ _createNodes: function() { - this.tr = $j(document.createElement("tr")); + this.tr = jQuery(document.createElement("tr")); - this.outerCell = $j(document.createElement("td")) + this.outerCell = jQuery(document.createElement("td")) .addClass("frame") .attr("colspan", this._rowProvider.getColumnCount() + (this._parentGrid ? 0 : 1)) @@ -1336,7 +1336,7 @@ var et2_dataview_grid = (function(){ "use strict"; return et2_dataview_container this.scrollarea = null; if (this._parentGrid == null) { - this.scrollarea = $j(document.createElement("div")) + this.scrollarea = jQuery(document.createElement("div")) .addClass("egwGridView_scrollarea") .scroll(this, function(e) { @@ -1374,15 +1374,15 @@ var et2_dataview_grid = (function(){ "use strict"; return et2_dataview_container } // Create the inner table - var table = $j(document.createElement("table")) + var table = jQuery(document.createElement("table")) .addClass("egwGridView_grid") .appendTo(this.scrollarea ? this.scrollarea : this.outerCell); - this.innerTbody = $j(document.createElement("tbody")) + this.innerTbody = jQuery(document.createElement("tbody")) .appendTo(table); // Set the tr as container element - this.appendNode($j(this.tr[0])); + this.appendNode(jQuery(this.tr[0])); } });}).call(this); diff --git a/api/js/etemplate/et2_dataview_view_resizeable.js b/api/js/etemplate/et2_dataview_view_resizeable.js index 06ae7f96ef..97511cdf59 100644 --- a/api/js/etemplate/et2_dataview_view_resizeable.js +++ b/api/js/etemplate/et2_dataview_view_resizeable.js @@ -54,14 +54,14 @@ } // Indicate resizing is in progress - $j(_outerElem).addClass('egwResizing'); + jQuery(_outerElem).addClass('egwResizing'); // Reset the "didResize" flag didResize = false; // Create the resize helper var left = _elem.offset().left; - helper = $j(document.createElement("div")) + helper = jQuery(document.createElement("div")) .addClass("egwResizeHelper") .appendTo("body") .css("top", _elem.offset().top + "px") @@ -69,7 +69,7 @@ .css("height", _outerElem.outerHeight(true) + "px"); // Create the overlay which will be catching the mouse movements - overlay = $j(document.createElement("div")) + overlay = jQuery(document.createElement("div")) .addClass("egwResizeOverlay") .bind("mousemove", function(e) { @@ -99,7 +99,7 @@ function stopResize(_outerElem) { - $j(_outerElem).removeClass('egwResizing'); + jQuery(_outerElem).removeClass('egwResizing'); if (helper != null) { helper.remove(); diff --git a/api/js/etemplate/et2_dataview_view_row.js b/api/js/etemplate/et2_dataview_view_row.js index 4ca69b4678..adfb69f670 100644 --- a/api/js/etemplate/et2_dataview_view_row.js +++ b/api/js/etemplate/et2_dataview_view_row.js @@ -33,7 +33,7 @@ var et2_dataview_row = (function(){ "use strict"; return et2_dataview_container. this._super(_parent); // Create the outer "tr" tag and append it to the container - this.tr = $j(document.createElement("tr")); + this.tr = jQuery(document.createElement("tr")); this.appendNode(this.tr); // Grid row which gets expanded when clicking on the corresponding @@ -65,7 +65,7 @@ var et2_dataview_row = (function(){ "use strict"; return et2_dataview_container. // Create the tr and the button if this has not been done yet if (!this.expansionButton) { - this.expansionButton = $j(document.createElement("span")); + this.expansionButton = jQuery(document.createElement("span")); this.expansionButton.addClass("arrow closed"); } @@ -76,7 +76,7 @@ var et2_dataview_row = (function(){ "use strict"; return et2_dataview_container. e.stopImmediatePropagation(); }); - $j("td:first", this.tr).prepend(this.expansionButton); + jQuery("td:first", this.tr).prepend(this.expansionButton); } else { @@ -157,7 +157,7 @@ var et2_dataview_row = (function(){ "use strict"; return et2_dataview_container. // Toggle the visibility of the expansion tr this.expansionVisible = !this.expansionVisible; - $j(this.expansionContainer._nodes[0]).toggle(this.expansionVisible); + jQuery(this.expansionContainer._nodes[0]).toggle(this.expansionVisible); // Set the class of the arrow if (this.expansionVisible) @@ -183,7 +183,7 @@ var et2_dataview_row = (function(){ "use strict"; return et2_dataview_container. && this.expansionContainer.implements(et2_dataview_IViewRange)) { // Substract the height of the own row from the container - var oh = $j(this._nodes[0]).height(); + var oh = jQuery(this._nodes[0]).height(); _range.top -= oh; // Proxy the setViewRange call to the expansion container diff --git a/api/js/etemplate/et2_dataview_view_rowProvider.js b/api/js/etemplate/et2_dataview_view_rowProvider.js index 0c3cc2c0be..ec05855a84 100644 --- a/api/js/etemplate/et2_dataview_view_rowProvider.js +++ b/api/js/etemplate/et2_dataview_view_rowProvider.js @@ -84,12 +84,12 @@ var et2_dataview_rowProvider = (function(){ "use strict"; return Class.extend( _createFullRowPrototype: function() { - var tr = $j(document.createElement("tr")); - var td = $j(document.createElement("td")) + var tr = jQuery(document.createElement("tr")); + var td = jQuery(document.createElement("td")) .addClass(this._outerId + "_td_fullRow") .attr("colspan", this._columnIds.length) .appendTo(tr); - var div = $j(document.createElement("div")) + var div = jQuery(document.createElement("div")) .addClass(this._outerId + "_div_fullRow") .appendTo(td); @@ -97,15 +97,15 @@ var et2_dataview_rowProvider = (function(){ "use strict"; return Class.extend( }, _createDefaultPrototype: function() { - var tr = $j(document.createElement("tr")); + var tr = jQuery(document.createElement("tr")); // Append a td for each column for (var i = 0; i < this._columnIds.length; i++) { - var td = $j(document.createElement("td")) + var td = jQuery(document.createElement("td")) .addClass(this._outerId + "_td_" + this._columnIds[i]) .appendTo(tr); - var div = $j(document.createElement("div")) + var div = jQuery(document.createElement("div")) .addClass(this._outerId + "_div_" + this._columnIds[i]) .addClass("innerContainer") .appendTo(td); @@ -115,12 +115,12 @@ var et2_dataview_rowProvider = (function(){ "use strict"; return Class.extend( }, _createEmptyPrototype: function() { - this._prototypes["empty"] = $j(document.createElement("tr")); + this._prototypes["empty"] = jQuery(document.createElement("tr")); }, _createLoadingPrototype: function() { var fullRow = this.getPrototype("fullRow"); - $j("div", fullRow).addClass("loading"); + jQuery("div", fullRow).addClass("loading"); this._prototypes["loading"] = fullRow; } diff --git a/api/js/etemplate/et2_dataview_view_spacer.js b/api/js/etemplate/et2_dataview_view_spacer.js index 1eb3a71acb..09d82d7093 100644 --- a/api/js/etemplate/et2_dataview_view_spacer.js +++ b/api/js/etemplate/et2_dataview_view_spacer.js @@ -40,7 +40,7 @@ var et2_dataview_spacer = (function(){ "use strict"; return et2_dataview_contain // Get the spacer row and append it to the container this.spacerNode = _rowProvider.getPrototype("spacer", this._createSpacerPrototype, this); - this._phDiv = $j("td", this.spacerNode); + this._phDiv = jQuery("td", this.spacerNode); this.appendNode(this.spacerNode); }, @@ -90,9 +90,9 @@ var et2_dataview_spacer = (function(){ "use strict"; return et2_dataview_contain /* ---- PRIVATE FUNCTIONS ---- */ _createSpacerPrototype: function (_outerId, _columnIds) { - var tr = $j(document.createElement("tr")); + var tr = jQuery(document.createElement("tr")); - var td = $j(document.createElement("td")) + var td = jQuery(document.createElement("td")) .addClass("egwGridView_spacer") .addClass(_outerId + "_spacer_fullRow") .attr("colspan", _columnIds.length) diff --git a/api/js/etemplate/et2_dataview_view_tile.js b/api/js/etemplate/et2_dataview_view_tile.js index 6ee829e648..bbfb04bb30 100644 --- a/api/js/etemplate/et2_dataview_view_tile.js +++ b/api/js/etemplate/et2_dataview_view_tile.js @@ -79,7 +79,7 @@ var et2_dataview_tile = (function(){ "use strict"; return et2_dataview_row.exten invalidate: function() { if(this._inTree && this.tr) { - var template_width = $j('.innerContainer',this.tr).children().outerWidth(true); + var template_width = jQuery('.innerContainer',this.tr).children().outerWidth(true); if(template_width) { diff --git a/api/js/etemplate/et2_extension_customfields.js b/api/js/etemplate/et2_extension_customfields.js index 27923da3a8..d51e470003 100644 --- a/api/js/etemplate/et2_extension_customfields.js +++ b/api/js/etemplate/et2_extension_customfields.js @@ -72,8 +72,8 @@ var et2_customfields_list = (function(){ "use strict"; return et2_valueWidget.ex if(typeof this.options.prefix != 'undefined') this.prefix = this.options.prefix; // Create the table body and the table - this.tbody = $j(document.createElement("tbody")); - this.table = $j(document.createElement("table")) + this.tbody = jQuery(document.createElement("tbody")); + this.table = jQuery(document.createElement("table")) .addClass("et2_grid et2_customfield_list"); this.table.append(this.tbody); @@ -557,8 +557,8 @@ var et2_customfields_list = (function(){ "use strict"; return et2_valueWidget.ex { // Complicated case, a single custom field you get multiple widgets // Handle it all here, since this is the exception - var row = $j('tr',this.tbody).last(); - var cf = $j('td',row); + var row = jQuery('tr',this.tbody).last(); + var cf = jQuery('td',row); // Label in first column, widget in 2nd cf.text(field.label + ""); cf = jQuery(document.createElement("td")) @@ -606,8 +606,8 @@ var et2_customfields_list = (function(){ "use strict"; return et2_valueWidget.ex { // Complicated case, a single custom field you get multiple widgets // Handle it all here, since this is the exception - var row = $j('tr',this.tbody).last(); - var cf = $j('td',row); + var row = jQuery('tr',this.tbody).last(); + var cf = jQuery('td',row); // Label in first column, widget in 2nd cf.text(field.label + ""); @@ -619,7 +619,7 @@ var et2_customfields_list = (function(){ "use strict"; return et2_valueWidget.ex // This controls where the widget is placed in the DOM this.rows[attrs.id] = cf[0]; - $j(widget.getDOMNode(widget)).css('vertical-align','top'); + jQuery(widget.getDOMNode(widget)).css('vertical-align','top'); // Add a link to existing VFS file var select_attrs = jQuery.extend({}, @@ -638,7 +638,7 @@ var et2_customfields_list = (function(){ "use strict"; return et2_valueWidget.ex // Do not store in the widgets list, one name for multiple widgets would cause problems widget = et2_createWidget(select_attrs.type, select_attrs, this); - $j(widget.getDOMNode(widget)).css('vertical-align','top').prependTo(cf); + jQuery(widget.getDOMNode(widget)).css('vertical-align','top').prependTo(cf); } return false; }, @@ -689,7 +689,7 @@ var et2_customfields_list = (function(){ "use strict"; return et2_valueWidget.ex { // toggle() needs a boolean to do what we want var key = _nodes[i].getAttribute('data-field'); - $j(_nodes[i]).toggle(_values.fields[key] && _values.value[this.prefix + key]?true:false); + jQuery(_nodes[i]).toggle(_values.fields[key] && _values.value[this.prefix + key]?true:false); } } });}).call(this); diff --git a/api/js/etemplate/et2_extension_itempicker_actions.js b/api/js/etemplate/et2_extension_itempicker_actions.js index ab9312bf6f..81c3de63d8 100644 --- a/api/js/etemplate/et2_extension_itempicker_actions.js +++ b/api/js/etemplate/et2_extension_itempicker_actions.js @@ -23,6 +23,6 @@ function itempickerDocumentAction(context, data) + "" + "" + ""; - $j("body").append(form); - $j("#" + formid).submit().remove(); + jQuery("body").append(form); + jQuery("#" + formid).submit().remove(); } diff --git a/api/js/etemplate/et2_extension_nextmatch.js b/api/js/etemplate/et2_extension_nextmatch.js index e344040218..a2ccc1388c 100644 --- a/api/js/etemplate/et2_extension_nextmatch.js +++ b/api/js/etemplate/et2_extension_nextmatch.js @@ -192,12 +192,12 @@ var et2_nextmatch = (function(){ "use strict"; return et2_DOMWidget.extend([et2_ global_data.fields = cfs; } - this.div = $j(document.createElement("div")) + this.div = jQuery(document.createElement("div")) .addClass("et2_nextmatch"); this.header = et2_createWidget("nextmatch_header_bar", {}, this); - this.innerDiv = $j(document.createElement("div")) + this.innerDiv = jQuery(document.createElement("div")) .appendTo(this.div); // Create the dynheight component which dynamically scales the inner @@ -209,7 +209,7 @@ var et2_nextmatch = (function(){ "use strict"; return et2_DOMWidget.extend([et2_ this.dataview = new et2_dataview(this.innerDiv, this.egw()); // Blank placeholder - this.blank = $j(document.createElement("div")) + this.blank = jQuery(document.createElement("div")) .appendTo(this.dataview.table); // We cannot create the grid controller now, as this depends on the grid @@ -229,8 +229,8 @@ var et2_nextmatch = (function(){ "use strict"; return et2_DOMWidget.extend([et2_ this._autorefresh_timer = null; } // Unbind handler used for toggling autorefresh - $j(this.getInstanceManager().DOMContainer.parentNode).off('show.et2_nextmatch'); - $j(this.getInstanceManager().DOMContainer.parentNode).off('hide.et2_nextmatch'); + jQuery(this.getInstanceManager().DOMContainer.parentNode).off('show.et2_nextmatch'); + jQuery(this.getInstanceManager().DOMContainer.parentNode).off('hide.et2_nextmatch'); // Free the grid components this.dataview.free(); @@ -292,7 +292,7 @@ var et2_nextmatch = (function(){ "use strict"; return et2_DOMWidget.extend([et2_ { var self = this; // Register a handler - $j(this.div) + jQuery(this.div) .on('dragenter','.egwGridView_grid tr',function(e) { // Figure out _which_ row var row = self.controller.getRowByNode(this); @@ -322,13 +322,13 @@ var et2_nextmatch = (function(){ "use strict"; return et2_DOMWidget.extend([et2_ } } // stop invalidation in no visible tabs - $j(this.getInstanceManager().DOMContainer.parentNode).on('hide.et2_nextmatch', jQuery.proxy(function(e) { + jQuery(this.getInstanceManager().DOMContainer.parentNode).on('hide.et2_nextmatch', jQuery.proxy(function(e) { if(this.controller && this.controller._grid) { this.controller._grid.doInvalidate = false; } },this)); - $j(this.getInstanceManager().DOMContainer.parentNode).on('show.et2_nextmatch', jQuery.proxy(function(e) { + jQuery(this.getInstanceManager().DOMContainer.parentNode).on('show.et2_nextmatch', jQuery.proxy(function(e) { if(this.controller && this.controller._grid) { this.controller._grid.doInvalidate = true; @@ -580,7 +580,7 @@ var et2_nextmatch = (function(){ "use strict"; return et2_DOMWidget.extend([et2_ } if (!this.div.is(':visible')) // run refresh, once we become visible again { - $j(this.getInstanceManager().DOMContainer.parentNode).one('show.et2_nextmatch', + jQuery(this.getInstanceManager().DOMContainer.parentNode).one('show.et2_nextmatch', // Important to use anonymous function instead of just 'this.refresh' because // of the parameters passed jQuery.proxy(function() {this.refresh();},this) @@ -594,7 +594,7 @@ var et2_nextmatch = (function(){ "use strict"; return et2_DOMWidget.extend([et2_ this.applyFilters(); // Trigger an event so app code can act on it - $j(this).triggerHandler("refresh",[this]); + jQuery(this).triggerHandler("refresh",[this]); return; } @@ -664,7 +664,7 @@ var et2_nextmatch = (function(){ "use strict"; return et2_DOMWidget.extend([et2_ } } // Trigger an event so app code can act on it - $j(this).triggerHandler("refresh",[this,_row_ids,_type]); + jQuery(this).triggerHandler("refresh",[this,_row_ids,_type]); }, /** @@ -1000,7 +1000,7 @@ var et2_nextmatch = (function(){ "use strict"; return et2_DOMWidget.extend([et2_ // If a custom field column was added, throw away cache to deal with // efficient apps that didn't send all custom fields in the first request - var cf_added = $j(changed).filter($j(custom_fields)).length > 0; + var cf_added = jQuery(changed).filter(jQuery(custom_fields)).length > 0; // Save visible columns // 'nextmatch-' prefix is there in preference name, but not in setting, so add it in @@ -1132,11 +1132,11 @@ var et2_nextmatch = (function(){ "use strict"; return et2_DOMWidget.extend([et2_ if(this.options.settings.no_columnselection) { this.dataview.selectColumnsClick = function() {return false;}; - $j('span.selectcols',this.dataview.headTr).hide(); + jQuery('span.selectcols',this.dataview.headTr).hide(); } else { - $j('span.selectcols',this.dataview.headTr).show(); + jQuery('span.selectcols',this.dataview.headTr).show(); this.dataview.selectColumnsClick = function(event) { self._selectColumnsClick(event); }; @@ -1607,10 +1607,10 @@ var et2_nextmatch = (function(){ "use strict"; return et2_DOMWidget.extend([et2_ this._autorefresh_timer = setInterval(jQuery.proxy(this.controller.update, this.controller), time * 1000); // Bind to tab show/hide events, so that we don't bother refreshing in the background - $j(this.getInstanceManager().DOMContainer.parentNode).on('hide.et2_nextmatch', jQuery.proxy(function(e) { + jQuery(this.getInstanceManager().DOMContainer.parentNode).on('hide.et2_nextmatch', jQuery.proxy(function(e) { // Stop window.clearInterval(this._autorefresh_timer); - $j(e.target).off(e); + jQuery(e.target).off(e); // If the autorefresh time is up, bind once to trigger a refresh // (if needed) when tab is activated again @@ -1618,17 +1618,17 @@ var et2_nextmatch = (function(){ "use strict"; return et2_DOMWidget.extend([et2_ // Check in case it was stopped / destroyed since if(!this._autorefresh_timer || !this.getInstanceManager()) return; - $j(this.getInstanceManager().DOMContainer.parentNode).one('show.et2_nextmatch', + jQuery(this.getInstanceManager().DOMContainer.parentNode).one('show.et2_nextmatch', // Important to use anonymous function instead of just 'this.refresh' because // of the parameters passed jQuery.proxy(function() {this.refresh();},this) ); },this), time*1000); },this)); - $j(this.getInstanceManager().DOMContainer.parentNode).on('show.et2_nextmatch', jQuery.proxy(function(e) { + jQuery(this.getInstanceManager().DOMContainer.parentNode).on('show.et2_nextmatch', jQuery.proxy(function(e) { // Start normal autorefresh timer again this._set_autorefresh(this._get_autorefresh()); - $j(e.target).off(e); + jQuery(e.target).off(e); },this)); } }, @@ -1962,7 +1962,7 @@ var et2_nextmatch = (function(){ "use strict"; return et2_DOMWidget.extend([et2_ if(row.row.tr) { // Ignore most of the UI, just use the status indicators - var status = $j(document.createElement("div")) + var status = jQuery(document.createElement("div")) .addClass('et2_link_to') .width(row.row.tr.width()) .position({my: "left top", at: "left top", of: row.row.tr}) @@ -1974,7 +1974,7 @@ var et2_nextmatch = (function(){ "use strict"; return et2_DOMWidget.extend([et2_ link.div.on('link.et2_link_to', function(e, linked) { if(!linked) { - $j("li.success", link.file_upload.progress) + jQuery("li.success", link.file_upload.progress) .removeClass('success').addClass('validation_error'); } else @@ -2153,7 +2153,7 @@ var et2_nextmatch = (function(){ "use strict"; return et2_DOMWidget.extend([et2_ // Add the class, gives more reliable sizing this.div.addClass('print'); // Show it all - $j('.egwGridView_scrollarea',this.div).css('height','auto'); + jQuery('.egwGridView_scrollarea',this.div).css('height','auto'); } // We need more rows if(button === 'dialog[all]' || rows > loaded_count) @@ -2205,9 +2205,9 @@ var et2_nextmatch = (function(){ "use strict"; return et2_DOMWidget.extend([et2_ egw.css(nm.print_row_selector, 'display: none'); // No scrollbar in print view - $j('.egwGridView_scrollarea',this.div).css('overflow-y','hidden'); + jQuery('.egwGridView_scrollarea',this.div).css('overflow-y','hidden'); // Show it all - $j('.egwGridView_scrollarea',this.div).css('height','auto'); + jQuery('.egwGridView_scrollarea',this.div).css('height','auto'); // Grid needs to redraw before it can be printed, so wait window.setTimeout(jQuery.proxy(function() { @@ -2229,7 +2229,7 @@ var et2_nextmatch = (function(){ "use strict"; return et2_DOMWidget.extend([et2_ // Don't need more rows, limit to requested and finish // Show it all - $j('.egwGridView_scrollarea',this.div).css('height','auto'); + jQuery('.egwGridView_scrollarea',this.div).css('height','auto'); // Use CSS to hide all but the requested rows // Prevents us from showing more than requested, if actual height was less than average @@ -2237,7 +2237,7 @@ var et2_nextmatch = (function(){ "use strict"; return et2_DOMWidget.extend([et2_ egw.css(this.print_row_selector, 'display: none'); // No scrollbar in print view - $j('.egwGridView_scrollarea',this.div).css('overflow-y','hidden'); + jQuery('.egwGridView_scrollarea',this.div).css('overflow-y','hidden'); // Give dialog a chance to close, or it will be in the print window.setTimeout(function() {defer.resolve();}, 0); } @@ -2272,7 +2272,7 @@ var et2_nextmatch = (function(){ "use strict"; return et2_DOMWidget.extend([et2_ this.div.removeClass('print'); // Put scrollbar back - $j('.egwGridView_scrollarea',this.div).css('overflow-y',''); + jQuery('.egwGridView_scrollarea',this.div).css('overflow-y',''); // Correct size of grid, and trigger resize to fix it this.controller._grid.setScrollHeight(this.old_height); @@ -2756,7 +2756,7 @@ var et2_nextmatch_header_bar = (function(){ "use strict"; return et2_DOMWidget.e this.favorites = et2_createWidget('favorites', widget_options, this); // Add into header - $j(this.favorites.getDOMNode(this.favorites)).prependTo(egwIsMobile()?this.search_box.find('.nm_favorites_div'):this.right_div); + jQuery(this.favorites.getDOMNode(this.favorites)).prependTo(egwIsMobile()?this.search_box.find('.nm_favorites_div'):this.right_div); }, /** @@ -2846,10 +2846,10 @@ var et2_nextmatch_header_bar = (function(){ "use strict"; return et2_DOMWidget.e if(this.nextmatch.options.settings.lettersearch) { jQuery("td",this.lettersearch).removeClass("lettersearch_active"); - $j(filters.searchletter ? "td#"+filters.searchletter : "td.lettersearch[id='']").addClass("lettersearch_active"); + jQuery(filters.searchletter ? "td#"+filters.searchletter : "td.lettersearch[id='']").addClass("lettersearch_active"); // Set activeFilters to current value - filters.searchletter = $j("td.lettersearch_active").attr("id"); + filters.searchletter = jQuery("td.lettersearch_active").attr("id"); } // Reset flag @@ -2971,7 +2971,7 @@ var et2_nextmatch_header = (function(){ "use strict"; return et2_baseWidget.exte init: function() { this._super.apply(this, arguments); - this.labelNode = $j(document.createElement("span")); + this.labelNode = jQuery(document.createElement("span")); this.nextmatch = null; this.setDOMNode(this.labelNode[0]); diff --git a/api/js/etemplate/et2_extension_nextmatch_actions.js b/api/js/etemplate/et2_extension_nextmatch_actions.js index 93f4eeb7e3..88a07dfe73 100644 --- a/api/js/etemplate/et2_extension_nextmatch_actions.js +++ b/api/js/etemplate/et2_extension_nextmatch_actions.js @@ -341,7 +341,7 @@ function nm_compare_field(_action, _senders, _target) } else { - value = $j(field).val(); + value = jQuery(field).val(); } if (!field) return false; @@ -466,7 +466,7 @@ function nm_submit_popup(button) if (nm_popup_action.data.nextmatch) { // Find the associated widget - var widget_id = $j(button).attr("id").replace(nm_popup_action.data.nextmatch.getInstanceManager().uniqueId+'_', ''); + var widget_id = jQuery(button).attr("id").replace(nm_popup_action.data.nextmatch.getInstanceManager().uniqueId+'_', ''); nm_popup_action.data.nextmatch.getRoot().getWidgetById(widget_id).clicked = true; } @@ -519,5 +519,5 @@ function nm_hide_popup(element, div_id) */ function nm_activate_link(_action, _senders) { - $j(_senders[0].iface.getDOMNode()).find('.et2_clickable:first').trigger('click'); + jQuery(_senders[0].iface.getDOMNode()).find('.et2_clickable:first').trigger('click'); } diff --git a/api/js/etemplate/et2_extension_nextmatch_controller.js b/api/js/etemplate/et2_extension_nextmatch_controller.js index 2aa78ef8b0..975eaba7c1 100644 --- a/api/js/etemplate/et2_extension_nextmatch_controller.js +++ b/api/js/etemplate/et2_extension_nextmatch_controller.js @@ -133,7 +133,7 @@ var et2_nextmatch_controller = (function(){ "use strict"; return et2_dataview_co // Find expanded rows var nm = this._widget; var controller = this; - $j('.arrow.opened',this._widget.getDOMNode(this._widget)).each(function() { + jQuery('.arrow.opened',this._widget.getDOMNode(this._widget)).each(function() { var entry = controller.getRowByNode(this); if(entry && entry.uid) { @@ -429,11 +429,11 @@ var et2_nextmatch_controller = (function(){ "use strict"; return et2_dataview_co // Create drag action that allows linking drag_action = mgr.addAction('drag', 'egw_link_drag', this.egw.lang('link'), 'link', function(action, selected) { // Drag helper - list titles. Arbitrarily limited to 10. - var helper = $j(document.createElement("div")); + var helper = jQuery(document.createElement("div")); for(var i = 0; i < selected.length && i < 10; i++) { var id = selected[i].id.split('::'); - var span = $j(document.createElement('span')).appendTo(helper); + var span = jQuery(document.createElement('span')).appendTo(helper); self.egw.link_title(id[0],id[1], function(title) { this.append(title); this.append('
'); diff --git a/api/js/etemplate/et2_extension_nextmatch_dynheight.js b/api/js/etemplate/et2_extension_nextmatch_dynheight.js index f77ec24a31..9432dcc909 100644 --- a/api/js/etemplate/et2_extension_nextmatch_dynheight.js +++ b/api/js/etemplate/et2_extension_nextmatch_dynheight.js @@ -36,8 +36,8 @@ var et2_dynheight = (function(){ "use strict"; return Class.extend( * @memberOf et2_dynheight */ init: function(_outerNode, _innerNode, _minHeight) { - this.outerNode = $j(_outerNode); - this.innerNode = $j(_innerNode); + this.outerNode = jQuery(_outerNode); + this.innerNode = jQuery(_innerNode); this.minHeight = _minHeight; this.bottomNodes = []; @@ -109,10 +109,10 @@ var et2_dynheight = (function(){ "use strict"; return Class.extend( // Some checking to make sure it doesn't overflow the width when user // resizes the window var w = this.outerNode.width(); - if (w > $j(window).width()) + if (w > jQuery(window).width()) { // 50px border, totally arbitrary, but we just need to make sure it's inside - w = $j(window).width()-50; + w = jQuery(window).width()-50; } if(w != this.innerNode.outerWidth()) { @@ -144,7 +144,7 @@ var et2_dynheight = (function(){ "use strict"; return Class.extend( if (_node) { // Accumulate the outer margin of the parent elements - var node = $j(_node); + var node = jQuery(_node); var ooh = node.outerHeight(true); var oh = node.height(); this.outerMargin += (ooh - oh) / 2; // Divide by 2 as the value contains margin-top and -bottom @@ -153,8 +153,8 @@ var et2_dynheight = (function(){ "use strict"; return Class.extend( // recursively to the parent nodes until the _outerNode or body is // reached. var self = this; - $j(_node).children().each(function() { - var $this = $j(this); + jQuery(_node).children().each(function() { + var $this = jQuery(this); var top = $this.offset().top; if (this != self.innerNode[0] && top >= _bottom) { @@ -162,7 +162,7 @@ var et2_dynheight = (function(){ "use strict"; return Class.extend( } }); - if (_node != this.outerNode[0] && _node != $j("body")[0]) + if (_node != this.outerNode[0] && _node != jQuery("body")[0]) { this._collectBottomNodes(_node.parentNode, _bottom); } diff --git a/api/js/etemplate/et2_extension_nextmatch_rowProvider.js b/api/js/etemplate/et2_extension_nextmatch_rowProvider.js index 7060af4bc9..311f23b184 100644 --- a/api/js/etemplate/et2_extension_nextmatch_rowProvider.js +++ b/api/js/etemplate/et2_extension_nextmatch_rowProvider.js @@ -217,11 +217,11 @@ var et2_nextmatch_rowProvider = (function(){ "use strict"; return ClassWithAttri _createEmptyPrototype: function() { var label = this._context && this._context.options && this._context.options.settings.placeholder; - var placeholder = $j(document.createElement("td")) + var placeholder = jQuery(document.createElement("td")) .attr("colspan",this._rowProvider.getColumnCount()) .css("height","19px") .text(typeof label != "undefined" && label ? label : egw().lang("No matches found")); - this._rowProvider._prototypes["empty"] = $j(document.createElement("tr")) + this._rowProvider._prototypes["empty"] = jQuery(document.createElement("tr")) .addClass("egwGridView_empty") .append(placeholder); }, diff --git a/api/js/etemplate/et2_widget_ajaxSelect.js b/api/js/etemplate/et2_widget_ajaxSelect.js index 0e62a65b91..737b86c870 100644 --- a/api/js/etemplate/et2_widget_ajaxSelect.js +++ b/api/js/etemplate/et2_widget_ajaxSelect.js @@ -104,7 +104,7 @@ var et2_ajaxSelect = (function(){ "use strict"; return et2_inputWidget.extend( }, createInputWidget: function() { - this.input = $j(document.createElement("input")); + this.input = jQuery(document.createElement("input")); this.input.addClass("et2_textbox"); @@ -216,7 +216,7 @@ var et2_ajaxSelect_ro = (function(){ "use strict"; return et2_valueWidget.extend this._super.apply(this, arguments); this.value = ""; - this.span = $j(document.createElement("span")); + this.span = jQuery(document.createElement("span")); this.setDOMNode(this.span[0]); }, diff --git a/api/js/etemplate/et2_widget_box.js b/api/js/etemplate/et2_widget_box.js index 561fd3bccb..e436be6361 100644 --- a/api/js/etemplate/et2_widget_box.js +++ b/api/js/etemplate/et2_widget_box.js @@ -38,7 +38,7 @@ var et2_box = (function(){ "use strict"; return et2_baseWidget.extend([et2_IDeta init: function() { this._super.apply(this, arguments); - this.div = $j(document.createElement("div")) + this.div = jQuery(document.createElement("div")) .addClass("et2_" + this._type) .addClass("et2_box_widget"); @@ -143,7 +143,7 @@ var et2_box = (function(){ "use strict"; return et2_baseWidget.extend([et2_IDeta for(var i=0; i < pairs.length; ++i) { var name_value = pairs[i].split(':'); - $j(_nodes[0]).attr('data-'+name_value[0], name_value[1]); + jQuery(_nodes[0]).attr('data-'+name_value[0], name_value[1]); } } } diff --git a/api/js/etemplate/et2_widget_button.js b/api/js/etemplate/et2_widget_button.js index 46bcb97870..223d0de82d 100644 --- a/api/js/etemplate/et2_widget_button.js +++ b/api/js/etemplate/et2_widget_button.js @@ -96,7 +96,7 @@ var et2_button = (function(){ "use strict"; return et2_baseWidget.extend([et2_II } if (!this.options.readonly || this.options.ro_image) { - this.btn = $j(document.createElement("button")) + this.btn = jQuery(document.createElement("button")) .addClass("et2_button") .attr({type:"button"}); this.setDOMNode(this.btn[0]); diff --git a/api/js/etemplate/et2_widget_checkbox.js b/api/js/etemplate/et2_widget_checkbox.js index e5fab75cca..7b2d1be474 100644 --- a/api/js/etemplate/et2_widget_checkbox.js +++ b/api/js/etemplate/et2_widget_checkbox.js @@ -83,7 +83,7 @@ var et2_checkbox = (function(){ "use strict"; return et2_inputWidget.extend( }, createInputWidget: function() { - this.input = $j(document.createElement("input")).attr("type", "checkbox"); + this.input = jQuery(document.createElement("input")).attr("type", "checkbox"); this.input.addClass("et2_checkbox"); @@ -91,7 +91,7 @@ var et2_checkbox = (function(){ "use strict"; return et2_inputWidget.extend( { var self = this; // checkbox container - this.toggle = $j(document.createElement('span')) + this.toggle = jQuery(document.createElement('span')) .addClass('et2_checkbox_slideSwitch') .append(this.input); // update switch status on change @@ -200,7 +200,7 @@ var et2_checkbox_ro = (function(){ "use strict"; return et2_checkbox.extend( this._super.apply(this, arguments); this.value = ""; - this.span = $j(document.createElement("span")) + this.span = jQuery(document.createElement("span")) .addClass("et2_checkbox_ro"); this.setDOMNode(this.span[0]); diff --git a/api/js/etemplate/et2_widget_color.js b/api/js/etemplate/et2_widget_color.js index 6e1dae7b1f..3106829556 100644 --- a/api/js/etemplate/et2_widget_color.js +++ b/api/js/etemplate/et2_widget_color.js @@ -235,7 +235,7 @@ var et2_color_ro = (function(){ "use strict"; return et2_valueWidget.extend([et2 this._super.apply(this, arguments); this.value = ""; - this.$node = $j(document.createElement("div")) + this.$node = jQuery(document.createElement("div")) .addClass("et2_color"); this.setDOMNode(this.$node[0]); diff --git a/api/js/etemplate/et2_widget_date.js b/api/js/etemplate/et2_widget_date.js index 417567cfda..028594984c 100644 --- a/api/js/etemplate/et2_widget_date.js +++ b/api/js/etemplate/et2_widget_date.js @@ -103,9 +103,9 @@ String: A string in the user\'s date format, or a relative date. Relative dates createInputWidget: function() { - this.span = $j(document.createElement(this.options.inline ? 'div' : "span")).addClass("et2_date"); + this.span = jQuery(document.createElement(this.options.inline ? 'div' : "span")).addClass("et2_date"); - this.input_date = $j(document.createElement(this.options.inline ? "div" : "input")); + this.input_date = jQuery(document.createElement(this.options.inline ? "div" : "input")); if (this.options.blur) this.input_date.attr('placeholder', this.egw().lang(this.options.blur)); this.input_date.addClass("et2_date").attr("type", "text") .attr("size", 7) // strlen("10:00pm")=7 @@ -707,16 +707,16 @@ var et2_date_duration = (function(){ "use strict"; return et2_date.extend( createInputWidget: function() { // Create nodes - this.node = $j(document.createElement("span")) + this.node = jQuery(document.createElement("span")) .addClass('et2_date_duration'); - this.duration = $j(document.createElement("input")) + this.duration = jQuery(document.createElement("input")) .addClass('et2_date_duration') .attr({type: 'number', size: 3}); this.node.append(this.duration); if(this.options.display_format.length > 1) { - this.format = $j(document.createElement("select")) + this.format = jQuery(document.createElement("select")) .addClass('et2_date_duration'); this.node.append(this.format); @@ -726,18 +726,18 @@ var et2_date_duration = (function(){ "use strict"; return et2_date.extend( } else if (this.time_formats[this.options.display_format]) { - this.format = $j(""+this.time_formats[this.options.display_format]+"").appendTo(this.node); + this.format = jQuery(""+this.time_formats[this.options.display_format]+"").appendTo(this.node); } else { - this.format = $j(""+this.time_formats["m"]+"").appendTo(this.node); + this.format = jQuery(""+this.time_formats["m"]+"").appendTo(this.node); } }, attachToDOM: function() { var node = this.getInputNode(); if (node) { - $j(node).bind("change.et2_inputWidget", this, function(e) { + jQuery(node).bind("change.et2_inputWidget", this, function(e) { e.data.change(this); }); } @@ -790,7 +790,7 @@ var et2_date_duration = (function(){ "use strict"; return et2_date.extend( if(display.unit != this.options.display_format) { if(this.format && this.format.children().length > 1) { - $j("option[value='"+display.unit+"']",this.format).attr('selected','selected'); + jQuery("option[value='"+display.unit+"']",this.format).attr('selected','selected'); } else { @@ -892,9 +892,9 @@ var et2_date_duration_ro = (function(){ "use strict"; return et2_date_duration.e * @memberOf et2_date_duration_ro */ createInputWidget: function() { - this.node = $j(document.createElement("span")); - this.duration = $j(document.createElement("span")).appendTo(this.node); - this.format = $j(document.createElement("span")).appendTo(this.node); + this.node = jQuery(document.createElement("span")); + this.duration = jQuery(document.createElement("span")).appendTo(this.node); + this.format = jQuery(document.createElement("span")).appendTo(this.node); }, /** @@ -995,10 +995,10 @@ var et2_date_ro = (function(){ "use strict"; return et2_valueWidget.extend([et2_ */ init: function() { this._super.apply(this, arguments); - this._labelContainer = $j(document.createElement("label")) + this._labelContainer = jQuery(document.createElement("label")) .addClass("et2_label"); this.value = ""; - this.span = $j(document.createElement(this._type == "date-since" || this._type == "date-time_today" ? "span" : "time")) + this.span = jQuery(document.createElement(this._type == "date-since" || this._type == "date-time_today" ? "span" : "time")) .addClass("et2_date_ro et2_label") .appendTo(this._labelContainer); @@ -1274,12 +1274,12 @@ var et2_date_range = (function(){ "use strict"; return et2_inputWidget.extend({ this.options.relative = _value; if(this.options.relative) { - $j(this.from.getDOMNode()).hide(); - $j(this.to.getDOMNode()).hide(); + jQuery(this.from.getDOMNode()).hide(); + jQuery(this.to.getDOMNode()).hide(); } else { - $j(this.select.getDOMNode()).hide(); + jQuery(this.select.getDOMNode()).hide(); } }, @@ -1323,7 +1323,7 @@ var et2_date_range = (function(){ "use strict"; return et2_inputWidget.extend({ { if(this.options.relative) { - $j(this.select.getDOMNode()).show(); + jQuery(this.select.getDOMNode()).show(); } // Show description this.select.set_value(_value); diff --git a/api/js/etemplate/et2_widget_description.js b/api/js/etemplate/et2_widget_description.js index 4cf9404d8e..851a13515e 100644 --- a/api/js/etemplate/et2_widget_description.js +++ b/api/js/etemplate/et2_widget_description.js @@ -108,7 +108,7 @@ var et2_description = (function(){ "use strict"; return expose(et2_baseWidget.ex this._super.apply(this, arguments); // Create the span/label tag which contains the label text - this.span = $j(document.createElement(this.options["for"] ? "label" : "span")) + this.span = jQuery(document.createElement(this.options["for"] ? "label" : "span")) .addClass("et2_label"); if (this.options["for"]) @@ -149,7 +149,7 @@ var et2_description = (function(){ "use strict"; return expose(et2_baseWidget.ex // Create the label container if it didn't exist yet if (this._labelContainer == null) { - this._labelContainer = $j(document.createElement("label")) + this._labelContainer = jQuery(document.createElement("label")) .addClass("et2_label"); this.getSurroundings().insertDOMNode(this._labelContainer[0]); } diff --git a/api/js/etemplate/et2_widget_dialog.js b/api/js/etemplate/et2_widget_dialog.js index 17bf4dc946..c17c03a207 100644 --- a/api/js/etemplate/et2_widget_dialog.js +++ b/api/js/etemplate/et2_widget_dialog.js @@ -75,7 +75,7 @@ * // If you override, 'this' will be the dialog DOMNode. * // Things get more complicated. * // Do what you like, but don't forget this line: - * $j(this).dialog("close") + * jQuery(this).dialog("close") * }, class="ui-state-error"}, * * ], @@ -246,7 +246,7 @@ var et2_dialog = (function(){ "use strict"; return et2_widget.extend( } } - this.div = $j(document.createElement("div")); + this.div = jQuery(document.createElement("div")); this._createDialog(); }, @@ -312,7 +312,7 @@ var et2_dialog = (function(){ "use strict"; return et2_widget.extend( this.div.empty() .append("") - .append($j('
').text(message)); + .append(jQuery('
').text(message)); }, /** @@ -336,11 +336,11 @@ var et2_dialog = (function(){ "use strict"; return et2_widget.extend( set_icon: function(icon_url) { if(icon_url == "") { - $j("img.dialog_icon",this.div).hide(); + jQuery("img.dialog_icon",this.div).hide(); } else { - $j("img.dialog_icon",this.div).show().attr("src", icon_url); + jQuery("img.dialog_icon",this.div).show().attr("src", icon_url); } }, @@ -399,7 +399,7 @@ var et2_dialog = (function(){ "use strict"; return et2_widget.extend( this.div.dialog("option", "buttons", buttons); // Focus default button so enter works - $j('.ui-dialog-buttonpane button[default]',this.div.parent()).focus(); + jQuery('.ui-dialog-buttonpane button[default]',this.div.parent()).focus(); } }, @@ -440,7 +440,7 @@ var et2_dialog = (function(){ "use strict"; return et2_widget.extend( // File name provided, fetch from server this.template.load("",template,this.options.value||{}, jQuery.proxy(function() { // Set focus to the first input - $j('input',this.div).first().focus(); + jQuery('input',this.div).first().focus(); },this)); } else @@ -480,7 +480,7 @@ var et2_dialog = (function(){ "use strict"; return et2_widget.extend( title: this.options.title, open: function() { // Focus default button so enter works - $j(this).parents('.ui-dialog-buttonpane button[default]').focus(); + jQuery(this).parents('.ui-dialog-buttonpane button[default]').focus(); }, close: jQuery.proxy(function() {this.destroy();},this), beforeClose: this.options.beforeClose @@ -693,7 +693,7 @@ jQuery.extend(et2_dialog, //(function(){ "use strict"; return {"button_id": et2_dialog.CANCEL_BUTTON,"text": egw.lang('cancel'), click: function() { // Cancel run cancel = true; - $j("button[button_id="+et2_dialog.CANCEL_BUTTON+"]", dialog.div.parent()).button("disable"); + jQuery("button[button_id="+et2_dialog.CANCEL_BUTTON+"]", dialog.div.parent()).button("disable"); update.call(_list.length,''); }} ]; @@ -719,7 +719,7 @@ jQuery.extend(et2_dialog, //(function(){ "use strict"; return }, parent); // OK starts disabled - $j("button[button_id="+et2_dialog.OK_BUTTON+"]", dialog.div.parent()).button("disable"); + jQuery("button[button_id="+et2_dialog.OK_BUTTON+"]", dialog.div.parent()).button("disable"); var log = null; var progressbar = null; @@ -761,8 +761,8 @@ jQuery.extend(et2_dialog, //(function(){ "use strict"; return { // All done if(!cancel) progressbar.set_value(100); - $j("button[button_id="+et2_dialog.CANCEL_BUTTON+"]", dialog.div.parent()).button("disable"); - $j("button[button_id="+et2_dialog.OK_BUTTON+"]", dialog.div.parent()).button("enable"); + jQuery("button[button_id="+et2_dialog.CANCEL_BUTTON+"]", dialog.div.parent()).button("disable"); + jQuery("button[button_id="+et2_dialog.OK_BUTTON+"]", dialog.div.parent()).button("enable"); if (!cancel && typeof _callback == "function") { _callback.call(dialog, true, response); @@ -770,9 +770,9 @@ jQuery.extend(et2_dialog, //(function(){ "use strict"; return } }; - $j(dialog.template.DOMContainer).on('load', function() { + jQuery(dialog.template.DOMContainer).on('load', function() { // Get access to template widgets - log = $j(dialog.template.widgetContainer.getWidgetById('log').getDOMNode()); + log = jQuery(dialog.template.widgetContainer.getWidgetById('log').getDOMNode()); progressbar = dialog.template.widgetContainer.getWidgetById('progressbar'); // Start diff --git a/api/js/etemplate/et2_widget_dropdown_button.js b/api/js/etemplate/et2_widget_dropdown_button.js index 004aec60b0..416acc1328 100644 --- a/api/js/etemplate/et2_widget_dropdown_button.js +++ b/api/js/etemplate/et2_widget_dropdown_button.js @@ -124,7 +124,7 @@ var et2_dropdown_button = (function(){ "use strict"; return et2_inputWidget.exte // Create the individual UI elements // Menu is a UL - this.menu = $j(this.default_menu).attr("id",this.internal_ids.menu) + this.menu = jQuery(this.default_menu).attr("id",this.internal_ids.menu) .hide() .menu({ select: function(event,ui) { @@ -132,24 +132,24 @@ var et2_dropdown_button = (function(){ "use strict"; return et2_inputWidget.exte } }); - this.buttons = $j(document.createElement("div")) + this.buttons = jQuery(document.createElement("div")) .addClass("et2_dropdown"); // Main "wrapper" div - this.div = $j(document.createElement("div")) + this.div = jQuery(document.createElement("div")) .attr("id", this.internal_ids.div) .append(this.buttons) .append(this.menu); // Left side - activates click action - this.button = $j(document.createElement("button")) + this.button = jQuery(document.createElement("button")) .attr("id", this.internal_ids.button) .attr("type", "button") .addClass("ui-widget ui-corner-left").removeClass("ui-corner-all") .appendTo(this.buttons); // Right side - shows dropdown - this.arrow = $j(document.createElement("button")) + this.arrow = jQuery(document.createElement("button")) .addClass("ui-widget ui-corner-right").removeClass("ui-corner-all") .attr("type", "button") .click(function() { @@ -166,7 +166,7 @@ var et2_dropdown_button = (function(){ "use strict"; return et2_inputWidget.exte of: self.buttons }); // Hide menu if clicked elsewhere - $j( document ).one( "click", function() { + jQuery( document ).one( "click", function() { menu.hide(); }); return false; @@ -179,8 +179,8 @@ var et2_dropdown_button = (function(){ "use strict"; return et2_inputWidget.exte this.buttons.children("button") .addClass("ui-state-default") .hover( - function() {$j(this).addClass("ui-state-hover");}, - function() {$j(this).removeClass("ui-state-hover");} + function() {jQuery(this).addClass("ui-state-hover");}, + function() {jQuery(this).removeClass("ui-state-hover");} ); // Icon @@ -303,7 +303,7 @@ var et2_dropdown_button = (function(){ "use strict"; return et2_inputWidget.exte this._super.apply(this, arguments); // Move the parent's handler to the button, or we can't tell the difference between the clicks - $j(this.node).unbind("click.et2_baseWidget"); + jQuery(this.node).unbind("click.et2_baseWidget"); this.button.bind("click.et2_baseWidget", this, function(e) { return e.data.click.call(e.data, this); }); @@ -341,23 +341,23 @@ var et2_dropdown_button = (function(){ "use strict"; return et2_inputWidget.exte var item; if(typeof options[key] == "string") { - item = $j("
  • "+options[key]+"
  • "); + item = jQuery("
  • "+options[key]+"
  • "); } else if (options[key]["label"]) { - item =$j("
  • "+options[key]["label"]+"
  • "); + item =jQuery("
  • "+options[key]["label"]+"
  • "); } // Optgroup else { - item = $j("
  • "+key+"
  • "); + item = jQuery("
  • "+key+"
  • "); add_complex(node.append("
      "), options[key]); } node.append(item); if(item && options[key].icon) { // we supply a applicable class for item images - $j('a',item).prepend(''); + jQuery('a',item).prepend(''); } } } @@ -374,7 +374,7 @@ var et2_dropdown_button = (function(){ "use strict"; return et2_inputWidget.exte }, set_value: function(new_value) { - var menu_item = $j("[data-id='"+new_value+"']",this.menu); + var menu_item = jQuery("[data-id='"+new_value+"']",this.menu); if(menu_item.length) { this.value = new_value; diff --git a/api/js/etemplate/et2_widget_favorites.js b/api/js/etemplate/et2_widget_favorites.js index 43b051b9da..e59cd274c3 100644 --- a/api/js/etemplate/et2_widget_favorites.js +++ b/api/js/etemplate/et2_widget_favorites.js @@ -91,11 +91,11 @@ var et2_favorites = (function(){ "use strict"; return et2_dropdown_button.extend */ init: function() { this._super.apply(this, arguments); - this.sidebox_target = $j("#"+this.options.sidebox_target); + this.sidebox_target = jQuery("#"+this.options.sidebox_target); if(this.sidebox_target.length == 0 && egw_getFramework() != null) { var egw_fw = egw_getFramework(); - this.sidebox_target = $j("#"+this.options.sidebox_target,egw_fw.sidemenuDiv); + this.sidebox_target = jQuery("#"+this.options.sidebox_target,egw_fw.sidemenuDiv); } // Store array of sorted items this.favSortedList = ['blank']; @@ -124,20 +124,20 @@ var et2_favorites = (function(){ "use strict"; return et2_dropdown_button.extend var self = this; // Add a listener on the radio buttons to set default filter - $j(this.menu).on("click","input:radio", function(event){ + jQuery(this.menu).on("click","input:radio", function(event){ // Don't do the menu event.stopImmediatePropagation(); // Save as default favorite - used when you click the button - self.egw().set_preference(self.options.app,self.options.default_pref,$j(this).val()); - self.preferred = $j(this).val(); + self.egw().set_preference(self.options.app,self.options.default_pref,jQuery(this).val()); + self.preferred = jQuery(this).val(); // Update sidebox, if there if(self.sidebox_target.length) { self.sidebox_target.find("div.ui-icon-heart") .replaceWith("
      "); - $j("li[data-id='"+self.preferred+"'] div.sideboxstar",self.sidebox_target) + jQuery("li[data-id='"+self.preferred+"'] div.sideboxstar",self.sidebox_target) .replaceWith("
      "); } @@ -161,7 +161,7 @@ var et2_favorites = (function(){ "use strict"; return et2_dropdown_button.extend }; //Add Sortable handler to nm fav. menu - $j(this.menu).sortable({ + jQuery(this.menu).sortable({ items:'li:not([data-id$="add"])', placeholder:'ui-fav-sortable-placeholder', @@ -183,8 +183,8 @@ var et2_favorites = (function(){ "use strict"; return et2_dropdown_button.extend }) // Wrap and unwrap because jQueryUI styles use a parent, and we don't want to change the state of the menu item // Wrap in a span instead of a div because div gets a border - .on("mouseenter","div.ui-icon-trash", function() {$j(this).wrap("");}) - .on("mouseleave","div.ui-icon-trash", function() {$j(this).unwrap();}); + .on("mouseenter","div.ui-icon-trash", function() {jQuery(this).wrap("");}) + .on("mouseleave","div.ui-icon-trash", function() {jQuery(this).unwrap();}); // Trigger refresh of menu options now that events are registered // to update sidebox @@ -292,7 +292,7 @@ var et2_favorites = (function(){ "use strict"; return et2_dropdown_button.extend widget.set_select_options.call(widget,options); // Set radio to current value - $j("input[value='"+ this.preferred +"']:radio", this.menu).attr("checked",true); + jQuery("input[value='"+ this.preferred +"']:radio", this.menu).attr("checked",true); }, set_nm_filters: function(filters) @@ -329,11 +329,11 @@ var et2_favorites = (function(){ "use strict"; return et2_dropdown_button.extend // Apply the favorite when you pick from the list change: function(selected_node) { - this.value = $j(selected_node).attr("data-id"); + this.value = jQuery(selected_node).attr("data-id"); if(this.value == "add" && this.nextmatch) { // Get current filters - var current_filters = $j.extend({},this.nextmatch.activeFilters); + var current_filters = jQuery.extend({},this.nextmatch.activeFilters); // Add in extras for(var extra in this.options.filters) diff --git a/api/js/etemplate/et2_widget_file.js b/api/js/etemplate/et2_widget_file.js index 4a6f14936b..b4361d8767 100644 --- a/api/js/etemplate/et2_widget_file.js +++ b/api/js/etemplate/et2_widget_file.js @@ -158,26 +158,26 @@ var et2_file = (function(){ "use strict"; return et2_inputWidget.extend( }, createInputWidget: function() { - this.node = $j(document.createElement("div")).addClass("et2_file"); - this.span = $j(document.createElement("span")) + this.node = jQuery(document.createElement("div")).addClass("et2_file"); + this.span = jQuery(document.createElement("span")) .addClass('et2_file_span et2_button') .appendTo (this.node); if (this.options.label != '') this.span.addClass('et2_button_text'); var span = this.span; - this.input = $j(document.createElement("input")) + this.input = jQuery(document.createElement("input")) .attr("type", "file").attr("placeholder", this.options.blur) .addClass ("et2_file_upload") .appendTo(this.node) .hover(function(e){ - $j(span) + jQuery(span) .toggleClass('et2_file_spanHover'); }) .on({ mousedown:function (e){ - $j(span).addClass('et2_file_spanActive'); + jQuery(span).addClass('et2_file_spanActive'); }, mouseup:function (e){ - $j(span).removeClass('et2_file_spanActive'); + jQuery(span).removeClass('et2_file_spanActive'); } }); var self = this; @@ -203,12 +203,12 @@ var et2_file = (function(){ "use strict"; return et2_inputWidget.extend( if(widget) { //may be not available at createInputWidget time - this.progress = $j(widget.getDOMNode()); + this.progress = jQuery(widget.getDOMNode()); } } if(!this.progress) { - this.progress = $j(document.createElement("div")).appendTo(this.node); + this.progress = jQuery(document.createElement("div")).appendTo(this.node); } this.progress.addClass("progress"); @@ -424,7 +424,7 @@ var et2_file = (function(){ "use strict"; return et2_inputWidget.extend( this.hideMessage(); // Disable buttons - this.disabled_buttons = $j("input[type='submit'], button") + this.disabled_buttons = jQuery("input[type='submit'], button") .not("[disabled]") .attr("disabled", true) .addClass('et2_button_ro') @@ -530,22 +530,22 @@ var et2_file = (function(){ "use strict"; return et2_inputWidget.extend( var widget = this.getRoot().getWidgetById(this.options.progress); if(widget) { - this.progress = $j(widget.getDOMNode()); + this.progress = jQuery(widget.getDOMNode()); this.progress.addClass("progress"); } } if(this.progress) { var fileName = file.fileName || 'file'; - var status = $j("
    • "+fileName + var status = jQuery("
    • "+fileName +"

    • ") .appendTo(this.progress); - $j("div.remove",status).on('click', file, jQuery.proxy(this.cancel,this)); + jQuery("div.remove",status).on('click', file, jQuery.proxy(this.cancel,this)); if(error != "") { status.addClass("message ui-state-error"); status.append("
      "+error+""); - $j(".progressBar",status).css("display", "none"); + jQuery(".progressBar",status).css("display", "none"); } } return error == ""; @@ -554,7 +554,7 @@ var et2_file = (function(){ "use strict"; return et2_inputWidget.extend( _fileProgress: function(file) { if(this.progress) { - $j("li[data-file='"+file.fileName+"'] > span.progressBar > p").css("width", Math.ceil(file.progress()*100)+"%"); + jQuery("li[data-file='"+file.fileName+"'] > span.progressBar > p").css("width", Math.ceil(file.progress()*100)+"%"); } return true; @@ -577,7 +577,7 @@ var et2_file = (function(){ "use strict"; return et2_inputWidget.extend( if(typeof response.response[0].data[key] == "string") { // Message from server - probably error - $j("[data-file='"+name+"']",this.progress) + jQuery("[data-file='"+name+"']",this.progress) .addClass("error") .css("display", "block") .text(response.response[0].data[key]); @@ -587,14 +587,14 @@ var et2_file = (function(){ "use strict"; return et2_inputWidget.extend( this.options.value[key] = response.response[0].data[key]; if(this.progress) { - $j("[data-file='"+name+"']",this.progress).addClass("message success"); + jQuery("[data-file='"+name+"']",this.progress).addClass("message success"); } } } } else if (this.progress) { - $j("[data-file='"+name+"']",this.progress) + jQuery("[data-file='"+name+"']",this.progress) .addClass("ui-state-error") .css("display", "block") .text(this.egw().lang("Server error")); @@ -628,7 +628,7 @@ var et2_file = (function(){ "use strict"; return et2_inputWidget.extend( if(this.options.value[key].name == file.fileName) { delete this.options.value[key]; - $j('[data-file="'+file.fileName+'"]',this.node).remove(); + jQuery('[data-file="'+file.fileName+'"]',this.node).remove(); return; } } @@ -642,13 +642,13 @@ var et2_file = (function(){ "use strict"; return et2_inputWidget.extend( { e.preventDefault(); // Look for file name in list - var target = $j(e.target).parents("li"); + var target = jQuery(e.target).parents("li"); this.remove_file(e.data); // In case it didn't make it to the list (error) target.remove(); - $j(e.target).remove(); + jQuery(e.target).remove(); }, /** diff --git a/api/js/etemplate/et2_widget_grid.js b/api/js/etemplate/et2_widget_grid.js index fa6e99ed41..ab1e91264f 100644 --- a/api/js/etemplate/et2_widget_grid.js +++ b/api/js/etemplate/et2_widget_grid.js @@ -60,13 +60,13 @@ var et2_grid = (function(){ "use strict"; return et2_DOMWidget.extend([et2_IDeta */ init: function() { // Create the table body and the table - this.table = $j(document.createElement("table")) + this.table = jQuery(document.createElement("table")) .addClass("et2_grid"); - this.thead = $j(document.createElement("thead")) + this.thead = jQuery(document.createElement("thead")) .appendTo(this.table); - this.tfoot = $j(document.createElement("tfoot")) + this.tfoot = jQuery(document.createElement("tfoot")) .appendTo(this.table); - this.tbody = $j(document.createElement("tbody")) + this.tbody = jQuery(document.createElement("tbody")) .appendTo(this.table); // Call the parent constructor @@ -678,7 +678,7 @@ var et2_grid = (function(){ "use strict"; return et2_DOMWidget.extend([et2_IDeta } break; } - var tr = $j(document.createElement("tr")).appendTo(parent) + var tr = jQuery(document.createElement("tr")).appendTo(parent) .addClass(this.rowData[y]["class"]); if (this.rowData[y].disabled) @@ -710,7 +710,7 @@ var et2_grid = (function(){ "use strict"; return et2_DOMWidget.extend([et2_IDeta if (cell.td == null && cell.widget != null) { // Create the cell - var td = $j(document.createElement("td")).appendTo(tr) + var td = jQuery(document.createElement("td")).appendTo(tr) .addClass(cell["class"]); if (cell.disabled) @@ -903,8 +903,8 @@ var et2_grid = (function(){ "use strict"; return et2_DOMWidget.extend([et2_IDeta } // Make sure rows have IDs, so sortable has something to return - $j('tr', this.tbody).each(function(index) { - var $this = $j(this); + jQuery('tr', this.tbody).each(function(index) { + var $this = jQuery(this); // Header does not participate in sorting if($this.hasClass('th')) return; @@ -965,7 +965,7 @@ var et2_grid = (function(){ "use strict"; return et2_DOMWidget.extend([et2_IDeta if(content) { // Add a new action object to the object manager - var row = $j('tr', this.tbody)[r]; + var row = jQuery('tr', this.tbody)[r]; var aoi = new et2_action_object_impl(this, row); var obj = widget_object.addObject(content.id || "row_"+r, aoi); diff --git a/api/js/etemplate/et2_widget_hbox.js b/api/js/etemplate/et2_widget_hbox.js index d396c0c39c..71795b7867 100644 --- a/api/js/etemplate/et2_widget_hbox.js +++ b/api/js/etemplate/et2_widget_hbox.js @@ -43,7 +43,7 @@ var et2_hbox = (function(){ "use strict"; return et2_baseWidget.extend( this.leftDiv = null; this.rightDiv = null; - this.div = $j(document.createElement("div")) + this.div = jQuery(document.createElement("div")) .addClass("et2_" + this._type) .addClass("et2_box_widget"); @@ -73,7 +73,7 @@ var et2_hbox = (function(){ "use strict"; return et2_baseWidget.extend( // "right" if (this.alignData.hasRight) { - this.rightDiv = $j(document.createElement("div")) + this.rightDiv = jQuery(document.createElement("div")) .addClass("et2_hbox_right") .appendTo(this.div); } @@ -83,7 +83,7 @@ var et2_hbox = (function(){ "use strict"; return et2_baseWidget.extend( if (this.alignData.hasCenter) { // Create the left div if an element is centered - this.leftDiv = $j(document.createElement("div")) + this.leftDiv = jQuery(document.createElement("div")) .addClass("et2_hbox_left") .appendTo(this.div); diff --git a/api/js/etemplate/et2_widget_historylog.js b/api/js/etemplate/et2_widget_historylog.js index c27c05bdb6..3af6a33151 100644 --- a/api/js/etemplate/et2_widget_historylog.js +++ b/api/js/etemplate/et2_widget_historylog.js @@ -64,10 +64,10 @@ var et2_historylog = (function(){ "use strict"; return et2_valueWidget.extend([e */ init: function() { this._super.apply(this, arguments); - this.div = $j(document.createElement("div")) + this.div = jQuery(document.createElement("div")) .addClass("et2_historylog"); - this.innerDiv = $j(document.createElement("div")) + this.innerDiv = jQuery(document.createElement("div")) .appendTo(this.div); }, @@ -171,12 +171,12 @@ var et2_historylog = (function(){ "use strict"; return et2_valueWidget.extend([e // Write something inside the column headers for (var i = 0; i < this.columns.length; i++) { - $j(this.dataview.getHeaderContainerNode(i)).text(this.columns[i].caption); + jQuery(this.dataview.getHeaderContainerNode(i)).text(this.columns[i].caption); } // Register a resize callback var self = this; - $j(window).on('resize.' +this.options.value.app + this.options.value.id, function() { + jQuery(window).on('resize.' +this.options.value.app + this.options.value.id, function() { if (self && typeof self.dynheight != 'undefined') self.dynheight.update(function(_w, _h) { self.dataview.resize(_w, _h); }); @@ -190,7 +190,7 @@ var et2_historylog = (function(){ "use strict"; return et2_valueWidget.extend([e // Unbind, if bound if(this.options.value && !this.options.value.id) { - $j(window).off('.' +this.options.value.app + this.options.value.id); + jQuery(window).off('.' +this.options.value.app + this.options.value.id); } // Free the widgets @@ -227,7 +227,7 @@ var et2_historylog = (function(){ "use strict"; return et2_valueWidget.extend([e var attrs = {'readonly': true, 'id': (i == this.FIELD ? this.options.status_id : this.columns[i].id)}; this.columns[i].widget = et2_createWidget(this.columns[i].widget_type, attrs, this); this.columns[i].widget.transformAttributes(attrs); - this.columns[i].nodes = $j(this.columns[i].widget.getDetachedNodes()); + this.columns[i].nodes = jQuery(this.columns[i].widget.getDetachedNodes()); } } @@ -459,7 +459,7 @@ var et2_historylog = (function(){ "use strict"; return et2_valueWidget.extend([e var row = this.dataview.rowProvider.getPrototype("default"); var self = this; - $j("div", row).each(function (i) { + jQuery("div", row).each(function (i) { var nodes = []; var widget = self.columns[i].widget; if(typeof widget == 'undefined' && typeof self.fields[_data.status] != 'undefined') @@ -527,7 +527,7 @@ var et2_historylog = (function(){ "use strict"; return et2_valueWidget.extend([e if(widget._children.length) { // Multi-part values - var box = $j(widget.getDOMNode()).clone(); + var box = jQuery(widget.getDOMNode()).clone(); for(var j = 0; j < widget._children.length; j++) { widget._children[j].setDetachedAttributes(nodes[j], {value:_data[self.columns[i].id][j]}); @@ -540,9 +540,9 @@ var et2_historylog = (function(){ "use strict"; return et2_valueWidget.extend([e widget.setDetachedAttributes(nodes, {value:_data[self.columns[i].id]}); } } - $j(this).append(nodes); + jQuery(this).append(nodes); }); - $j(tr).append(row.children()); + jQuery(tr).append(row.children()); return tr; }, diff --git a/api/js/etemplate/et2_widget_html.js b/api/js/etemplate/et2_widget_html.js index c20022ca8a..d343af36a6 100644 --- a/api/js/etemplate/et2_widget_html.js +++ b/api/js/etemplate/et2_widget_html.js @@ -52,7 +52,7 @@ var et2_html = (function(){ "use strict"; return et2_valueWidget.extend([et2_IDe // Allow no child widgets this.supportedWidgetClasses = []; - this.htmlNode = $j(document.createElement("span")); + this.htmlNode = jQuery(document.createElement("span")); if(this._type == 'htmlarea') { this.htmlNode.addClass('et2_textbox_ro'); diff --git a/api/js/etemplate/et2_widget_htmlarea.js b/api/js/etemplate/et2_widget_htmlarea.js index ba34c3f5ff..0ed01cf55d 100644 --- a/api/js/etemplate/et2_widget_htmlarea.js +++ b/api/js/etemplate/et2_widget_htmlarea.js @@ -95,7 +95,7 @@ var et2_htmlarea = (function(){ "use strict"; return et2_inputWidget.extend([et2 // Allow no child widgets this.supportedWidgetClasses = []; - this.htmlNode = $j(document.createElement("textarea")) + this.htmlNode = jQuery(document.createElement("textarea")) .css('height', this.options.height) .addClass('et2_textbox_ro'); this.setDOMNode(this.htmlNode[0]); diff --git a/api/js/etemplate/et2_widget_iframe.js b/api/js/etemplate/et2_widget_iframe.js index 4be260f43f..40766e7920 100644 --- a/api/js/etemplate/et2_widget_iframe.js +++ b/api/js/etemplate/et2_widget_iframe.js @@ -63,7 +63,7 @@ var et2_iframe = (function(){ "use strict"; return et2_valueWidget.extend( // Allow no child widgets this.supportedWidgetClasses = []; - this.htmlNode = $j(document.createElement("iframe")); + this.htmlNode = jQuery(document.createElement("iframe")); if(this.options.label) { this.htmlNode.append(''+this.options.label+''); @@ -126,7 +126,7 @@ var et2_iframe = (function(){ "use strict"; return et2_valueWidget.extend( else { // Load the new page, but display a loader - var loader = $j('
      '); + var loader = jQuery('
      '); this.htmlNode .before(loader); window.setTimeout(jQuery.proxy(function() { diff --git a/api/js/etemplate/et2_widget_image.js b/api/js/etemplate/et2_widget_image.js index 9e3722e9ee..3a9f2d673b 100644 --- a/api/js/etemplate/et2_widget_image.js +++ b/api/js/etemplate/et2_widget_image.js @@ -80,7 +80,7 @@ var et2_image = (function(){ "use strict"; return expose(et2_baseWidget.extend([ this._super.apply(this, arguments); // Create the image or a/image tag - this.image = $j(document.createElement("img")); + this.image = jQuery(document.createElement("img")); if (this.options.label) { this.image.attr("alt", this.options.label).attr("title", this.options.label); @@ -252,7 +252,7 @@ var et2_image = (function(){ "use strict"; return expose(et2_baseWidget.extend([ setDetachedAttributes: function(_nodes, _values) { // Set the given DOM-Nodes - this.image = $j(_nodes[0]); + this.image = jQuery(_nodes[0]); // Set the attributes if (_values["src"]) diff --git a/api/js/etemplate/et2_widget_itempicker.js b/api/js/etemplate/et2_widget_itempicker.js index d8d30ca8ce..cb34138d8f 100755 --- a/api/js/etemplate/et2_widget_itempicker.js +++ b/api/js/etemplate/et2_widget_itempicker.js @@ -113,14 +113,14 @@ var et2_itempicker = (function(){ "use strict"; return et2_inputWidget.extend( createInputWidget: function() { var _self = this; - this.div = $j(document.createElement("div")); - this.left = $j(document.createElement("div")); - this.right = $j(document.createElement("div")); - this.right_container = $j(document.createElement("div")); - this.app_select = $j(document.createElement("ul")); - this.search = $j(document.createElement("input")); - this.clear = $j(document.createElement("span")); - this.itemlist = $j(document.createElement("div")); + this.div = jQuery(document.createElement("div")); + this.left = jQuery(document.createElement("div")); + this.right = jQuery(document.createElement("div")); + this.right_container = jQuery(document.createElement("div")); + this.app_select = jQuery(document.createElement("ul")); + this.search = jQuery(document.createElement("input")); + this.clear = jQuery(document.createElement("span")); + this.itemlist = jQuery(document.createElement("div")); // Container elements this.div.addClass("et2_itempicker"); @@ -136,12 +136,12 @@ var et2_itempicker = (function(){ "use strict"; return et2_inputWidget.extend( if(img_icon === null) { continue; } - var img = $j(document.createElement("img")); + var img = jQuery(document.createElement("img")); img.attr("src", img_icon); - var item = $j(document.createElement("li")); + var item = jQuery(document.createElement("li")); item.attr("id", key) .click(function() { - _self.selectApplication($j(this)); + _self.selectApplication(jQuery(this)); }) .append(img); if(item_count == 0) { @@ -155,7 +155,7 @@ var et2_itempicker = (function(){ "use strict"; return et2_inputWidget.extend( this.search.addClass("et2_itempicker_search"); this.search.keyup(function() { var request = {}; - request.term = $j(this).val(); + request.term = jQuery(this).val(); _self.query(request); }); this.set_blur(this.options.blur, this.search); @@ -170,7 +170,7 @@ var et2_itempicker = (function(){ "use strict"; return et2_inputWidget.extend( // Action button this.button_action = et2_createWidget("button"); - $j(this.button_action.getDOMNode()).addClass("et2_itempicker_button_action"); + jQuery(this.button_action.getDOMNode()).addClass("et2_itempicker_button_action"); this.button_action.set_label(this.egw().lang(this.options.action_label)); this.button_action.click = function() { _self.doAction(); }; @@ -208,8 +208,8 @@ var et2_itempicker = (function(){ "use strict"; return et2_inputWidget.extend( getSelectedItems: function() { var items = []; - $j(this.itemlist).children("ul").children("li.selected").each(function(index) { - items[index] = $j(this).attr("id"); + jQuery(this.itemlist).children("ul").children("li.selected").each(function(index) { + items[index] = jQuery(this).attr("id"); }); return items; }, @@ -253,7 +253,7 @@ var et2_itempicker = (function(){ "use strict"; return et2_inputWidget.extend( selectApplication: function(app) { this.clearSearchResults(); - $j(".et2_itempicker_app_select li").removeClass("selected"); + jQuery(".et2_itempicker_app_select li").removeClass("selected"); app.addClass("selected"); this.current_app = app.attr("id"); return true; @@ -314,11 +314,11 @@ var et2_itempicker = (function(){ "use strict"; return et2_inputWidget.extend( }, updateItemList: function(data) { - var list = $j(document.createElement("ul")); + var list = jQuery(document.createElement("ul")); var item_count = 0; var _self = this; for(var id in data) { - var item = $j(document.createElement("li")); + var item = jQuery(document.createElement("li")); if(item_count%2 == 0) { item.addClass("row_on"); } else { @@ -329,16 +329,16 @@ var et2_itempicker = (function(){ "use strict"; return et2_inputWidget.extend( .click(function(e) { if(e.ctrlKey || e.metaKey) { // add to selection - $j(this).addClass("selected"); + jQuery(this).addClass("selected"); } else if(e.shiftKey) { // select range - var start = $j(this).siblings(".selected").first(); + var start = jQuery(this).siblings(".selected").first(); if(start == 0) { // no start item - cannot select range - select single item - $j(this).addClass("selected"); + jQuery(this).addClass("selected"); return true; } - var end = $j(this); + var end = jQuery(this); // swap start and end if start appears after end in dom hierarchy if(start.index() > end.index()) { var startOld = start; @@ -351,8 +351,8 @@ var et2_itempicker = (function(){ "use strict"; return et2_inputWidget.extend( end.addClass("selected"); } else { // select single item - $j(this).siblings(".selected").removeClass("selected"); - $j(this).addClass("selected"); + jQuery(this).siblings(".selected").removeClass("selected"); + jQuery(this).addClass("selected"); } }); list.append(item); diff --git a/api/js/etemplate/et2_widget_link.js b/api/js/etemplate/et2_widget_link.js index 117fa531ec..f71aadfa71 100644 --- a/api/js/etemplate/et2_widget_link.js +++ b/api/js/etemplate/et2_widget_link.js @@ -127,29 +127,29 @@ var et2_link_to = (function(){ "use strict"; return et2_inputWidget.extend( }, createInputWidget: function() { - this.div = $j(document.createElement("div")).addClass("et2_link_to et2_toolbar"); + this.div = jQuery(document.createElement("div")).addClass("et2_link_to et2_toolbar"); // Need a div for file upload widget - this.file_div = $j(document.createElement("div")).css({display:'inline-block'}).appendTo(this.div); + this.file_div = jQuery(document.createElement("div")).css({display:'inline-block'}).appendTo(this.div); // Filemanager link popup - this.filemanager_button = $j(document.createElement("div")).css({display:'inline-block'}).appendTo(this.div); + this.filemanager_button = jQuery(document.createElement("div")).css({display:'inline-block'}).appendTo(this.div); // Need a div for link-to widget - this.link_div = $j(document.createElement("div")) + this.link_div = jQuery(document.createElement("div")) .addClass('div_link') // Leave room for link button .appendTo(this.div); // One common link button - this.link_button = $j(document.createElement("button")) + this.link_button = jQuery(document.createElement("button")) .text(this.egw().lang(this.options.link_label)) .appendTo(this.div).hide() .addClass('link') .click(this, this.createLink); // Span for indicating status - this.status_span = $j(document.createElement("span")) + this.status_span = jQuery(document.createElement("span")) .appendTo(this.div).addClass("status").hide(); this.setDOMNode(this.div[0]); @@ -184,7 +184,7 @@ var et2_link_to = (function(){ "use strict"; return et2_inputWidget.extend( button_caption: '' }; this.vfs_select = et2_createWidget("vfs-select", select_attrs,this); - $j(this.vfs_select.getDOMNode()).change( function() { + jQuery(this.vfs_select.getDOMNode()).change( function() { var values = true; // If entry not yet saved, store for linking on server if(!self.options.value.to_id || typeof self.options.value.to_id == 'object') @@ -583,10 +583,10 @@ var et2_link_entry = (function(){ "use strict"; return et2_inputWidget.extend( createInputWidget: function() { var self = this; - this.div = $j(document.createElement("div")).addClass("et2_link_entry"); + this.div = jQuery(document.createElement("div")).addClass("et2_link_entry"); // Application selection - this.app_select = $j(document.createElement("select")).appendTo(this.div) + this.app_select = jQuery(document.createElement("select")).appendTo(this.div) .change(function(e) { // Clear cache when app changes self.cache = {}; @@ -600,7 +600,7 @@ var et2_link_entry = (function(){ "use strict"; return et2_inputWidget.extend( var opt_count = 0; for(var key in this.options.select_options) { opt_count++; - var option = $j(document.createElement("option")) + var option = jQuery(document.createElement("option")) .attr("value", key) .text(this.options.select_options[key]); option.appendTo(this.app_select); @@ -618,7 +618,7 @@ var et2_link_entry = (function(){ "use strict"; return et2_inputWidget.extend( } // Search input - this.search = $j(document.createElement("input")) + this.search = jQuery(document.createElement("input")) // .attr("type", "search") // Fake it for all browsers below .focus(function(){if(!self.options.only_app) { // Adjust width, leave room for app select & link button @@ -699,7 +699,7 @@ var et2_link_entry = (function(){ "use strict"; return et2_inputWidget.extend( }); // Clear / last button - this.clear = $j(document.createElement("span")) + this.clear = jQuery(document.createElement("span")) .addClass("ui-icon ui-icon-close") .click(function(e){ if (!self.search) return; // only gives an error, we should never get into that situation @@ -1096,9 +1096,9 @@ var et2_link = (function(){ "use strict"; return et2_valueWidget.extend([et2_IDe init: function() { this._super.apply(this, arguments); - this.label_span = $j(document.createElement("label")) + this.label_span = jQuery(document.createElement("label")) .addClass("et2_label"); - this.link = $j(document.createElement("span")) + this.link = jQuery(document.createElement("span")) .addClass("et2_link") .appendTo(this.label_span); @@ -1286,7 +1286,7 @@ var et2_link_string = (function(){ "use strict"; return expose(et2_valueWidget.e init: function() { this._super.apply(this, arguments); - this.list = $j(document.createElement("ul")) + this.list = jQuery(document.createElement("ul")) .addClass("et2_link_string"); if(this.options['class']) this.list.addClass(this.options['class']); @@ -1386,7 +1386,7 @@ var et2_link_string = (function(){ "use strict"; return expose(et2_valueWidget.e }, _add_link: function(_link_data) { var self = this; - var link = $j(document.createElement("li")) + var link = jQuery(document.createElement("li")) .appendTo(this.list) .addClass("et2_link loading") .click( function(e){ @@ -1426,7 +1426,7 @@ var et2_link_string = (function(){ "use strict"; return expose(et2_valueWidget.e // Create the label container if it didn't exist yet if (this._labelContainer == null) { - this._labelContainer = $j(document.createElement("label")) + this._labelContainer = jQuery(document.createElement("label")) .addClass("et2_label"); this.getSurroundings().insertDOMNode(this._labelContainer[0]); this.getSurroundings().update(); @@ -1442,7 +1442,7 @@ var et2_link_string = (function(){ "use strict"; return expose(et2_valueWidget.e // Create the label container if it didn't exist yet if (this._labelContainer == null) { - this._labelContainer = $j(document.createElement("label")) + this._labelContainer = jQuery(document.createElement("label")) .addClass("et2_label"); this.getSurroundings().insertDOMNode(this._labelContainer[0]); } @@ -1460,12 +1460,12 @@ var et2_link_string = (function(){ "use strict"; return expose(et2_valueWidget.e * given values. */ setDetachedAttributes: function(_nodes, _values) { - this.list = $j(_nodes[0]); + this.list = jQuery(_nodes[0]); this.set_value(_values["value"]); // Special detached, to prevent DOM node modification of the normal method - this._labelContainer = _nodes.length > 1 ? $j(_nodes[1]) : null; + this._labelContainer = _nodes.length > 1 ? jQuery(_nodes[1]) : null; if(_values['label']) { this.set_label(_values['label']); @@ -1514,7 +1514,7 @@ var et2_link_list = (function(){ "use strict"; return et2_link_string.extend( init: function() { this._super.apply(this, arguments); - this.list = $j(document.createElement("table")) + this.list = jQuery(document.createElement("table")) .addClass("et2_link_list"); if(this.options['class']) this.list.addClass(this.options['class']); this.setDOMNode(this.list[0]); @@ -1606,7 +1606,7 @@ var et2_link_list = (function(){ "use strict"; return et2_link_string.extend( } // Multiple file download for those that support it - a = $j(a) + a = jQuery(a) .prop('href', url) .prop('download', link_data.title || "") .appendTo(self.getInstanceManager().DOMContainer); @@ -1623,7 +1623,7 @@ var et2_link_list = (function(){ "use strict"; return et2_link_string.extend( this.context.addItem("zip", this.egw().lang("Save as Zip"), this.egw().image('save_zip'), function(menu_item) { // Highlight files for nice UI indicating what will be in the zip. // Files have negative IDs. - $j('[id^="link_-"]',this.list).effect('highlight',{},2000); + jQuery('[id^="link_-"]',this.list).effect('highlight',{},2000); // Download ZIP window.location = self.egw().link('/index.php',{ @@ -1714,7 +1714,7 @@ var et2_link_list = (function(){ "use strict"; return et2_link_string.extend( }, _add_link: function(_link_data) { - var row = $j(document.createElement("tr")) + var row = jQuery(document.createElement("tr")) .attr("id", "link_"+(_link_data.dom_id ? _link_data.dom_id : (typeof _link_data.link_id == "string" ? _link_data.link_id.replace(/[:\.]/g,'_'):_link_data.link_id ||_link_data.id))) .attr("draggable", _link_data.app == 'file' ? "true" : "") .appendTo(this.list); @@ -1727,7 +1727,7 @@ var et2_link_list = (function(){ "use strict"; return et2_link_string.extend( } // Icon - var icon = $j(document.createElement("td")) + var icon = jQuery(document.createElement("td")) .appendTo(row) .addClass("icon"); if(_link_data.icon) @@ -1759,7 +1759,7 @@ var et2_link_list = (function(){ "use strict"; return et2_link_string.extend( var self = this; for(var i = 0; i < columns.length; i++) { - var $td = $j(document.createElement("td")) + var $td = jQuery(document.createElement("td")) .appendTo(row) .addClass(columns[i]) .text(_link_data[columns[i]] ? _link_data[columns[i]]+"" : ""); @@ -1790,14 +1790,14 @@ var et2_link_list = (function(){ "use strict"; return et2_link_string.extend( if (typeof _link_data.title == 'undefined') { // Title will be fetched from server and then set - $j('td.title',row).addClass("loading"); + jQuery('td.title',row).addClass("loading"); var title = this.egw().link_title(_link_data.app, _link_data.id, function(title) { - $j('td.title',this).removeClass("loading").text(title+""); + jQuery('td.title',this).removeClass("loading").text(title+""); }, row); } // Date /* - var date_row = $j(document.createElement("td")) + var date_row = jQuery(document.createElement("td")) .appendTo(row); if(_link_data.lastmod) { @@ -1811,9 +1811,9 @@ var et2_link_list = (function(){ "use strict"; return et2_link_string.extend( // build delete button if the link is not readonly if (!this.options.readonly) { - var delete_button = $j(document.createElement("td")) + var delete_button = jQuery(document.createElement("td")) .appendTo(row); - $j("
      ") + jQuery("
      ") .appendTo(delete_button) // We don't use ui-icon because it assigns a bg image .addClass("delete icon") @@ -1840,7 +1840,7 @@ var et2_link_list = (function(){ "use strict"; return et2_link_string.extend( self.context.getItem("file_info").set_enabled(typeof _link_data.id != 'object' && _link_data.app == 'file'); self.context.getItem("save").set_enabled(typeof _link_data.id != 'object' && _link_data.app == 'file'); // Zip download only offered if there are at least 2 files - self.context.getItem("zip").set_enabled($j('[id^="link_-"]',this.list).length >= 2); + self.context.getItem("zip").set_enabled(jQuery('[id^="link_-"]',this.list).length >= 2); // Show delete item only if the widget is not readonly self.context.getItem("delete").set_enabled(!self.options.readonly); @@ -1889,7 +1889,7 @@ var et2_link_list = (function(){ "use strict"; return et2_link_string.extend( return; } //event.dataTransfer.setDragImage(event.delegate.target,0,0); - var div = $j(document.createElement("div")) + var div = jQuery(document.createElement("div")) .attr('id', 'drag_helper') .css({ position: 'absolute', @@ -1904,7 +1904,7 @@ var et2_link_list = (function(){ "use strict"; return et2_link_string.extend( event.dataTransfer.setDragImage(div.get(0),0,0); }) .on('drag', function() { - $j('#drag_helper',self.list).remove(); + jQuery('#drag_helper',self.list).remove(); }); } }, @@ -1975,7 +1975,7 @@ var et2_link_list = (function(){ "use strict"; return et2_link_string.extend( // VFS link - check for same dir as above, and hide dir var reformat = false; var span_size = 0.3; - var prev = $j('td.title',$td.parent().prev('tr')); + var prev = jQuery('td.title',$td.parent().prev('tr')); if(prev.length === 1) { var prev_dirs = (prev.attr('data-title') || '').split('/'); diff --git a/api/js/etemplate/et2_widget_number.js b/api/js/etemplate/et2_widget_number.js index 08bf4033c8..5a3358510e 100644 --- a/api/js/etemplate/et2_widget_number.js +++ b/api/js/etemplate/et2_widget_number.js @@ -87,7 +87,7 @@ var et2_number = (function(){ "use strict"; return et2_textbox.extend( }, createInputWidget: function() { - this.input = $j(document.createElement("input")); + this.input = jQuery(document.createElement("input")); this.input.attr("type", "number"); this.input.addClass("et2_textbox"); // bind invalid event to change, to trigger our validation diff --git a/api/js/etemplate/et2_widget_portlet.js b/api/js/etemplate/et2_widget_portlet.js index 134a9c87a4..264f9abacc 100644 --- a/api/js/etemplate/et2_widget_portlet.js +++ b/api/js/etemplate/et2_widget_portlet.js @@ -108,7 +108,7 @@ var et2_portlet = (function(){ "use strict"; return et2_valueWidget.extend( var self = this; // Create DOM nodes - this.div = $j(document.createElement("div")) + this.div = jQuery(document.createElement("div")) .addClass(this.options.class) .addClass("ui-widget ui-widget-content ui-corner-all") .addClass("et2_portlet") @@ -136,12 +136,12 @@ var et2_portlet = (function(){ "use strict"; return et2_valueWidget.extend( self.iterateOver(function(widget) {widget.resize();},null,et2_IResizeable); } }); - this.header = $j(document.createElement("div")) + this.header = jQuery(document.createElement("div")) .attr('id', this.getInstanceManager().uniqueId+'_'+this.id.replace(/\./g, '-') + '_header') .addClass("ui-widget-header ui-corner-all") .appendTo(this.div) .html(this.options.title); - this.content = $j(document.createElement("div")) + this.content = jQuery(document.createElement("div")) .attr('id', this.getInstanceManager().uniqueId+'_'+this.id.replace(/\./g, '-') + '_content') .appendTo(this.div); diff --git a/api/js/etemplate/et2_widget_radiobox.js b/api/js/etemplate/et2_widget_radiobox.js index 19b7ee683d..2afd6a558e 100644 --- a/api/js/etemplate/et2_widget_radiobox.js +++ b/api/js/etemplate/et2_widget_radiobox.js @@ -64,7 +64,7 @@ var et2_radiobox = (function(){ "use strict"; return et2_inputWidget.extend( }, createInputWidget: function() { - this.input = $j(document.createElement("input")) + this.input = jQuery(document.createElement("input")) .val(this.options.set_value) .attr("type", "radio"); @@ -200,7 +200,7 @@ var et2_radiobox_ro = (function(){ "use strict"; return et2_valueWidget.extend([ this._super.apply(this, arguments); this.value = ""; - this.span = $j(document.createElement("span")) + this.span = jQuery(document.createElement("span")) .addClass("et2_radiobox"); this.setDOMNode(this.span[0]); @@ -308,7 +308,7 @@ var et2_radioGroup = (function(){ "use strict"; return et2_valueWidget.extend([e */ init: function(parent, attrs) { this._super.apply(this, arguments); - this.node = $j(document.createElement("div")) + this.node = jQuery(document.createElement("div")) .addClass("et2_vbox") .addClass("et2_box_widget"); if(this.options.needed) @@ -387,7 +387,7 @@ var et2_radioGroup = (function(){ "use strict"; return et2_valueWidget.extend([e // Create the label container if it didn't exist yet if (this._labelContainer == null) { - this._labelContainer = $j(document.createElement("label")); + this._labelContainer = jQuery(document.createElement("label")); this.getSurroundings().insertDOMNode(this._labelContainer[0]); } diff --git a/api/js/etemplate/et2_widget_selectAccount.js b/api/js/etemplate/et2_widget_selectAccount.js index f141b621eb..e9b64de849 100644 --- a/api/js/etemplate/et2_widget_selectAccount.js +++ b/api/js/etemplate/et2_widget_selectAccount.js @@ -399,7 +399,7 @@ var et2_selectAccount = (function(){ "use strict"; return et2_selectbox.extend( var ids = []; var data = {}; jQuery('#'+widget.getInstanceManager().uniqueId + '_selected li',select_col).each(function() { - var id = $j(this).attr("data-id"); + var id = jQuery(this).attr("data-id"); // Add to list ids.push(id); diff --git a/api/js/etemplate/et2_widget_selectbox.js b/api/js/etemplate/et2_widget_selectbox.js index e97c87f161..d2aa60d02a 100644 --- a/api/js/etemplate/et2_widget_selectbox.js +++ b/api/js/etemplate/et2_widget_selectbox.js @@ -245,7 +245,7 @@ var et2_selectbox = (function(){ "use strict"; return et2_inputWidget.extend( return this._appendMultiOption(_value, _label, _title, dom_element); } - var option = $j(document.createElement("option")) + var option = jQuery(document.createElement("option")) .attr("value", _value) .text(_label+""); @@ -328,7 +328,7 @@ var et2_selectbox = (function(){ "use strict"; return et2_inputWidget.extend( */ createInputWidget: function() { // Create the base input widget - this.input = $j(document.createElement("select")) + this.input = jQuery(document.createElement("select")) .addClass("et2_selectbox") .attr("size", this.options.rows); @@ -630,7 +630,7 @@ var et2_selectbox = (function(){ "use strict"; return et2_inputWidget.extend( if (!this.expand_button) { var button_id = this.getInstanceManager().uniqueId+'_'+this.id.replace(/\./g, '-') + "_expand"; - this.expand_button = $j("
    "); }; add_to_popup(this.favorite_popup.state); - $j("#"+this.appname+"_favorites_popup_state",this.favorite_popup) + jQuery("#"+this.appname+"_favorites_popup_state",this.favorite_popup) .replaceWith( - $j(filter_list.join("")).attr("id",this.appname+"_favorites_popup_state") + jQuery(filter_list.join("")).attr("id",this.appname+"_favorites_popup_state") ); - $j("#"+this.appname+"_favorites_popup_state",this.favorite_popup) + jQuery("#"+this.appname+"_favorites_popup_state",this.favorite_popup) .hide() .siblings(".ui-icon-circle-plus") .removeClass("ui-icon-circle-minus"); @@ -690,7 +690,7 @@ var AppJS = (function(){ "use strict"; return Class.extend( } // Create popup - this.favorite_popup = $j('
    \ + this.favorite_popup = jQuery('
    \
    \