Deprecate $j global variable and replace them all with standard jQuery

This commit is contained in:
Hadi Nategh 2016-06-02 16:51:15 +02:00
parent d47e4889dc
commit 87fb94a496
103 changed files with 1123 additions and 1123 deletions

View File

@ -62,8 +62,8 @@ app.classes.addressbook = AppJS.extend(
var content = this.et2.getArrayMgr('content').data; var content = this.et2.getArrayMgr('content').data;
if (typeof content.showsearchbuttons == 'undefined' || !content.showsearchbuttons) if (typeof content.showsearchbuttons == 'undefined' || !content.showsearchbuttons)
{ {
this.show_custom_country($j('select[id*="adr_one_countrycode"]').get(0)); this.show_custom_country(jQuery('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_two_countrycode"]').get(0));
// Instanciate infolog JS too - wrong app, so it won't be done automatically // 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') 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 // Find the infolog list
var list = etemplate2.getById( 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; var nm = list ? list.widgetContainer.getWidgetById('nm') : null;
if(nm) if(nm)
@ -547,7 +547,7 @@ app.classes.addressbook = AppJS.extend(
{ {
selectbox.value = "-custom-"; selectbox.value = "-custom-";
// Chosen needs this to update // Chosen needs this to update
$j(selectbox).trigger("liszt:updated"); jQuery(selectbox).trigger("liszt:updated");
custom_field.style.display = "inline"; custom_field.style.display = "inline";
} }

View File

@ -892,8 +892,8 @@ app.classes.admin = AppJS.extend(
*/ */
wizard_popup_resize: function () wizard_popup_resize: function ()
{ {
var $main_div = $j('#popupMainDiv'); var $main_div = jQuery('#popupMainDiv');
var $et2 = $j('.et2_container'); var $et2 = jQuery('.et2_container');
var w = { var w = {
width: egw_getWindowInnerWidth(), width: egw_getWindowInnerWidth(),
height: egw_getWindowInnerHeight() height: egw_getWindowInnerHeight()

View File

@ -492,7 +492,7 @@ egwAction.prototype.updateActions = function(_actions, _app)
*/ */
egwAction.prototype.not_disableClass = function(_action, _senders, _target) 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) 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);
}; };
/** /**

View File

@ -88,11 +88,11 @@ function egwDragActionImplementation()
ai.defaultDDHelper = function (_selected) ai.defaultDDHelper = function (_selected)
{ {
// Table containing clone of rows // 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 ... // 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 // Main div helper container
var div = $j(document.createElement("div")).append(table); var div = jQuery(document.createElement("div")).append(table);
var rows = []; var rows = [];
// Maximum number of rows to show // Maximum number of rows to show
@ -103,7 +103,7 @@ function egwDragActionImplementation()
var index = 0; var index = 0;
for (var i = 0; i < _selected.length;i++) 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) if (row)
{ {
rows.push(row); rows.push(row);
@ -113,7 +113,7 @@ function egwDragActionImplementation()
if (index == maxRows) if (index == maxRows)
{ {
// Lable to show number of items // Lable to show number of items
var spanCnt = $j(document.createElement('span')) var spanCnt = jQuery(document.createElement('span'))
.addClass('et2_egw_action_ddHelper_itemsCnt') .addClass('et2_egw_action_ddHelper_itemsCnt')
.appendTo(div); .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); div.append(text);
// Add notice of Ctrl key, if supported // Add notice of Ctrl key, if supported
@ -192,24 +192,24 @@ function egwDragActionImplementation()
// Tell jQuery to include this property // Tell jQuery to include this property
jQuery.event.props.push('dataTransfer'); jQuery.event.props.push('dataTransfer');
$j(node).off("mousedown") jQuery(node).off("mousedown")
.on("mousedown", function(event) { .on("mousedown", function(event) {
var dragOut = _context.isDragOut(event); var dragOut = _context.isDragOut(event);
$j(this).attr("draggable", dragOut? "true" : ""); jQuery(this).attr("draggable", dragOut? "true" : "");
$j(node).draggable("option","disabled",dragOut); jQuery(node).draggable("option","disabled",dragOut);
if (dragOut) if (dragOut)
{ {
// Disabling draggable adds some UI classes, but we don't care so remove them // 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 else
{ {
if (_context.isSelection(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 // 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) else if(event.which != 3)
{ {
@ -220,7 +220,7 @@ function egwDragActionImplementation()
}) })
.on ("mouseup", function (event){ .on ("mouseup", function (event){
if (_context.isSelection(event)) if (_context.isSelection(event))
$j(node).draggable("enable"); jQuery(node).draggable("enable");
}) })
.on("dragstart", function(event) { .on("dragstart", function(event) {
if(_context.isSelection(event)) return; if(_context.isSelection(event)) return;
@ -272,7 +272,7 @@ function egwDragActionImplementation()
// Create drag icon // Create drag icon
_callback.call(_context, _context, ai); _callback.call(_context, _context, ai);
// Drag icon must be visible for setDragImage() - we'll remove it on drag // 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); event.dataTransfer.setDragImage(ai.helper[0],-12,-12);
}) })
.on("drag", function(e) { .on("drag", function(e) {
@ -287,13 +287,13 @@ function egwDragActionImplementation()
else else
{ {
// Use Ctrl key in order to select content // Use Ctrl key in order to select content
$j(node).off("mousedown") jQuery(node).off("mousedown")
.on({ .on({
mousedown: function(event){ mousedown: function(event){
if (_context.isSelection(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 // 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) else if(event.which != 3)
{ {
@ -301,13 +301,13 @@ function egwDragActionImplementation()
} }
}, },
mouseup: function (){ mouseup: function (){
$j(node).draggable("enable"); jQuery(node).draggable("enable");
// Set cursor back to auto. Seems FF can't handle cursor reversion // 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, "distance": 20,
"cursor": "move", "cursor": "move",
@ -322,8 +322,8 @@ function egwDragActionImplementation()
// and the multiple dragDropTypes (ai.ddTypes) // and the multiple dragDropTypes (ai.ddTypes)
_callback.call(_context, false, ai); _callback.call(_context, false, ai);
$j(node).data("ddTypes", ai.ddTypes); jQuery(node).data("ddTypes", ai.ddTypes);
$j(node).data("selected", ai.selected); jQuery(node).data("selected", ai.selected);
if (ai.helper) if (ai.helper)
{ {
@ -334,12 +334,12 @@ function egwDragActionImplementation()
// fixes a bug in IE: If the element isn't inserted into // fixes a bug in IE: If the element isn't inserted into
// the DOM-tree jquery appends it to the parent node. // the DOM-tree jquery appends it to the parent node.
// In case this is a table it doesn't work correctly // 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 ai.helper;
} }
// Return an empty div if the helper dom node is not set // 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) { "start": function(e) {
return ai.helper != null; return ai.helper != null;
@ -396,8 +396,8 @@ function egwDragActionImplementation()
{ {
var node = _aoi.getDOMNode(); var node = _aoi.getDOMNode();
if (node && $j(node).data("uiDraggable")){ if (node && jQuery(node).data("uiDraggable")){
$j(node).draggable("destroy"); jQuery(node).draggable("destroy");
} }
}; };
@ -435,7 +435,7 @@ function egwDragActionImplementation()
// Push the dragType of the associated action object onto the // Push the dragType of the associated action object onto the
// drag type list - this allows an element to support multiple // drag type list - this allows an element to support multiple
// drag/drop types. // 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++) for(var i = 0; i < type.length; i++)
{ {
if (this.ddTypes.indexOf(type[i]) == -1) if (this.ddTypes.indexOf(type[i]) == -1)
@ -544,7 +544,7 @@ function egwDropActionImplementation()
if (node) if (node)
{ {
$j(node).droppable( jQuery(node).droppable(
{ {
"accept": function(_draggable) { "accept": function(_draggable) {
if (typeof _draggable.data("ddTypes") != "undefined") if (typeof _draggable.data("ddTypes") != "undefined")
@ -646,7 +646,7 @@ function egwDropActionImplementation()
}, 0); // Timeout is needed to have it working in IE }, 0); // Timeout is needed to have it working in IE
} }
// Set cursor back to auto. Seems FF can't handle cursor reversion // 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}); _aoi.triggerEvent(EGW_AI_DRAG_OUT,{event: event,ui:ui});
}, },
@ -672,8 +672,8 @@ function egwDropActionImplementation()
{ {
var node = _aoi.getDOMNode(); var node = _aoi.getDOMNode();
if (node && $j(node).data("uiDroppable")) { if (node && jQuery(node).data("uiDroppable")) {
$j(node).droppable("destroy"); jQuery(node).droppable("destroy");
} }
}; };

View File

@ -165,7 +165,7 @@ function egwPopupActionImplementation()
}; };
if (egwIsMobile()) { if (egwIsMobile()) {
$j(_node).bind('click', defaultHandler); jQuery(_node).bind('click', defaultHandler);
} else { } else {
_node.ondblclick = defaultHandler; _node.ondblclick = defaultHandler;
} }
@ -301,8 +301,8 @@ function egwPopupActionImplementation()
}; };
// Safari still needs the taphold to trigger contextmenu // Safari still needs the taphold to trigger contextmenu
// Chrome has default event on touch and hold which acts like right click // Chrome has default event on touch and hold which acts like right click
$j(_node).bind('taphold', contextHandler); jQuery(_node).bind('taphold', contextHandler);
$j(_node).on('contextmenu', contextHandler); jQuery(_node).on('contextmenu', contextHandler);
}; };
ai.doRegisterAction = function(_aoi, _callback, _context) ai.doRegisterAction = function(_aoi, _callback, _context)
@ -353,8 +353,8 @@ function egwPopupActionImplementation()
// Calculate context menu position from the given DOM-Node // Calculate context menu position from the given DOM-Node
var node = _context; var node = _context;
x = $j(node).offset().left; x = jQuery(node).offset().left;
y = $j(node).offset().top; y = jQuery(node).offset().top;
_context = {"posx": x, "posy": y}; _context = {"posx": x, "posy": y};
} }
@ -727,7 +727,7 @@ function egwPopupActionImplementation()
if(document.queryCommandSupported('copy')) if(document.queryCommandSupported('copy'))
{ {
$j(action.data.target).trigger('copy'); jQuery(action.data.target).trigger('copy');
} }
},true); },true);
clipboard_action.group = 2.5; clipboard_action.group = 2.5;
@ -735,9 +735,9 @@ function egwPopupActionImplementation()
var os_clipboard_caption = this._context.event.originalEvent.target.innerHTML.trim(); 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.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; 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 // 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'); var old_select = target.css('user-select');
target.css('user-select','all'); target.css('user-select','all');
@ -754,12 +754,12 @@ function egwPopupActionImplementation()
// only supported in IE, and make sure there's clipboardData object // only supported in IE, and make sure there's clipboardData object
if (typeof event.target.setActive !='undefined' && window.clipboardData) 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) if(event.clipboardData)
{ {
event.clipboardData.setData('text/plain', $j(clipboard_action.data.target).text().trim()); event.clipboardData.setData('text/plain', jQuery(clipboard_action.data.target).text().trim());
event.clipboardData.setData('text/html', $j(clipboard_action.data.target).html()); event.clipboardData.setData('text/html', jQuery(clipboard_action.data.target).html());
} }
// Show fail message, just in case // Show fail message, just in case
egw.message(egw.lang('Use Ctrl-C/Cmd-C to copy')); egw.message(egw.lang('Use Ctrl-C/Cmd-C to copy'));

View File

@ -25,7 +25,7 @@ function dhtmlxTree_getNode(_tree, _itemId) {
{ {
// Get the outer html table node of the tree node - return the first // Get the outer html table node of the tree node - return the first
// "tr" child of the element // "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) { aoi.doTriggerEvent = function(_event) {
if (_event == EGW_AI_DRAG_OVER) if (_event == EGW_AI_DRAG_OVER)
{ {
$j(this.node).addClass("draggedOver"); jQuery(this.node).addClass("draggedOver");
} }
if (_event == EGW_AI_DRAG_OUT) if (_event == EGW_AI_DRAG_OUT)
{ {
$j(this.node).removeClass("draggedOver"); jQuery(this.node).removeClass("draggedOver");
} }
} }

View File

@ -145,11 +145,11 @@ function _egw_nodeIsInInput(_node)
/** /**
* Register the onkeypress handler on the document * 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 // Fetch the key down event and translate it into browser-independent and
// easy to use key codes and shift states // 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 // Translate the given key code and make it valid
var keyCode = e.which; var keyCode = e.which;
@ -178,7 +178,7 @@ $j(document).ready(function() {
/** /**
* Required to catch the context menu * 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 // Check for actual key press
if(!(event.originalEvent.x == 1 && event.originalEvent.y == 1)) return true; 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)) if(!event.ctrlKey && egw_keyHandler(EGW_KEY_MENU, event.shiftKey, event.ctrlKey || event.metaKey, event.altKey))

View File

@ -1071,7 +1071,7 @@ function doScrollCheck() {
} }
// Expose jQuery to the global object // Expose jQuery to the global object
return (window.jQuery = window.$j = jQuery); return (window.jQuery = window.jQuery = jQuery);
})(); })();

View File

@ -153,13 +153,13 @@ var egw_json_files = {};
/** /**
* Initialize the egw_json_files object with all files which are already bound in * Initialize the egw_json_files object with all files which are already bound in
*/ */
$j(document).ready(function() { jQuery(document).ready(function() {
$j("script, link").each(function() { jQuery("script, link").each(function() {
var file = false; var file = false;
if ($j(this).attr("src")) { if (jQuery(this).attr("src")) {
file = $j(this).attr("src"); file = jQuery(this).attr("src");
} else if ($j(this).attr("href")) { } else if (jQuery(this).attr("href")) {
file = $j(this).attr("href"); file = jQuery(this).attr("href");
} }
if (file) { if (file) {
egw_json_files[file] = true; 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 //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, async: is_async,
context: this, context: this,
data: request_obj, data: request_obj,
@ -514,7 +514,7 @@ egw_json_request.prototype.handleResponse = function(data, textStatus, XMLHttpRe
{ {
try 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); jQueryObject[res.data.func].apply(jQueryObject, res.data.parms);
} }
catch (e) catch (e)
@ -764,7 +764,7 @@ function _egw_json_getFormValues(serialized, children, _filterClass)
if (typeof child.childNodes != "undefined") if (typeof child.childNodes != "undefined")
_egw_json_getFormValues(serialized, child.childNodes, _filterClass); _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); //alert('_egw_json_getFormValues(,,'+_filterClass+') calling _egw_json_getFormValue for name='+child.name+', class='+child.class+', value='+child.value);
_egw_json_getFormValue(serialized, child); _egw_json_getFormValue(serialized, child);

View File

@ -257,7 +257,7 @@ var et2_DOMWidget = (function(){ "use strict"; return et2_widget.extend(et2_IDOM
set_parent_node: function(_node) { set_parent_node: function(_node) {
if(typeof _node == "string") if(typeof _node == "string")
{ {
var parent = $j('#'+_node); var parent = jQuery('#'+_node);
if(parent.length == 0 ) if(parent.length == 0 )
{ {
this.egw().debug('warn','Unable to find DOM parent node with ID "%s" for widget %o.',_node,this); 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) if (_value)
{ {
$j(node).hide(); jQuery(node).hide();
} }
else 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); var node = this.getDOMNode(this);
if (node) 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); var node = this.getDOMNode(this);
if (node) 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"]) if (this["class"])
{ {
$j(node).removeClass(this["class"]); jQuery(node).removeClass(this["class"]);
} }
$j(node).addClass(_value); jQuery(node).addClass(_value);
} }
this["class"] = _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); var node = this.getDOMNode(this);
if (node) 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) for(var i=0; i < pairs.length; ++i)
{ {
var name_value = pairs[i].split(':'); 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) switch(_event)
{ {
case EGW_AI_DRAG_OVER: case EGW_AI_DRAG_OVER:
$j(this.node).addClass("ui-state-active"); jQuery(this.node).addClass("ui-state-active");
break; break;
case EGW_AI_DRAG_OUT: case EGW_AI_DRAG_OUT:
$j(this.node).removeClass("ui-state-active"); jQuery(this.node).removeClass("ui-state-active");
break; break;
} }
}; };

View File

@ -107,7 +107,7 @@ var et2_baseWidget = (function(){ "use strict"; return et2_DOMWidget.extend(et2_
this.hideMessage(false, true); this.hideMessage(false, true);
// Create the message div and add it to the "surroundings" manager // 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("message")
.addClass(_type) .addClass(_type)
.addClass(_floating ? "floating" : "") .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 // Remove the binding to the click handler
if (this.node) if (this.node)
{ {
$j(this.node).unbind("click.et2_baseWidget"); jQuery(this.node).unbind("click.et2_baseWidget");
} }
this._super.apply(this, arguments); 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 // Add the binding for the click handler
if (this.node) 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); 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 // Update the statustext
@ -262,7 +262,7 @@ var et2_baseWidget = (function(){ "use strict"; return et2_DOMWidget.extend(et2_
this.statustext = _value; this.statustext = _value;
//Get the domnode the tooltip should be attached to //Get the domnode the tooltip should be attached to
var elem = $j(this.getTooltipElement()); var elem = jQuery(this.getTooltipElement());
if (elem) if (elem)
{ {
@ -354,15 +354,15 @@ var et2_placeholder = (function(){ "use strict"; return et2_baseWidget.extend([e
this.visible = false; this.visible = false;
// Create the placeholder div // Create the placeholder div
this.placeDiv = $j(document.createElement("span")) this.placeDiv = jQuery(document.createElement("span"))
.addClass("et2_placeholder"); .addClass("et2_placeholder");
var headerNode = $j(document.createElement("span")) var headerNode = jQuery(document.createElement("span"))
.text(this._type || "") .text(this._type || "")
.addClass("et2_caption") .addClass("et2_caption")
.appendTo(this.placeDiv); .appendTo(this.placeDiv);
var attrsCntr = $j(document.createElement("span")) var attrsCntr = jQuery(document.createElement("span"))
.appendTo(this.placeDiv) .appendTo(this.placeDiv)
.hide(); .hide();
@ -384,7 +384,7 @@ var et2_placeholder = (function(){ "use strict"; return et2_baseWidget.extend([e
{ {
if (typeof this.attrNodes[key] == "undefined") if (typeof this.attrNodes[key] == "undefined")
{ {
this.attrNodes[key] = $j(document.createElement("span")) this.attrNodes[key] = jQuery(document.createElement("span"))
.addClass("et2_attr"); .addClass("et2_attr");
attrsCntr.append(this.attrNodes[key]); attrsCntr.append(this.attrNodes[key]);
} }

View File

@ -613,7 +613,7 @@ function et2_insertLinkText(_text, _node, _target)
egw.debug("warn", "et2_activateLinks gave bad data", s, _node, _target); egw.debug("warn", "et2_activateLinks gave bad data", s, _node, _target);
s.href = ""; s.href = "";
} }
var a = $j(document.createElement("a")) var a = jQuery(document.createElement("a"))
.attr("href", s.href) .attr("href", s.href)
.text(s.text); .text(s.text);

View File

@ -81,8 +81,8 @@ var et2_inputWidget = (function(){ "use strict"; return et2_valueWidget.extend([
var node = this.getInputNode(); var node = this.getInputNode();
if (node) if (node)
{ {
$j(node).unbind("change.et2_inputWidget"); jQuery(node).unbind("change.et2_inputWidget");
$j(node).unbind("focus"); jQuery(node).unbind("focus");
} }
this._super.apply(this, arguments); this._super.apply(this, arguments);
@ -113,7 +113,7 @@ var et2_inputWidget = (function(){ "use strict"; return et2_valueWidget.extend([
var node = this.getInputNode(); var node = this.getInputNode();
if (node) if (node)
{ {
$j(node) jQuery(node)
.off('.et2_inputWidget') .off('.et2_inputWidget')
.bind("change.et2_inputWidget", this, function(e) { .bind("change.et2_inputWidget", this, function(e) {
e.data.change.call(e.data, this); 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); this._super.apply(this,arguments);
// $j(this.getInputNode()).attr("novalidate","novalidate"); // Stop browser from getting involved // jQuery(this.getInputNode()).attr("novalidate","novalidate"); // Stop browser from getting involved
// $j(this.getInputNode()).validator(); // jQuery(this.getInputNode()).validator();
}, },
detatchFromDOM: function() { detatchFromDOM: function() {
// if(this.getInputNode()) { // if(this.getInputNode()) {
// $j(this.getInputNode()).data("validator").destroy(); // jQuery(this.getInputNode()).data("validator").destroy();
// } // }
this._super.apply(this,arguments); this._super.apply(this,arguments);
}, },
@ -183,10 +183,10 @@ var et2_inputWidget = (function(){ "use strict"; return et2_valueWidget.extend([
var node = this.getInputNode(); var node = this.getInputNode();
if (node) if (node)
{ {
$j(node).val(_value); jQuery(node).val(_value);
if(this.isAttached() && this._oldValue !== et2_no_init && this._oldValue !== _value) if(this.isAttached() && this._oldValue !== et2_no_init && this._oldValue !== _value)
{ {
$j(node).change(); jQuery(node).change();
} }
} }
this._oldValue = _value; this._oldValue = _value;
@ -220,7 +220,7 @@ var et2_inputWidget = (function(){ "use strict"; return et2_valueWidget.extend([
if (node) if (node)
{ {
if(_value && !this.options.readonly) { if(_value && !this.options.readonly) {
$j(node).attr("required", "required"); jQuery(node).attr("required", "required");
} else { } else {
node.removeAttribute("required"); node.removeAttribute("required");
} }
@ -235,12 +235,12 @@ var et2_inputWidget = (function(){ "use strict"; return et2_valueWidget.extend([
if (_value === false) if (_value === false)
{ {
this.hideMessage(); this.hideMessage();
$j(node).removeClass("invalid"); jQuery(node).removeClass("invalid");
} }
else else
{ {
this.showMessage(_value, "validation_error"); 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 // If on a tab, switch to that tab so user can see it
var widget = this; var widget = this;
@ -274,7 +274,7 @@ var et2_inputWidget = (function(){ "use strict"; return et2_valueWidget.extend([
var node = this.getInputNode(); var node = this.getInputNode();
if (node) if (node)
{ {
var val = $j(node).val(); var val = jQuery(node).val();
return val; return val;
} }

View File

@ -23,7 +23,7 @@ var et2_IDOMNode = new Interface({
* a plain DOM node. If you want to return an jQuery object as you receive * a plain DOM node. If you want to return an jQuery object as you receive
* it with * it with
* *
* obj = $j(node); * obj = jQuery(node);
* *
* simply return obj[0]; * simply return obj[0];
* *

View File

@ -81,7 +81,7 @@ var et2_valueWidget = (function(){ "use strict"; return et2_baseWidget.extend(
// Create the label container if it didn't exist yet // Create the label container if it didn't exist yet
if (this._labelContainer == null) if (this._labelContainer == null)
{ {
this._labelContainer = $j(document.createElement("label")) this._labelContainer = jQuery(document.createElement("label"))
.addClass("et2_label"); .addClass("et2_label");
this.getSurroundings().insertDOMNode(this._labelContainer[0]); this.getSurroundings().insertDOMNode(this._labelContainer[0]);
} }

View File

@ -61,7 +61,7 @@ var et2_dataview = (function(){ "use strict"; return Class.extend({
init: function(_parentNode, _egw) { init: function(_parentNode, _egw) {
// Copy the arguments // Copy the arguments
this.parentNode = $j(_parentNode); this.parentNode = jQuery(_parentNode);
this.egw = _egw; this.egw = _egw;
// Initialize some variables // Initialize some variables
@ -235,15 +235,15 @@ var et2_dataview = (function(){ "use strict"; return Class.extend({
</table> </table>
*/ */
this.containerTr = $j(document.createElement("tr")); this.containerTr = jQuery(document.createElement("tr"));
this.headTr = $j(document.createElement("tr")); this.headTr = jQuery(document.createElement("tr"));
this.thead = $j(document.createElement("thead")) this.thead = jQuery(document.createElement("thead"))
.append(this.headTr); .append(this.headTr);
this.tbody = $j(document.createElement("tbody")) this.tbody = jQuery(document.createElement("tbody"))
.append(this.containerTr); .append(this.containerTr);
this.table = $j(document.createElement("table")) this.table = jQuery(document.createElement("table"))
.addClass("egwGridView_outer") .addClass("egwGridView_outer")
.append(this.thead, this.tbody) .append(this.thead, this.tbody)
.appendTo(this.parentNode); .appendTo(this.parentNode);
@ -330,14 +330,14 @@ var et2_dataview = (function(){ "use strict"; return Class.extend({
var subBorder = 0; var subBorder = 0;
var subHBorder = 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) { if (maj < 2) {
subBorder = 1; // Versions <= FF 3.6 subBorder = 1; // Versions <= FF 3.6
} }
} }
if ($j.browser.webkit) if (jQuery.browser.webkit)
{ {
if (!first) if (!first)
{ {
@ -345,7 +345,7 @@ var et2_dataview = (function(){ "use strict"; return Class.extend({
} }
subHBorder = 1; subHBorder = 1;
} }
if (($j.browser.msie || $j.browser.opera) && first) if ((jQuery.browser.msie || jQuery.browser.opera) && first)
{ {
subBorder = -1; subBorder = -1;
} }
@ -399,11 +399,11 @@ var et2_dataview = (function(){ "use strict"; return Class.extend({
var col = this.columns[i]; var col = this.columns[i];
// Create the column header and the container element // Create the column header and the container element
var cont = $j(document.createElement("div")) var cont = jQuery(document.createElement("div"))
.addClass("innerContainer") .addClass("innerContainer")
.addClass(col.divClass); .addClass(col.divClass);
var column = $j(document.createElement("th")) var column = jQuery(document.createElement("th"))
.addClass(col.tdClass) .addClass(col.tdClass)
.attr("align", "left") .attr("align", "left")
.append(cont) .append(cont)
@ -472,12 +472,12 @@ var et2_dataview = (function(){ "use strict"; return Class.extend({
*/ */
_buildSelectCol: function() { _buildSelectCol: function() {
// Build the "select columns" icon // Build the "select columns" icon
this.selectColIcon = $j(document.createElement("span")) this.selectColIcon = jQuery(document.createElement("span"))
.addClass("selectcols") .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 // Build the option column
this.selectCol = $j(document.createElement("th")) this.selectCol = jQuery(document.createElement("th"))
.addClass("optcol") .addClass("optcol")
.append(this.selectColIcon) .append(this.selectColIcon)
// Toggle display of option popup // 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); this.grid = new et2_dataview_grid(null, null, this.egw, this.rowProvider, 19);
// Insert the grid into the DOM-Tree // 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.replaceWith(tr);
this.containerTr = 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 // Clone the table and attach it to the outer body tag
var clone = this.table.clone(); var clone = this.table.clone();
$j(window.top.document.getElementsByTagName("body")[0]) jQuery(window.top.document.getElementsByTagName("body")[0])
.append(clone); .append(clone);
// Read the scrollbar width // 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 // 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. // 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. // 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"); .css("height", "1000px");
var div_outer = $j(document.createElement("div")) var div_outer = jQuery(document.createElement("div"))
.css("height", "100px") .css("height", "100px")
.css("width", "100px") .css("width", "100px")
.css("overflow", "auto") .css("overflow", "auto")
.append(div_inner); .append(div_inner);
var td = $j(document.createElement("td")) var td = jQuery(document.createElement("td"))
.append(div_outer); .append(div_outer);
// Store the scrollbar width statically. // 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()); var width = Math.max(10, div_outer.outerWidth() - div_inner.outerWidth());
// Remove the elements again // Remove the elements again
@ -578,14 +578,14 @@ var et2_dataview = (function(){ "use strict"; return Class.extend({
*/ */
_getHeaderBorderWidth: function(_table) { _getHeaderBorderWidth: function(_table) {
// Create a temporary th which is appended to the outer thead row // 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"); .addClass("innerContainer");
var th = $j(document.createElement("th")) var th = jQuery(document.createElement("th"))
.append(cont); .append(cont);
// Insert the th into the document tree // Insert the th into the document tree
$j("thead tr", _table).append(th); jQuery("thead tr", _table).append(th);
// Calculate the total border width // Calculate the total border width
var width = th.outerWidth(true) - cont.width(); var width = th.outerWidth(true) - cont.width();
@ -601,14 +601,14 @@ var et2_dataview = (function(){ "use strict"; return Class.extend({
*/ */
_getColumnBorderWidth : function(_table) { _getColumnBorderWidth : function(_table) {
// Create a temporary th which is appended to the outer thead row // 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"); .addClass("innerContainer");
var td = $j(document.createElement("td")) var td = jQuery(document.createElement("td"))
.append(cont); .append(cont);
// Insert the th into the document tree // Insert the th into the document tree
$j("tbody tr", _table).append(td); jQuery("tbody tr", _table).append(td);
// Calculate the total border width // Calculate the total border width
_table.addClass("egwGridView_grid"); _table.addClass("egwGridView_grid");

View File

@ -266,7 +266,7 @@ var et2_dataview_controller = (function(){ "use strict"; return Class.extend({
*/ */
getRowByNode: function(node) { getRowByNode: function(node) {
// Whatever the node, find a TR // Whatever the node, find a TR
var row_node = $j(node).closest('tr'); var row_node = jQuery(node).closest('tr');
var row = false var row = false
// Check index map - simple case // 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 // Get the average height, the "-5" derives from the td padding
var avg = Math.round(this._grid.getAverageHeight() - 5) + "px"; var avg = Math.round(this._grid.getAverageHeight() - 5) + "px";
var prototype = this._grid.getRowProvider().getPrototype("loading"); var prototype = this._grid.getRowProvider().getPrototype("loading");
$j("div", prototype).css("height", avg); jQuery("div", prototype).css("height", avg);
var node = _entry.row.getJNode(); var node = _entry.row.getJNode();
node.empty(); node.empty();
node.append(prototype.children()); node.append(prototype.children());
@ -629,13 +629,13 @@ var et2_dataview_controller = (function(){ "use strict"; return Class.extend({
var d = this.self.getDepth(); var d = this.self.getDepth();
if (d > 0) if (d > 0)
{ {
$j(tr).addClass("subentry"); jQuery(tr).addClass("subentry");
$j("td:first",tr).children("div").last().addClass("level_" + d + " indentation"); jQuery("td:first",tr).children("div").last().addClass("level_" + d + " indentation");
if(this.entry.idx == 0) if(this.entry.idx == 0)
{ {
// Set the CSS for the level - required so columns line up // Set the CSS for the level - required so columns line up
var indent = $j("<span class='indentation'/>").appendTo('body'); var indent = jQuery("<span class='indentation'/>").appendTo('body');
egw.css(".subentry td div.innerContainer.level_"+d, egw.css(".subentry td div.innerContainer.level_"+d,
"margin-right:" + (parseInt(indent.css("margin-right")) * d) + "px" "margin-right:" + (parseInt(indent.css("margin-right")) * d) + "px"
); );
@ -879,7 +879,7 @@ var et2_dataview_controller = (function(){ "use strict"; return Class.extend({
} }
else 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)); this.self._selectionMgr.unregisterRow("",0,row.get(0));
} }
@ -899,13 +899,13 @@ var et2_dataview_controller = (function(){ "use strict"; return Class.extend({
*/ */
_emptyRow: function() _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")) if(typeof this._grid._rowProvider != "undefined" && this._grid._rowProvider.getPrototype("empty"))
{ {
var placeholder = 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); placeholder.appendTo(this._grid.innerTbody);

View File

@ -40,7 +40,7 @@ function et2_dataview_rowAOI(_node)
aoi.selectMode = EGW_SELECTMODE_DEFAULT; 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 // Rows without a checkbox OR an id set are unselectable
aoi.doGetDOMNode = function() { aoi.doGetDOMNode = function() {
@ -49,7 +49,7 @@ function et2_dataview_rowAOI(_node)
// Prevent the browser from selecting the content of the element, when // Prevent the browser from selecting the content of the element, when
// a special key is pressed. // a special key is pressed.
$j(_node).mousedown(egwPreventSelect); jQuery(_node).mousedown(egwPreventSelect);
/** /**
* Now append some action code to the node * Now append some action code to the node
@ -106,7 +106,7 @@ function et2_dataview_rowAOI(_node)
}; };
if (egwIsMobile()) { if (egwIsMobile()) {
$j(_node).swipe({ jQuery(_node).swipe({
allowPageScroll: "vertical", allowPageScroll: "vertical",
longTapThreshold: 10, longTapThreshold: 10,
swipe: function (event, direction, distance) swipe: function (event, direction, distance)
@ -125,10 +125,10 @@ function et2_dataview_rowAOI(_node)
}); });
} else { } 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); 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; this.checkBox.checked = selected;
} }
$j(this.node).toggleClass('focused', jQuery(this.node).toggleClass('focused',
egwBitIsSet(_state, EGW_AO_STATE_FOCUSED)); egwBitIsSet(_state, EGW_AO_STATE_FOCUSED));
$j(this.node).toggleClass('selected', jQuery(this.node).toggleClass('selected',
selected); selected);
}; };

View File

@ -1237,7 +1237,7 @@ var et2_dataview_grid = (function(){ "use strict"; return et2_dataview_container
if (this._map.length === 0) if (this._map.length === 0)
{ {
// Add a dummy element to the grid // Add a dummy element to the grid
var dummy = $j(document.createElement("tr")); var dummy = jQuery(document.createElement("tr"));
this.innerTbody.append(dummy); this.innerTbody.append(dummy);
// Append the spacer to the grid // Append the spacer to the grid
@ -1324,9 +1324,9 @@ var et2_dataview_grid = (function(){ "use strict"; return et2_dataview_container
*/ */
_createNodes: function() { _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") .addClass("frame")
.attr("colspan", this._rowProvider.getColumnCount() .attr("colspan", this._rowProvider.getColumnCount()
+ (this._parentGrid ? 0 : 1)) + (this._parentGrid ? 0 : 1))
@ -1336,7 +1336,7 @@ var et2_dataview_grid = (function(){ "use strict"; return et2_dataview_container
this.scrollarea = null; this.scrollarea = null;
if (this._parentGrid == null) if (this._parentGrid == null)
{ {
this.scrollarea = $j(document.createElement("div")) this.scrollarea = jQuery(document.createElement("div"))
.addClass("egwGridView_scrollarea") .addClass("egwGridView_scrollarea")
.scroll(this, function(e) { .scroll(this, function(e) {
@ -1374,15 +1374,15 @@ var et2_dataview_grid = (function(){ "use strict"; return et2_dataview_container
} }
// Create the inner table // Create the inner table
var table = $j(document.createElement("table")) var table = jQuery(document.createElement("table"))
.addClass("egwGridView_grid") .addClass("egwGridView_grid")
.appendTo(this.scrollarea ? this.scrollarea : this.outerCell); .appendTo(this.scrollarea ? this.scrollarea : this.outerCell);
this.innerTbody = $j(document.createElement("tbody")) this.innerTbody = jQuery(document.createElement("tbody"))
.appendTo(table); .appendTo(table);
// Set the tr as container element // Set the tr as container element
this.appendNode($j(this.tr[0])); this.appendNode(jQuery(this.tr[0]));
} }
});}).call(this); });}).call(this);

View File

@ -54,14 +54,14 @@
} }
// Indicate resizing is in progress // Indicate resizing is in progress
$j(_outerElem).addClass('egwResizing'); jQuery(_outerElem).addClass('egwResizing');
// Reset the "didResize" flag // Reset the "didResize" flag
didResize = false; didResize = false;
// Create the resize helper // Create the resize helper
var left = _elem.offset().left; var left = _elem.offset().left;
helper = $j(document.createElement("div")) helper = jQuery(document.createElement("div"))
.addClass("egwResizeHelper") .addClass("egwResizeHelper")
.appendTo("body") .appendTo("body")
.css("top", _elem.offset().top + "px") .css("top", _elem.offset().top + "px")
@ -69,7 +69,7 @@
.css("height", _outerElem.outerHeight(true) + "px"); .css("height", _outerElem.outerHeight(true) + "px");
// Create the overlay which will be catching the mouse movements // Create the overlay which will be catching the mouse movements
overlay = $j(document.createElement("div")) overlay = jQuery(document.createElement("div"))
.addClass("egwResizeOverlay") .addClass("egwResizeOverlay")
.bind("mousemove", function(e) { .bind("mousemove", function(e) {
@ -99,7 +99,7 @@
function stopResize(_outerElem) function stopResize(_outerElem)
{ {
$j(_outerElem).removeClass('egwResizing'); jQuery(_outerElem).removeClass('egwResizing');
if (helper != null) if (helper != null)
{ {
helper.remove(); helper.remove();

View File

@ -33,7 +33,7 @@ var et2_dataview_row = (function(){ "use strict"; return et2_dataview_container.
this._super(_parent); this._super(_parent);
// Create the outer "tr" tag and append it to the container // 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); this.appendNode(this.tr);
// Grid row which gets expanded when clicking on the corresponding // 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 // Create the tr and the button if this has not been done yet
if (!this.expansionButton) if (!this.expansionButton)
{ {
this.expansionButton = $j(document.createElement("span")); this.expansionButton = jQuery(document.createElement("span"));
this.expansionButton.addClass("arrow closed"); this.expansionButton.addClass("arrow closed");
} }
@ -76,7 +76,7 @@ var et2_dataview_row = (function(){ "use strict"; return et2_dataview_container.
e.stopImmediatePropagation(); e.stopImmediatePropagation();
}); });
$j("td:first", this.tr).prepend(this.expansionButton); jQuery("td:first", this.tr).prepend(this.expansionButton);
} }
else else
{ {
@ -157,7 +157,7 @@ var et2_dataview_row = (function(){ "use strict"; return et2_dataview_container.
// Toggle the visibility of the expansion tr // Toggle the visibility of the expansion tr
this.expansionVisible = !this.expansionVisible; 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 // Set the class of the arrow
if (this.expansionVisible) if (this.expansionVisible)
@ -183,7 +183,7 @@ var et2_dataview_row = (function(){ "use strict"; return et2_dataview_container.
&& this.expansionContainer.implements(et2_dataview_IViewRange)) && this.expansionContainer.implements(et2_dataview_IViewRange))
{ {
// Substract the height of the own row from the container // 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; _range.top -= oh;
// Proxy the setViewRange call to the expansion container // Proxy the setViewRange call to the expansion container

View File

@ -84,12 +84,12 @@ var et2_dataview_rowProvider = (function(){ "use strict"; return Class.extend(
_createFullRowPrototype: function() { _createFullRowPrototype: function() {
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(this._outerId + "_td_fullRow") .addClass(this._outerId + "_td_fullRow")
.attr("colspan", this._columnIds.length) .attr("colspan", this._columnIds.length)
.appendTo(tr); .appendTo(tr);
var div = $j(document.createElement("div")) var div = jQuery(document.createElement("div"))
.addClass(this._outerId + "_div_fullRow") .addClass(this._outerId + "_div_fullRow")
.appendTo(td); .appendTo(td);
@ -97,15 +97,15 @@ var et2_dataview_rowProvider = (function(){ "use strict"; return Class.extend(
}, },
_createDefaultPrototype: function() { _createDefaultPrototype: function() {
var tr = $j(document.createElement("tr")); var tr = jQuery(document.createElement("tr"));
// Append a td for each column // Append a td for each column
for (var i = 0; i < this._columnIds.length; i++) 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]) .addClass(this._outerId + "_td_" + this._columnIds[i])
.appendTo(tr); .appendTo(tr);
var div = $j(document.createElement("div")) var div = jQuery(document.createElement("div"))
.addClass(this._outerId + "_div_" + this._columnIds[i]) .addClass(this._outerId + "_div_" + this._columnIds[i])
.addClass("innerContainer") .addClass("innerContainer")
.appendTo(td); .appendTo(td);
@ -115,12 +115,12 @@ var et2_dataview_rowProvider = (function(){ "use strict"; return Class.extend(
}, },
_createEmptyPrototype: function() { _createEmptyPrototype: function() {
this._prototypes["empty"] = $j(document.createElement("tr")); this._prototypes["empty"] = jQuery(document.createElement("tr"));
}, },
_createLoadingPrototype: function() { _createLoadingPrototype: function() {
var fullRow = this.getPrototype("fullRow"); var fullRow = this.getPrototype("fullRow");
$j("div", fullRow).addClass("loading"); jQuery("div", fullRow).addClass("loading");
this._prototypes["loading"] = fullRow; this._prototypes["loading"] = fullRow;
} }

View File

@ -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 // Get the spacer row and append it to the container
this.spacerNode = _rowProvider.getPrototype("spacer", this.spacerNode = _rowProvider.getPrototype("spacer",
this._createSpacerPrototype, this); this._createSpacerPrototype, this);
this._phDiv = $j("td", this.spacerNode); this._phDiv = jQuery("td", this.spacerNode);
this.appendNode(this.spacerNode); this.appendNode(this.spacerNode);
}, },
@ -90,9 +90,9 @@ var et2_dataview_spacer = (function(){ "use strict"; return et2_dataview_contain
/* ---- PRIVATE FUNCTIONS ---- */ /* ---- PRIVATE FUNCTIONS ---- */
_createSpacerPrototype: function (_outerId, _columnIds) { _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("egwGridView_spacer")
.addClass(_outerId + "_spacer_fullRow") .addClass(_outerId + "_spacer_fullRow")
.attr("colspan", _columnIds.length) .attr("colspan", _columnIds.length)

View File

@ -79,7 +79,7 @@ var et2_dataview_tile = (function(){ "use strict"; return et2_dataview_row.exten
invalidate: function() { invalidate: function() {
if(this._inTree && this.tr) 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) if(template_width)
{ {

View File

@ -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; if(typeof this.options.prefix != 'undefined') this.prefix = this.options.prefix;
// Create the table body and the table // Create the table body and the table
this.tbody = $j(document.createElement("tbody")); this.tbody = jQuery(document.createElement("tbody"));
this.table = $j(document.createElement("table")) this.table = jQuery(document.createElement("table"))
.addClass("et2_grid et2_customfield_list"); .addClass("et2_grid et2_customfield_list");
this.table.append(this.tbody); 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 // Complicated case, a single custom field you get multiple widgets
// Handle it all here, since this is the exception // Handle it all here, since this is the exception
var row = $j('tr',this.tbody).last(); var row = jQuery('tr',this.tbody).last();
var cf = $j('td',row); var cf = jQuery('td',row);
// Label in first column, widget in 2nd // Label in first column, widget in 2nd
cf.text(field.label + ""); cf.text(field.label + "");
cf = jQuery(document.createElement("td")) 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 // Complicated case, a single custom field you get multiple widgets
// Handle it all here, since this is the exception // Handle it all here, since this is the exception
var row = $j('tr',this.tbody).last(); var row = jQuery('tr',this.tbody).last();
var cf = $j('td',row); var cf = jQuery('td',row);
// Label in first column, widget in 2nd // Label in first column, widget in 2nd
cf.text(field.label + ""); 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 controls where the widget is placed in the DOM
this.rows[attrs.id] = cf[0]; 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 // Add a link to existing VFS file
var select_attrs = jQuery.extend({}, 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 // Do not store in the widgets list, one name for multiple widgets would cause problems
widget = et2_createWidget(select_attrs.type, select_attrs, this); 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; 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 // toggle() needs a boolean to do what we want
var key = _nodes[i].getAttribute('data-field'); 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); });}).call(this);

View File

@ -23,6 +23,6 @@ function itempickerDocumentAction(context, data)
+ "<input type='hidden' name='data_document_dir' value='" + data.value.dir + "' />" + "<input type='hidden' name='data_document_dir' value='" + data.value.dir + "' />"
+ "<input type='hidden' name='data_checked' value='" + data.checked.join(',') + "' />" + "<input type='hidden' name='data_checked' value='" + data.checked.join(',') + "' />"
+ "</form>"; + "</form>";
$j("body").append(form); jQuery("body").append(form);
$j("#" + formid).submit().remove(); jQuery("#" + formid).submit().remove();
} }

View File

@ -192,12 +192,12 @@ var et2_nextmatch = (function(){ "use strict"; return et2_DOMWidget.extend([et2_
global_data.fields = cfs; global_data.fields = cfs;
} }
this.div = $j(document.createElement("div")) this.div = jQuery(document.createElement("div"))
.addClass("et2_nextmatch"); .addClass("et2_nextmatch");
this.header = et2_createWidget("nextmatch_header_bar", {}, this); this.header = et2_createWidget("nextmatch_header_bar", {}, this);
this.innerDiv = $j(document.createElement("div")) this.innerDiv = jQuery(document.createElement("div"))
.appendTo(this.div); .appendTo(this.div);
// Create the dynheight component which dynamically scales the inner // 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()); this.dataview = new et2_dataview(this.innerDiv, this.egw());
// Blank placeholder // Blank placeholder
this.blank = $j(document.createElement("div")) this.blank = jQuery(document.createElement("div"))
.appendTo(this.dataview.table); .appendTo(this.dataview.table);
// We cannot create the grid controller now, as this depends on the grid // 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; this._autorefresh_timer = null;
} }
// Unbind handler used for toggling autorefresh // Unbind handler used for toggling autorefresh
$j(this.getInstanceManager().DOMContainer.parentNode).off('show.et2_nextmatch'); jQuery(this.getInstanceManager().DOMContainer.parentNode).off('show.et2_nextmatch');
$j(this.getInstanceManager().DOMContainer.parentNode).off('hide.et2_nextmatch'); jQuery(this.getInstanceManager().DOMContainer.parentNode).off('hide.et2_nextmatch');
// Free the grid components // Free the grid components
this.dataview.free(); this.dataview.free();
@ -292,7 +292,7 @@ var et2_nextmatch = (function(){ "use strict"; return et2_DOMWidget.extend([et2_
{ {
var self = this; var self = this;
// Register a handler // Register a handler
$j(this.div) jQuery(this.div)
.on('dragenter','.egwGridView_grid tr',function(e) { .on('dragenter','.egwGridView_grid tr',function(e) {
// Figure out _which_ row // Figure out _which_ row
var row = self.controller.getRowByNode(this); 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 // 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) if(this.controller && this.controller._grid)
{ {
this.controller._grid.doInvalidate = false; this.controller._grid.doInvalidate = false;
} }
},this)); },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) if(this.controller && this.controller._grid)
{ {
this.controller._grid.doInvalidate = true; 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 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 // Important to use anonymous function instead of just 'this.refresh' because
// of the parameters passed // of the parameters passed
jQuery.proxy(function() {this.refresh();},this) jQuery.proxy(function() {this.refresh();},this)
@ -594,7 +594,7 @@ var et2_nextmatch = (function(){ "use strict"; return et2_DOMWidget.extend([et2_
this.applyFilters(); this.applyFilters();
// Trigger an event so app code can act on it // Trigger an event so app code can act on it
$j(this).triggerHandler("refresh",[this]); jQuery(this).triggerHandler("refresh",[this]);
return; 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 // 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 // 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 // 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 // Save visible columns
// 'nextmatch-' prefix is there in preference name, but not in setting, so add it in // '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) if(this.options.settings.no_columnselection)
{ {
this.dataview.selectColumnsClick = function() {return false;}; this.dataview.selectColumnsClick = function() {return false;};
$j('span.selectcols',this.dataview.headTr).hide(); jQuery('span.selectcols',this.dataview.headTr).hide();
} }
else else
{ {
$j('span.selectcols',this.dataview.headTr).show(); jQuery('span.selectcols',this.dataview.headTr).show();
this.dataview.selectColumnsClick = function(event) { this.dataview.selectColumnsClick = function(event) {
self._selectColumnsClick(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); 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 // 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 // Stop
window.clearInterval(this._autorefresh_timer); 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 the autorefresh time is up, bind once to trigger a refresh
// (if needed) when tab is activated again // (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 // Check in case it was stopped / destroyed since
if(!this._autorefresh_timer || !this.getInstanceManager()) return; 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 // Important to use anonymous function instead of just 'this.refresh' because
// of the parameters passed // of the parameters passed
jQuery.proxy(function() {this.refresh();},this) jQuery.proxy(function() {this.refresh();},this)
); );
},this), time*1000); },this), time*1000);
},this)); },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 // Start normal autorefresh timer again
this._set_autorefresh(this._get_autorefresh()); this._set_autorefresh(this._get_autorefresh());
$j(e.target).off(e); jQuery(e.target).off(e);
},this)); },this));
} }
}, },
@ -1962,7 +1962,7 @@ var et2_nextmatch = (function(){ "use strict"; return et2_DOMWidget.extend([et2_
if(row.row.tr) if(row.row.tr)
{ {
// Ignore most of the UI, just use the status indicators // 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') .addClass('et2_link_to')
.width(row.row.tr.width()) .width(row.row.tr.width())
.position({my: "left top", at: "left top", of: row.row.tr}) .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) { link.div.on('link.et2_link_to', function(e, linked) {
if(!linked) if(!linked)
{ {
$j("li.success", link.file_upload.progress) jQuery("li.success", link.file_upload.progress)
.removeClass('success').addClass('validation_error'); .removeClass('success').addClass('validation_error');
} }
else else
@ -2153,7 +2153,7 @@ var et2_nextmatch = (function(){ "use strict"; return et2_DOMWidget.extend([et2_
// Add the class, gives more reliable sizing // Add the class, gives more reliable sizing
this.div.addClass('print'); this.div.addClass('print');
// Show it all // Show it all
$j('.egwGridView_scrollarea',this.div).css('height','auto'); jQuery('.egwGridView_scrollarea',this.div).css('height','auto');
} }
// We need more rows // We need more rows
if(button === 'dialog[all]' || rows > loaded_count) 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'); egw.css(nm.print_row_selector, 'display: none');
// No scrollbar in print view // 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 // 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 // Grid needs to redraw before it can be printed, so wait
window.setTimeout(jQuery.proxy(function() { 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 // Don't need more rows, limit to requested and finish
// Show it all // 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 // Use CSS to hide all but the requested rows
// Prevents us from showing more than requested, if actual height was less than average // 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'); egw.css(this.print_row_selector, 'display: none');
// No scrollbar in print view // 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 // Give dialog a chance to close, or it will be in the print
window.setTimeout(function() {defer.resolve();}, 0); 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'); this.div.removeClass('print');
// Put scrollbar back // 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 // Correct size of grid, and trigger resize to fix it
this.controller._grid.setScrollHeight(this.old_height); 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); this.favorites = et2_createWidget('favorites', widget_options, this);
// Add into header // 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) if(this.nextmatch.options.settings.lettersearch)
{ {
jQuery("td",this.lettersearch).removeClass("lettersearch_active"); 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 // Set activeFilters to current value
filters.searchletter = $j("td.lettersearch_active").attr("id"); filters.searchletter = jQuery("td.lettersearch_active").attr("id");
} }
// Reset flag // Reset flag
@ -2971,7 +2971,7 @@ var et2_nextmatch_header = (function(){ "use strict"; return et2_baseWidget.exte
init: function() { init: function() {
this._super.apply(this, arguments); this._super.apply(this, arguments);
this.labelNode = $j(document.createElement("span")); this.labelNode = jQuery(document.createElement("span"));
this.nextmatch = null; this.nextmatch = null;
this.setDOMNode(this.labelNode[0]); this.setDOMNode(this.labelNode[0]);

View File

@ -341,7 +341,7 @@ function nm_compare_field(_action, _senders, _target)
} }
else else
{ {
value = $j(field).val(); value = jQuery(field).val();
} }
if (!field) return false; if (!field) return false;
@ -466,7 +466,7 @@ function nm_submit_popup(button)
if (nm_popup_action.data.nextmatch) if (nm_popup_action.data.nextmatch)
{ {
// Find the associated widget // 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; 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) 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');
} }

View File

@ -133,7 +133,7 @@ var et2_nextmatch_controller = (function(){ "use strict"; return et2_dataview_co
// Find expanded rows // Find expanded rows
var nm = this._widget; var nm = this._widget;
var controller = this; 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); var entry = controller.getRowByNode(this);
if(entry && entry.uid) 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 // Create drag action that allows linking
drag_action = mgr.addAction('drag', 'egw_link_drag', this.egw.lang('link'), 'link', function(action, selected) { drag_action = mgr.addAction('drag', 'egw_link_drag', this.egw.lang('link'), 'link', function(action, selected) {
// Drag helper - list titles. Arbitrarily limited to 10. // 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++) for(var i = 0; i < selected.length && i < 10; i++)
{ {
var id = selected[i].id.split('::'); 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) { self.egw.link_title(id[0],id[1], function(title) {
this.append(title); this.append(title);
this.append('<br />'); this.append('<br />');

View File

@ -36,8 +36,8 @@ var et2_dynheight = (function(){ "use strict"; return Class.extend(
* @memberOf et2_dynheight * @memberOf et2_dynheight
*/ */
init: function(_outerNode, _innerNode, _minHeight) { init: function(_outerNode, _innerNode, _minHeight) {
this.outerNode = $j(_outerNode); this.outerNode = jQuery(_outerNode);
this.innerNode = $j(_innerNode); this.innerNode = jQuery(_innerNode);
this.minHeight = _minHeight; this.minHeight = _minHeight;
this.bottomNodes = []; 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 // Some checking to make sure it doesn't overflow the width when user
// resizes the window // resizes the window
var w = this.outerNode.width(); 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 // 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()) if(w != this.innerNode.outerWidth())
{ {
@ -144,7 +144,7 @@ var et2_dynheight = (function(){ "use strict"; return Class.extend(
if (_node) if (_node)
{ {
// Accumulate the outer margin of the parent elements // Accumulate the outer margin of the parent elements
var node = $j(_node); var node = jQuery(_node);
var ooh = node.outerHeight(true); var ooh = node.outerHeight(true);
var oh = node.height(); var oh = node.height();
this.outerMargin += (ooh - oh) / 2; // Divide by 2 as the value contains margin-top and -bottom 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 // recursively to the parent nodes until the _outerNode or body is
// reached. // reached.
var self = this; var self = this;
$j(_node).children().each(function() { jQuery(_node).children().each(function() {
var $this = $j(this); var $this = jQuery(this);
var top = $this.offset().top; var top = $this.offset().top;
if (this != self.innerNode[0] && top >= _bottom) 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); this._collectBottomNodes(_node.parentNode, _bottom);
} }

View File

@ -217,11 +217,11 @@ var et2_nextmatch_rowProvider = (function(){ "use strict"; return ClassWithAttri
_createEmptyPrototype: function() { _createEmptyPrototype: function() {
var label = this._context && this._context.options && this._context.options.settings.placeholder; 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()) .attr("colspan",this._rowProvider.getColumnCount())
.css("height","19px") .css("height","19px")
.text(typeof label != "undefined" && label ? label : egw().lang("No matches found")); .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") .addClass("egwGridView_empty")
.append(placeholder); .append(placeholder);
}, },

View File

@ -104,7 +104,7 @@ var et2_ajaxSelect = (function(){ "use strict"; return et2_inputWidget.extend(
}, },
createInputWidget: function() { createInputWidget: function() {
this.input = $j(document.createElement("input")); this.input = jQuery(document.createElement("input"));
this.input.addClass("et2_textbox"); 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._super.apply(this, arguments);
this.value = ""; this.value = "";
this.span = $j(document.createElement("span")); this.span = jQuery(document.createElement("span"));
this.setDOMNode(this.span[0]); this.setDOMNode(this.span[0]);
}, },

View File

@ -38,7 +38,7 @@ var et2_box = (function(){ "use strict"; return et2_baseWidget.extend([et2_IDeta
init: function() { init: function() {
this._super.apply(this, arguments); this._super.apply(this, arguments);
this.div = $j(document.createElement("div")) this.div = jQuery(document.createElement("div"))
.addClass("et2_" + this._type) .addClass("et2_" + this._type)
.addClass("et2_box_widget"); .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) for(var i=0; i < pairs.length; ++i)
{ {
var name_value = pairs[i].split(':'); 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]);
} }
} }
} }

View File

@ -96,7 +96,7 @@ var et2_button = (function(){ "use strict"; return et2_baseWidget.extend([et2_II
} }
if (!this.options.readonly || this.options.ro_image) if (!this.options.readonly || this.options.ro_image)
{ {
this.btn = $j(document.createElement("button")) this.btn = jQuery(document.createElement("button"))
.addClass("et2_button") .addClass("et2_button")
.attr({type:"button"}); .attr({type:"button"});
this.setDOMNode(this.btn[0]); this.setDOMNode(this.btn[0]);

View File

@ -83,7 +83,7 @@ var et2_checkbox = (function(){ "use strict"; return et2_inputWidget.extend(
}, },
createInputWidget: function() { 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"); this.input.addClass("et2_checkbox");
@ -91,7 +91,7 @@ var et2_checkbox = (function(){ "use strict"; return et2_inputWidget.extend(
{ {
var self = this; var self = this;
// checkbox container // checkbox container
this.toggle = $j(document.createElement('span')) this.toggle = jQuery(document.createElement('span'))
.addClass('et2_checkbox_slideSwitch') .addClass('et2_checkbox_slideSwitch')
.append(this.input); .append(this.input);
// update switch status on change // 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._super.apply(this, arguments);
this.value = ""; this.value = "";
this.span = $j(document.createElement("span")) this.span = jQuery(document.createElement("span"))
.addClass("et2_checkbox_ro"); .addClass("et2_checkbox_ro");
this.setDOMNode(this.span[0]); this.setDOMNode(this.span[0]);

View File

@ -235,7 +235,7 @@ var et2_color_ro = (function(){ "use strict"; return et2_valueWidget.extend([et2
this._super.apply(this, arguments); this._super.apply(this, arguments);
this.value = ""; this.value = "";
this.$node = $j(document.createElement("div")) this.$node = jQuery(document.createElement("div"))
.addClass("et2_color"); .addClass("et2_color");
this.setDOMNode(this.$node[0]); this.setDOMNode(this.$node[0]);

View File

@ -103,9 +103,9 @@ String: A string in the user\'s date format, or a relative date. Relative dates
createInputWidget: function() 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)); if (this.options.blur) this.input_date.attr('placeholder', this.egw().lang(this.options.blur));
this.input_date.addClass("et2_date").attr("type", "text") this.input_date.addClass("et2_date").attr("type", "text")
.attr("size", 7) // strlen("10:00pm")=7 .attr("size", 7) // strlen("10:00pm")=7
@ -707,16 +707,16 @@ var et2_date_duration = (function(){ "use strict"; return et2_date.extend(
createInputWidget: function() { createInputWidget: function() {
// Create nodes // Create nodes
this.node = $j(document.createElement("span")) this.node = jQuery(document.createElement("span"))
.addClass('et2_date_duration'); .addClass('et2_date_duration');
this.duration = $j(document.createElement("input")) this.duration = jQuery(document.createElement("input"))
.addClass('et2_date_duration') .addClass('et2_date_duration')
.attr({type: 'number', size: 3}); .attr({type: 'number', size: 3});
this.node.append(this.duration); this.node.append(this.duration);
if(this.options.display_format.length > 1) if(this.options.display_format.length > 1)
{ {
this.format = $j(document.createElement("select")) this.format = jQuery(document.createElement("select"))
.addClass('et2_date_duration'); .addClass('et2_date_duration');
this.node.append(this.format); 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]) else if (this.time_formats[this.options.display_format])
{ {
this.format = $j("<span>"+this.time_formats[this.options.display_format]+"</span>").appendTo(this.node); this.format = jQuery("<span>"+this.time_formats[this.options.display_format]+"</span>").appendTo(this.node);
} }
else else
{ {
this.format = $j("<span>"+this.time_formats["m"]+"</span>").appendTo(this.node); this.format = jQuery("<span>"+this.time_formats["m"]+"</span>").appendTo(this.node);
} }
}, },
attachToDOM: function() { attachToDOM: function() {
var node = this.getInputNode(); var node = this.getInputNode();
if (node) if (node)
{ {
$j(node).bind("change.et2_inputWidget", this, function(e) { jQuery(node).bind("change.et2_inputWidget", this, function(e) {
e.data.change(this); 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(display.unit != this.options.display_format)
{ {
if(this.format && this.format.children().length > 1) { 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 else
{ {
@ -892,9 +892,9 @@ var et2_date_duration_ro = (function(){ "use strict"; return et2_date_duration.e
* @memberOf et2_date_duration_ro * @memberOf et2_date_duration_ro
*/ */
createInputWidget: function() { createInputWidget: function() {
this.node = $j(document.createElement("span")); this.node = jQuery(document.createElement("span"));
this.duration = $j(document.createElement("span")).appendTo(this.node); this.duration = jQuery(document.createElement("span")).appendTo(this.node);
this.format = $j(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() { init: function() {
this._super.apply(this, arguments); this._super.apply(this, arguments);
this._labelContainer = $j(document.createElement("label")) this._labelContainer = jQuery(document.createElement("label"))
.addClass("et2_label"); .addClass("et2_label");
this.value = ""; 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") .addClass("et2_date_ro et2_label")
.appendTo(this._labelContainer); .appendTo(this._labelContainer);
@ -1274,12 +1274,12 @@ var et2_date_range = (function(){ "use strict"; return et2_inputWidget.extend({
this.options.relative = _value; this.options.relative = _value;
if(this.options.relative) if(this.options.relative)
{ {
$j(this.from.getDOMNode()).hide(); jQuery(this.from.getDOMNode()).hide();
$j(this.to.getDOMNode()).hide(); jQuery(this.to.getDOMNode()).hide();
} }
else 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) if(this.options.relative)
{ {
$j(this.select.getDOMNode()).show(); jQuery(this.select.getDOMNode()).show();
} }
// Show description // Show description
this.select.set_value(_value); this.select.set_value(_value);

View File

@ -108,7 +108,7 @@ var et2_description = (function(){ "use strict"; return expose(et2_baseWidget.ex
this._super.apply(this, arguments); this._super.apply(this, arguments);
// Create the span/label tag which contains the label text // 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"); .addClass("et2_label");
if (this.options["for"]) 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 // Create the label container if it didn't exist yet
if (this._labelContainer == null) if (this._labelContainer == null)
{ {
this._labelContainer = $j(document.createElement("label")) this._labelContainer = jQuery(document.createElement("label"))
.addClass("et2_label"); .addClass("et2_label");
this.getSurroundings().insertDOMNode(this._labelContainer[0]); this.getSurroundings().insertDOMNode(this._labelContainer[0]);
} }

View File

@ -75,7 +75,7 @@
* // If you override, 'this' will be the dialog DOMNode. * // If you override, 'this' will be the dialog DOMNode.
* // Things get more complicated. * // Things get more complicated.
* // Do what you like, but don't forget this line: * // Do what you like, but don't forget this line:
* $j(this).dialog("close") * jQuery(this).dialog("close")
* }, class="ui-state-error"}, * }, 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(); this._createDialog();
}, },
@ -312,7 +312,7 @@ var et2_dialog = (function(){ "use strict"; return et2_widget.extend(
this.div.empty() this.div.empty()
.append("<img class='dialog_icon' />") .append("<img class='dialog_icon' />")
.append($j('<div/>').text(message)); .append(jQuery('<div/>').text(message));
}, },
/** /**
@ -336,11 +336,11 @@ var et2_dialog = (function(){ "use strict"; return et2_widget.extend(
set_icon: function(icon_url) { set_icon: function(icon_url) {
if(icon_url == "") if(icon_url == "")
{ {
$j("img.dialog_icon",this.div).hide(); jQuery("img.dialog_icon",this.div).hide();
} }
else 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); this.div.dialog("option", "buttons", buttons);
// Focus default button so enter works // 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 // File name provided, fetch from server
this.template.load("",template,this.options.value||{}, jQuery.proxy(function() { this.template.load("",template,this.options.value||{}, jQuery.proxy(function() {
// Set focus to the first input // Set focus to the first input
$j('input',this.div).first().focus(); jQuery('input',this.div).first().focus();
},this)); },this));
} }
else else
@ -480,7 +480,7 @@ var et2_dialog = (function(){ "use strict"; return et2_widget.extend(
title: this.options.title, title: this.options.title,
open: function() { open: function() {
// Focus default button so enter works // 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), close: jQuery.proxy(function() {this.destroy();},this),
beforeClose: this.options.beforeClose 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() { {"button_id": et2_dialog.CANCEL_BUTTON,"text": egw.lang('cancel'), click: function() {
// Cancel run // Cancel run
cancel = true; 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,''); update.call(_list.length,'');
}} }}
]; ];
@ -719,7 +719,7 @@ jQuery.extend(et2_dialog, //(function(){ "use strict"; return
}, parent); }, parent);
// OK starts disabled // 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 log = null;
var progressbar = null; var progressbar = null;
@ -761,8 +761,8 @@ jQuery.extend(et2_dialog, //(function(){ "use strict"; return
{ {
// All done // All done
if(!cancel) progressbar.set_value(100); if(!cancel) progressbar.set_value(100);
$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");
$j("button[button_id="+et2_dialog.OK_BUTTON+"]", dialog.div.parent()).button("enable"); jQuery("button[button_id="+et2_dialog.OK_BUTTON+"]", dialog.div.parent()).button("enable");
if (!cancel && typeof _callback == "function") if (!cancel && typeof _callback == "function")
{ {
_callback.call(dialog, true, response); _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 // 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'); progressbar = dialog.template.widgetContainer.getWidgetById('progressbar');
// Start // Start

View File

@ -124,7 +124,7 @@ var et2_dropdown_button = (function(){ "use strict"; return et2_inputWidget.exte
// Create the individual UI elements // Create the individual UI elements
// Menu is a UL // 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() .hide()
.menu({ .menu({
select: function(event,ui) { 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"); .addClass("et2_dropdown");
// Main "wrapper" div // Main "wrapper" div
this.div = $j(document.createElement("div")) this.div = jQuery(document.createElement("div"))
.attr("id", this.internal_ids.div) .attr("id", this.internal_ids.div)
.append(this.buttons) .append(this.buttons)
.append(this.menu); .append(this.menu);
// Left side - activates click action // Left side - activates click action
this.button = $j(document.createElement("button")) this.button = jQuery(document.createElement("button"))
.attr("id", this.internal_ids.button) .attr("id", this.internal_ids.button)
.attr("type", "button") .attr("type", "button")
.addClass("ui-widget ui-corner-left").removeClass("ui-corner-all") .addClass("ui-widget ui-corner-left").removeClass("ui-corner-all")
.appendTo(this.buttons); .appendTo(this.buttons);
// Right side - shows dropdown // 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") .addClass("ui-widget ui-corner-right").removeClass("ui-corner-all")
.attr("type", "button") .attr("type", "button")
.click(function() { .click(function() {
@ -166,7 +166,7 @@ var et2_dropdown_button = (function(){ "use strict"; return et2_inputWidget.exte
of: self.buttons of: self.buttons
}); });
// Hide menu if clicked elsewhere // Hide menu if clicked elsewhere
$j( document ).one( "click", function() { jQuery( document ).one( "click", function() {
menu.hide(); menu.hide();
}); });
return false; return false;
@ -179,8 +179,8 @@ var et2_dropdown_button = (function(){ "use strict"; return et2_inputWidget.exte
this.buttons.children("button") this.buttons.children("button")
.addClass("ui-state-default") .addClass("ui-state-default")
.hover( .hover(
function() {$j(this).addClass("ui-state-hover");}, function() {jQuery(this).addClass("ui-state-hover");},
function() {$j(this).removeClass("ui-state-hover");} function() {jQuery(this).removeClass("ui-state-hover");}
); );
// Icon // Icon
@ -303,7 +303,7 @@ var et2_dropdown_button = (function(){ "use strict"; return et2_inputWidget.exte
this._super.apply(this, arguments); this._super.apply(this, arguments);
// Move the parent's handler to the button, or we can't tell the difference between the clicks // 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) { this.button.bind("click.et2_baseWidget", this, function(e) {
return e.data.click.call(e.data, this); 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; var item;
if(typeof options[key] == "string") if(typeof options[key] == "string")
{ {
item = $j("<li data-id='"+key+"'><a href='#'>"+options[key]+"</a></li>"); item = jQuery("<li data-id='"+key+"'><a href='#'>"+options[key]+"</a></li>");
} }
else if (options[key]["label"]) else if (options[key]["label"])
{ {
item =$j("<li data-id='"+key+"'><a href='#'>"+options[key]["label"]+"</a></li>"); item =jQuery("<li data-id='"+key+"'><a href='#'>"+options[key]["label"]+"</a></li>");
} }
// Optgroup // Optgroup
else else
{ {
item = $j("<li><a href='#'>"+key+"</a></li>"); item = jQuery("<li><a href='#'>"+key+"</a></li>");
add_complex(node.append("<ul>"), options[key]); add_complex(node.append("<ul>"), options[key]);
} }
node.append(item); node.append(item);
if(item && options[key].icon) if(item && options[key].icon)
{ {
// we supply a applicable class for item images // we supply a applicable class for item images
$j('a',item).prepend('<img class="et2_button_icon" src="' + options[key].icon +'"/>'); jQuery('a',item).prepend('<img class="et2_button_icon" src="' + options[key].icon +'"/>');
} }
} }
} }
@ -374,7 +374,7 @@ var et2_dropdown_button = (function(){ "use strict"; return et2_inputWidget.exte
}, },
set_value: function(new_value) { 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) if(menu_item.length)
{ {
this.value = new_value; this.value = new_value;

View File

@ -91,11 +91,11 @@ var et2_favorites = (function(){ "use strict"; return et2_dropdown_button.extend
*/ */
init: function() { init: function() {
this._super.apply(this, arguments); 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) if(this.sidebox_target.length == 0 && egw_getFramework() != null)
{ {
var egw_fw = egw_getFramework(); 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 // Store array of sorted items
this.favSortedList = ['blank']; this.favSortedList = ['blank'];
@ -124,20 +124,20 @@ var et2_favorites = (function(){ "use strict"; return et2_dropdown_button.extend
var self = this; var self = this;
// Add a listener on the radio buttons to set default filter // 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 // Don't do the menu
event.stopImmediatePropagation(); event.stopImmediatePropagation();
// Save as default favorite - used when you click the button // 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.egw().set_preference(self.options.app,self.options.default_pref,jQuery(this).val());
self.preferred = $j(this).val(); self.preferred = jQuery(this).val();
// Update sidebox, if there // Update sidebox, if there
if(self.sidebox_target.length) if(self.sidebox_target.length)
{ {
self.sidebox_target.find("div.ui-icon-heart") self.sidebox_target.find("div.ui-icon-heart")
.replaceWith("<div class='sideboxstar'/>"); .replaceWith("<div class='sideboxstar'/>");
$j("li[data-id='"+self.preferred+"'] div.sideboxstar",self.sidebox_target) jQuery("li[data-id='"+self.preferred+"'] div.sideboxstar",self.sidebox_target)
.replaceWith("<div class='ui-icon ui-icon-heart'/>"); .replaceWith("<div class='ui-icon ui-icon-heart'/>");
} }
@ -161,7 +161,7 @@ var et2_favorites = (function(){ "use strict"; return et2_dropdown_button.extend
}; };
//Add Sortable handler to nm fav. menu //Add Sortable handler to nm fav. menu
$j(this.menu).sortable({ jQuery(this.menu).sortable({
items:'li:not([data-id$="add"])', items:'li:not([data-id$="add"])',
placeholder:'ui-fav-sortable-placeholder', 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 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 // Wrap in a span instead of a div because div gets a border
.on("mouseenter","div.ui-icon-trash", function() {$j(this).wrap("<span class='ui-state-active'/>");}) .on("mouseenter","div.ui-icon-trash", function() {jQuery(this).wrap("<span class='ui-state-active'/>");})
.on("mouseleave","div.ui-icon-trash", function() {$j(this).unwrap();}); .on("mouseleave","div.ui-icon-trash", function() {jQuery(this).unwrap();});
// Trigger refresh of menu options now that events are registered // Trigger refresh of menu options now that events are registered
// to update sidebox // 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); widget.set_select_options.call(widget,options);
// Set radio to current value // 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) 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 // Apply the favorite when you pick from the list
change: function(selected_node) { 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) if(this.value == "add" && this.nextmatch)
{ {
// Get current filters // Get current filters
var current_filters = $j.extend({},this.nextmatch.activeFilters); var current_filters = jQuery.extend({},this.nextmatch.activeFilters);
// Add in extras // Add in extras
for(var extra in this.options.filters) for(var extra in this.options.filters)

View File

@ -158,26 +158,26 @@ var et2_file = (function(){ "use strict"; return et2_inputWidget.extend(
}, },
createInputWidget: function() { createInputWidget: function() {
this.node = $j(document.createElement("div")).addClass("et2_file"); this.node = jQuery(document.createElement("div")).addClass("et2_file");
this.span = $j(document.createElement("span")) this.span = jQuery(document.createElement("span"))
.addClass('et2_file_span et2_button') .addClass('et2_file_span et2_button')
.appendTo (this.node); .appendTo (this.node);
if (this.options.label != '') this.span.addClass('et2_button_text'); if (this.options.label != '') this.span.addClass('et2_button_text');
var span = this.span; var span = this.span;
this.input = $j(document.createElement("input")) this.input = jQuery(document.createElement("input"))
.attr("type", "file").attr("placeholder", this.options.blur) .attr("type", "file").attr("placeholder", this.options.blur)
.addClass ("et2_file_upload") .addClass ("et2_file_upload")
.appendTo(this.node) .appendTo(this.node)
.hover(function(e){ .hover(function(e){
$j(span) jQuery(span)
.toggleClass('et2_file_spanHover'); .toggleClass('et2_file_spanHover');
}) })
.on({ .on({
mousedown:function (e){ mousedown:function (e){
$j(span).addClass('et2_file_spanActive'); jQuery(span).addClass('et2_file_spanActive');
}, },
mouseup:function (e){ mouseup:function (e){
$j(span).removeClass('et2_file_spanActive'); jQuery(span).removeClass('et2_file_spanActive');
} }
}); });
var self = this; var self = this;
@ -203,12 +203,12 @@ var et2_file = (function(){ "use strict"; return et2_inputWidget.extend(
if(widget) if(widget)
{ {
//may be not available at createInputWidget time //may be not available at createInputWidget time
this.progress = $j(widget.getDOMNode()); this.progress = jQuery(widget.getDOMNode());
} }
} }
if(!this.progress) 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"); this.progress.addClass("progress");
@ -424,7 +424,7 @@ var et2_file = (function(){ "use strict"; return et2_inputWidget.extend(
this.hideMessage(); this.hideMessage();
// Disable buttons // Disable buttons
this.disabled_buttons = $j("input[type='submit'], button") this.disabled_buttons = jQuery("input[type='submit'], button")
.not("[disabled]") .not("[disabled]")
.attr("disabled", true) .attr("disabled", true)
.addClass('et2_button_ro') .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); var widget = this.getRoot().getWidgetById(this.options.progress);
if(widget) if(widget)
{ {
this.progress = $j(widget.getDOMNode()); this.progress = jQuery(widget.getDOMNode());
this.progress.addClass("progress"); this.progress.addClass("progress");
} }
} }
if(this.progress) if(this.progress)
{ {
var fileName = file.fileName || 'file'; var fileName = file.fileName || 'file';
var status = $j("<li data-file='"+fileName+"'>"+fileName var status = jQuery("<li data-file='"+fileName+"'>"+fileName
+"<div class='remove'/><span class='progressBar'><p/></span></li>") +"<div class='remove'/><span class='progressBar'><p/></span></li>")
.appendTo(this.progress); .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 != "") if(error != "")
{ {
status.addClass("message ui-state-error"); status.addClass("message ui-state-error");
status.append("<div>"+error+"</diff>"); status.append("<div>"+error+"</diff>");
$j(".progressBar",status).css("display", "none"); jQuery(".progressBar",status).css("display", "none");
} }
} }
return error == ""; return error == "";
@ -554,7 +554,7 @@ var et2_file = (function(){ "use strict"; return et2_inputWidget.extend(
_fileProgress: function(file) { _fileProgress: function(file) {
if(this.progress) 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; return true;
@ -577,7 +577,7 @@ var et2_file = (function(){ "use strict"; return et2_inputWidget.extend(
if(typeof response.response[0].data[key] == "string") if(typeof response.response[0].data[key] == "string")
{ {
// Message from server - probably error // Message from server - probably error
$j("[data-file='"+name+"']",this.progress) jQuery("[data-file='"+name+"']",this.progress)
.addClass("error") .addClass("error")
.css("display", "block") .css("display", "block")
.text(response.response[0].data[key]); .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]; this.options.value[key] = response.response[0].data[key];
if(this.progress) 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) else if (this.progress)
{ {
$j("[data-file='"+name+"']",this.progress) jQuery("[data-file='"+name+"']",this.progress)
.addClass("ui-state-error") .addClass("ui-state-error")
.css("display", "block") .css("display", "block")
.text(this.egw().lang("Server error")); .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) if(this.options.value[key].name == file.fileName)
{ {
delete this.options.value[key]; delete this.options.value[key];
$j('[data-file="'+file.fileName+'"]',this.node).remove(); jQuery('[data-file="'+file.fileName+'"]',this.node).remove();
return; return;
} }
} }
@ -642,13 +642,13 @@ var et2_file = (function(){ "use strict"; return et2_inputWidget.extend(
{ {
e.preventDefault(); e.preventDefault();
// Look for file name in list // 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); this.remove_file(e.data);
// In case it didn't make it to the list (error) // In case it didn't make it to the list (error)
target.remove(); target.remove();
$j(e.target).remove(); jQuery(e.target).remove();
}, },
/** /**

View File

@ -60,13 +60,13 @@ var et2_grid = (function(){ "use strict"; return et2_DOMWidget.extend([et2_IDeta
*/ */
init: function() { init: function() {
// Create the table body and the table // Create the table body and the table
this.table = $j(document.createElement("table")) this.table = jQuery(document.createElement("table"))
.addClass("et2_grid"); .addClass("et2_grid");
this.thead = $j(document.createElement("thead")) this.thead = jQuery(document.createElement("thead"))
.appendTo(this.table); .appendTo(this.table);
this.tfoot = $j(document.createElement("tfoot")) this.tfoot = jQuery(document.createElement("tfoot"))
.appendTo(this.table); .appendTo(this.table);
this.tbody = $j(document.createElement("tbody")) this.tbody = jQuery(document.createElement("tbody"))
.appendTo(this.table); .appendTo(this.table);
// Call the parent constructor // Call the parent constructor
@ -678,7 +678,7 @@ var et2_grid = (function(){ "use strict"; return et2_DOMWidget.extend([et2_IDeta
} }
break; break;
} }
var tr = $j(document.createElement("tr")).appendTo(parent) var tr = jQuery(document.createElement("tr")).appendTo(parent)
.addClass(this.rowData[y]["class"]); .addClass(this.rowData[y]["class"]);
if (this.rowData[y].disabled) 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) if (cell.td == null && cell.widget != null)
{ {
// Create the cell // Create the cell
var td = $j(document.createElement("td")).appendTo(tr) var td = jQuery(document.createElement("td")).appendTo(tr)
.addClass(cell["class"]); .addClass(cell["class"]);
if (cell.disabled) 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 // Make sure rows have IDs, so sortable has something to return
$j('tr', this.tbody).each(function(index) { jQuery('tr', this.tbody).each(function(index) {
var $this = $j(this); var $this = jQuery(this);
// Header does not participate in sorting // Header does not participate in sorting
if($this.hasClass('th')) return; if($this.hasClass('th')) return;
@ -965,7 +965,7 @@ var et2_grid = (function(){ "use strict"; return et2_DOMWidget.extend([et2_IDeta
if(content) if(content)
{ {
// Add a new action object to the object manager // 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 aoi = new et2_action_object_impl(this, row);
var obj = widget_object.addObject(content.id || "row_"+r, aoi); var obj = widget_object.addObject(content.id || "row_"+r, aoi);

View File

@ -43,7 +43,7 @@ var et2_hbox = (function(){ "use strict"; return et2_baseWidget.extend(
this.leftDiv = null; this.leftDiv = null;
this.rightDiv = null; this.rightDiv = null;
this.div = $j(document.createElement("div")) this.div = jQuery(document.createElement("div"))
.addClass("et2_" + this._type) .addClass("et2_" + this._type)
.addClass("et2_box_widget"); .addClass("et2_box_widget");
@ -73,7 +73,7 @@ var et2_hbox = (function(){ "use strict"; return et2_baseWidget.extend(
// "right" // "right"
if (this.alignData.hasRight) if (this.alignData.hasRight)
{ {
this.rightDiv = $j(document.createElement("div")) this.rightDiv = jQuery(document.createElement("div"))
.addClass("et2_hbox_right") .addClass("et2_hbox_right")
.appendTo(this.div); .appendTo(this.div);
} }
@ -83,7 +83,7 @@ var et2_hbox = (function(){ "use strict"; return et2_baseWidget.extend(
if (this.alignData.hasCenter) if (this.alignData.hasCenter)
{ {
// Create the left div if an element is centered // 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") .addClass("et2_hbox_left")
.appendTo(this.div); .appendTo(this.div);

View File

@ -64,10 +64,10 @@ var et2_historylog = (function(){ "use strict"; return et2_valueWidget.extend([e
*/ */
init: function() { init: function() {
this._super.apply(this, arguments); this._super.apply(this, arguments);
this.div = $j(document.createElement("div")) this.div = jQuery(document.createElement("div"))
.addClass("et2_historylog"); .addClass("et2_historylog");
this.innerDiv = $j(document.createElement("div")) this.innerDiv = jQuery(document.createElement("div"))
.appendTo(this.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 // Write something inside the column headers
for (var i = 0; i < this.columns.length; i++) 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 // Register a resize callback
var self = this; 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) { if (self && typeof self.dynheight != 'undefined') self.dynheight.update(function(_w, _h) {
self.dataview.resize(_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 // Unbind, if bound
if(this.options.value && !this.options.value.id) 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 // 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)}; 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 = et2_createWidget(this.columns[i].widget_type, attrs, this);
this.columns[i].widget.transformAttributes(attrs); 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 row = this.dataview.rowProvider.getPrototype("default");
var self = this; var self = this;
$j("div", row).each(function (i) { jQuery("div", row).each(function (i) {
var nodes = []; var nodes = [];
var widget = self.columns[i].widget; var widget = self.columns[i].widget;
if(typeof widget == 'undefined' && typeof self.fields[_data.status] != 'undefined') 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) if(widget._children.length)
{ {
// Multi-part values // Multi-part values
var box = $j(widget.getDOMNode()).clone(); var box = jQuery(widget.getDOMNode()).clone();
for(var j = 0; j < widget._children.length; j++) for(var j = 0; j < widget._children.length; j++)
{ {
widget._children[j].setDetachedAttributes(nodes[j], {value:_data[self.columns[i].id][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]}); 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; return tr;
}, },

View File

@ -52,7 +52,7 @@ var et2_html = (function(){ "use strict"; return et2_valueWidget.extend([et2_IDe
// Allow no child widgets // Allow no child widgets
this.supportedWidgetClasses = []; this.supportedWidgetClasses = [];
this.htmlNode = $j(document.createElement("span")); this.htmlNode = jQuery(document.createElement("span"));
if(this._type == 'htmlarea') if(this._type == 'htmlarea')
{ {
this.htmlNode.addClass('et2_textbox_ro'); this.htmlNode.addClass('et2_textbox_ro');

View File

@ -95,7 +95,7 @@ var et2_htmlarea = (function(){ "use strict"; return et2_inputWidget.extend([et2
// Allow no child widgets // Allow no child widgets
this.supportedWidgetClasses = []; this.supportedWidgetClasses = [];
this.htmlNode = $j(document.createElement("textarea")) this.htmlNode = jQuery(document.createElement("textarea"))
.css('height', this.options.height) .css('height', this.options.height)
.addClass('et2_textbox_ro'); .addClass('et2_textbox_ro');
this.setDOMNode(this.htmlNode[0]); this.setDOMNode(this.htmlNode[0]);

View File

@ -63,7 +63,7 @@ var et2_iframe = (function(){ "use strict"; return et2_valueWidget.extend(
// Allow no child widgets // Allow no child widgets
this.supportedWidgetClasses = []; this.supportedWidgetClasses = [];
this.htmlNode = $j(document.createElement("iframe")); this.htmlNode = jQuery(document.createElement("iframe"));
if(this.options.label) if(this.options.label)
{ {
this.htmlNode.append('<span class="et2_label">'+this.options.label+'</span>'); this.htmlNode.append('<span class="et2_label">'+this.options.label+'</span>');
@ -126,7 +126,7 @@ var et2_iframe = (function(){ "use strict"; return et2_valueWidget.extend(
else else
{ {
// Load the new page, but display a loader // Load the new page, but display a loader
var loader = $j('<div class="et2_iframe loading"/>'); var loader = jQuery('<div class="et2_iframe loading"/>');
this.htmlNode this.htmlNode
.before(loader); .before(loader);
window.setTimeout(jQuery.proxy(function() { window.setTimeout(jQuery.proxy(function() {

View File

@ -80,7 +80,7 @@ var et2_image = (function(){ "use strict"; return expose(et2_baseWidget.extend([
this._super.apply(this, arguments); this._super.apply(this, arguments);
// Create the image or a/image tag // Create the image or a/image tag
this.image = $j(document.createElement("img")); this.image = jQuery(document.createElement("img"));
if (this.options.label) if (this.options.label)
{ {
this.image.attr("alt", this.options.label).attr("title", 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) { setDetachedAttributes: function(_nodes, _values) {
// Set the given DOM-Nodes // Set the given DOM-Nodes
this.image = $j(_nodes[0]); this.image = jQuery(_nodes[0]);
// Set the attributes // Set the attributes
if (_values["src"]) if (_values["src"])

View File

@ -113,14 +113,14 @@ var et2_itempicker = (function(){ "use strict"; return et2_inputWidget.extend(
createInputWidget: function() { createInputWidget: function() {
var _self = this; var _self = this;
this.div = $j(document.createElement("div")); this.div = jQuery(document.createElement("div"));
this.left = $j(document.createElement("div")); this.left = jQuery(document.createElement("div"));
this.right = $j(document.createElement("div")); this.right = jQuery(document.createElement("div"));
this.right_container = $j(document.createElement("div")); this.right_container = jQuery(document.createElement("div"));
this.app_select = $j(document.createElement("ul")); this.app_select = jQuery(document.createElement("ul"));
this.search = $j(document.createElement("input")); this.search = jQuery(document.createElement("input"));
this.clear = $j(document.createElement("span")); this.clear = jQuery(document.createElement("span"));
this.itemlist = $j(document.createElement("div")); this.itemlist = jQuery(document.createElement("div"));
// Container elements // Container elements
this.div.addClass("et2_itempicker"); this.div.addClass("et2_itempicker");
@ -136,12 +136,12 @@ var et2_itempicker = (function(){ "use strict"; return et2_inputWidget.extend(
if(img_icon === null) { if(img_icon === null) {
continue; continue;
} }
var img = $j(document.createElement("img")); var img = jQuery(document.createElement("img"));
img.attr("src", img_icon); img.attr("src", img_icon);
var item = $j(document.createElement("li")); var item = jQuery(document.createElement("li"));
item.attr("id", key) item.attr("id", key)
.click(function() { .click(function() {
_self.selectApplication($j(this)); _self.selectApplication(jQuery(this));
}) })
.append(img); .append(img);
if(item_count == 0) { 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.addClass("et2_itempicker_search");
this.search.keyup(function() { this.search.keyup(function() {
var request = {}; var request = {};
request.term = $j(this).val(); request.term = jQuery(this).val();
_self.query(request); _self.query(request);
}); });
this.set_blur(this.options.blur, this.search); this.set_blur(this.options.blur, this.search);
@ -170,7 +170,7 @@ var et2_itempicker = (function(){ "use strict"; return et2_inputWidget.extend(
// Action button // Action button
this.button_action = et2_createWidget("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.set_label(this.egw().lang(this.options.action_label));
this.button_action.click = function() { _self.doAction(); }; this.button_action.click = function() { _self.doAction(); };
@ -208,8 +208,8 @@ var et2_itempicker = (function(){ "use strict"; return et2_inputWidget.extend(
getSelectedItems: function() getSelectedItems: function()
{ {
var items = []; var items = [];
$j(this.itemlist).children("ul").children("li.selected").each(function(index) { jQuery(this.itemlist).children("ul").children("li.selected").each(function(index) {
items[index] = $j(this).attr("id"); items[index] = jQuery(this).attr("id");
}); });
return items; return items;
}, },
@ -253,7 +253,7 @@ var et2_itempicker = (function(){ "use strict"; return et2_inputWidget.extend(
selectApplication: function(app) { selectApplication: function(app) {
this.clearSearchResults(); this.clearSearchResults();
$j(".et2_itempicker_app_select li").removeClass("selected"); jQuery(".et2_itempicker_app_select li").removeClass("selected");
app.addClass("selected"); app.addClass("selected");
this.current_app = app.attr("id"); this.current_app = app.attr("id");
return true; return true;
@ -314,11 +314,11 @@ var et2_itempicker = (function(){ "use strict"; return et2_inputWidget.extend(
}, },
updateItemList: function(data) { updateItemList: function(data) {
var list = $j(document.createElement("ul")); var list = jQuery(document.createElement("ul"));
var item_count = 0; var item_count = 0;
var _self = this; var _self = this;
for(var id in data) { for(var id in data) {
var item = $j(document.createElement("li")); var item = jQuery(document.createElement("li"));
if(item_count%2 == 0) { if(item_count%2 == 0) {
item.addClass("row_on"); item.addClass("row_on");
} else { } else {
@ -329,16 +329,16 @@ var et2_itempicker = (function(){ "use strict"; return et2_inputWidget.extend(
.click(function(e) { .click(function(e) {
if(e.ctrlKey || e.metaKey) { if(e.ctrlKey || e.metaKey) {
// add to selection // add to selection
$j(this).addClass("selected"); jQuery(this).addClass("selected");
} else if(e.shiftKey) { } else if(e.shiftKey) {
// select range // select range
var start = $j(this).siblings(".selected").first(); var start = jQuery(this).siblings(".selected").first();
if(start == 0) { if(start == 0) {
// no start item - cannot select range - select single item // no start item - cannot select range - select single item
$j(this).addClass("selected"); jQuery(this).addClass("selected");
return true; return true;
} }
var end = $j(this); var end = jQuery(this);
// swap start and end if start appears after end in dom hierarchy // swap start and end if start appears after end in dom hierarchy
if(start.index() > end.index()) { if(start.index() > end.index()) {
var startOld = start; var startOld = start;
@ -351,8 +351,8 @@ var et2_itempicker = (function(){ "use strict"; return et2_inputWidget.extend(
end.addClass("selected"); end.addClass("selected");
} else { } else {
// select single item // select single item
$j(this).siblings(".selected").removeClass("selected"); jQuery(this).siblings(".selected").removeClass("selected");
$j(this).addClass("selected"); jQuery(this).addClass("selected");
} }
}); });
list.append(item); list.append(item);

View File

@ -127,29 +127,29 @@ var et2_link_to = (function(){ "use strict"; return et2_inputWidget.extend(
}, },
createInputWidget: function() { 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 // 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 // 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 // Need a div for link-to widget
this.link_div = $j(document.createElement("div")) this.link_div = jQuery(document.createElement("div"))
.addClass('div_link') .addClass('div_link')
// Leave room for link button // Leave room for link button
.appendTo(this.div); .appendTo(this.div);
// One common link button // 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)) .text(this.egw().lang(this.options.link_label))
.appendTo(this.div).hide() .appendTo(this.div).hide()
.addClass('link') .addClass('link')
.click(this, this.createLink); .click(this, this.createLink);
// Span for indicating status // Span for indicating status
this.status_span = $j(document.createElement("span")) this.status_span = jQuery(document.createElement("span"))
.appendTo(this.div).addClass("status").hide(); .appendTo(this.div).addClass("status").hide();
this.setDOMNode(this.div[0]); this.setDOMNode(this.div[0]);
@ -184,7 +184,7 @@ var et2_link_to = (function(){ "use strict"; return et2_inputWidget.extend(
button_caption: '' button_caption: ''
}; };
this.vfs_select = et2_createWidget("vfs-select", select_attrs,this); 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; var values = true;
// If entry not yet saved, store for linking on server // If entry not yet saved, store for linking on server
if(!self.options.value.to_id || typeof self.options.value.to_id == 'object') 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() { createInputWidget: function() {
var self = this; 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 // 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) { .change(function(e) {
// Clear cache when app changes // Clear cache when app changes
self.cache = {}; self.cache = {};
@ -600,7 +600,7 @@ var et2_link_entry = (function(){ "use strict"; return et2_inputWidget.extend(
var opt_count = 0; var opt_count = 0;
for(var key in this.options.select_options) { for(var key in this.options.select_options) {
opt_count++; opt_count++;
var option = $j(document.createElement("option")) var option = jQuery(document.createElement("option"))
.attr("value", key) .attr("value", key)
.text(this.options.select_options[key]); .text(this.options.select_options[key]);
option.appendTo(this.app_select); option.appendTo(this.app_select);
@ -618,7 +618,7 @@ var et2_link_entry = (function(){ "use strict"; return et2_inputWidget.extend(
} }
// Search input // Search input
this.search = $j(document.createElement("input")) this.search = jQuery(document.createElement("input"))
// .attr("type", "search") // Fake it for all browsers below // .attr("type", "search") // Fake it for all browsers below
.focus(function(){if(!self.options.only_app) { .focus(function(){if(!self.options.only_app) {
// Adjust width, leave room for app select & link button // 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 // Clear / last button
this.clear = $j(document.createElement("span")) this.clear = jQuery(document.createElement("span"))
.addClass("ui-icon ui-icon-close") .addClass("ui-icon ui-icon-close")
.click(function(e){ .click(function(e){
if (!self.search) return; // only gives an error, we should never get into that situation 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() { init: function() {
this._super.apply(this, arguments); this._super.apply(this, arguments);
this.label_span = $j(document.createElement("label")) this.label_span = jQuery(document.createElement("label"))
.addClass("et2_label"); .addClass("et2_label");
this.link = $j(document.createElement("span")) this.link = jQuery(document.createElement("span"))
.addClass("et2_link") .addClass("et2_link")
.appendTo(this.label_span); .appendTo(this.label_span);
@ -1286,7 +1286,7 @@ var et2_link_string = (function(){ "use strict"; return expose(et2_valueWidget.e
init: function() { init: function() {
this._super.apply(this, arguments); this._super.apply(this, arguments);
this.list = $j(document.createElement("ul")) this.list = jQuery(document.createElement("ul"))
.addClass("et2_link_string"); .addClass("et2_link_string");
if(this.options['class']) this.list.addClass(this.options['class']); 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) { _add_link: function(_link_data) {
var self = this; var self = this;
var link = $j(document.createElement("li")) var link = jQuery(document.createElement("li"))
.appendTo(this.list) .appendTo(this.list)
.addClass("et2_link loading") .addClass("et2_link loading")
.click( function(e){ .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 // Create the label container if it didn't exist yet
if (this._labelContainer == null) if (this._labelContainer == null)
{ {
this._labelContainer = $j(document.createElement("label")) this._labelContainer = jQuery(document.createElement("label"))
.addClass("et2_label"); .addClass("et2_label");
this.getSurroundings().insertDOMNode(this._labelContainer[0]); this.getSurroundings().insertDOMNode(this._labelContainer[0]);
this.getSurroundings().update(); 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 // Create the label container if it didn't exist yet
if (this._labelContainer == null) if (this._labelContainer == null)
{ {
this._labelContainer = $j(document.createElement("label")) this._labelContainer = jQuery(document.createElement("label"))
.addClass("et2_label"); .addClass("et2_label");
this.getSurroundings().insertDOMNode(this._labelContainer[0]); this.getSurroundings().insertDOMNode(this._labelContainer[0]);
} }
@ -1460,12 +1460,12 @@ var et2_link_string = (function(){ "use strict"; return expose(et2_valueWidget.e
* given values. * given values.
*/ */
setDetachedAttributes: function(_nodes, _values) { setDetachedAttributes: function(_nodes, _values) {
this.list = $j(_nodes[0]); this.list = jQuery(_nodes[0]);
this.set_value(_values["value"]); this.set_value(_values["value"]);
// Special detached, to prevent DOM node modification of the normal method // 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']) if(_values['label'])
{ {
this.set_label(_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() { init: function() {
this._super.apply(this, arguments); this._super.apply(this, arguments);
this.list = $j(document.createElement("table")) this.list = jQuery(document.createElement("table"))
.addClass("et2_link_list"); .addClass("et2_link_list");
if(this.options['class']) this.list.addClass(this.options['class']); if(this.options['class']) this.list.addClass(this.options['class']);
this.setDOMNode(this.list[0]); 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 // Multiple file download for those that support it
a = $j(a) a = jQuery(a)
.prop('href', url) .prop('href', url)
.prop('download', link_data.title || "") .prop('download', link_data.title || "")
.appendTo(self.getInstanceManager().DOMContainer); .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) { 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. // Highlight files for nice UI indicating what will be in the zip.
// Files have negative IDs. // Files have negative IDs.
$j('[id^="link_-"]',this.list).effect('highlight',{},2000); jQuery('[id^="link_-"]',this.list).effect('highlight',{},2000);
// Download ZIP // Download ZIP
window.location = self.egw().link('/index.php',{ 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) { _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("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" : "") .attr("draggable", _link_data.app == 'file' ? "true" : "")
.appendTo(this.list); .appendTo(this.list);
@ -1727,7 +1727,7 @@ var et2_link_list = (function(){ "use strict"; return et2_link_string.extend(
} }
// Icon // Icon
var icon = $j(document.createElement("td")) var icon = jQuery(document.createElement("td"))
.appendTo(row) .appendTo(row)
.addClass("icon"); .addClass("icon");
if(_link_data.icon) if(_link_data.icon)
@ -1759,7 +1759,7 @@ var et2_link_list = (function(){ "use strict"; return et2_link_string.extend(
var self = this; var self = this;
for(var i = 0; i < columns.length; i++) { for(var i = 0; i < columns.length; i++) {
var $td = $j(document.createElement("td")) var $td = jQuery(document.createElement("td"))
.appendTo(row) .appendTo(row)
.addClass(columns[i]) .addClass(columns[i])
.text(_link_data[columns[i]] ? _link_data[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') if (typeof _link_data.title == 'undefined')
{ {
// Title will be fetched from server and then set // 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) { 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); }, row);
} }
// Date // Date
/* /*
var date_row = $j(document.createElement("td")) var date_row = jQuery(document.createElement("td"))
.appendTo(row); .appendTo(row);
if(_link_data.lastmod) 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 // build delete button if the link is not readonly
if (!this.options.readonly) if (!this.options.readonly)
{ {
var delete_button = $j(document.createElement("td")) var delete_button = jQuery(document.createElement("td"))
.appendTo(row); .appendTo(row);
$j("<div />") jQuery("<div />")
.appendTo(delete_button) .appendTo(delete_button)
// We don't use ui-icon because it assigns a bg image // We don't use ui-icon because it assigns a bg image
.addClass("delete icon") .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("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'); 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 // 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 // Show delete item only if the widget is not readonly
self.context.getItem("delete").set_enabled(!self.options.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; return;
} }
//event.dataTransfer.setDragImage(event.delegate.target,0,0); //event.dataTransfer.setDragImage(event.delegate.target,0,0);
var div = $j(document.createElement("div")) var div = jQuery(document.createElement("div"))
.attr('id', 'drag_helper') .attr('id', 'drag_helper')
.css({ .css({
position: 'absolute', 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); event.dataTransfer.setDragImage(div.get(0),0,0);
}) })
.on('drag', function() { .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 // VFS link - check for same dir as above, and hide dir
var reformat = false; var reformat = false;
var span_size = 0.3; 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) if(prev.length === 1)
{ {
var prev_dirs = (prev.attr('data-title') || '').split('/'); var prev_dirs = (prev.attr('data-title') || '').split('/');

View File

@ -87,7 +87,7 @@ var et2_number = (function(){ "use strict"; return et2_textbox.extend(
}, },
createInputWidget: function() { createInputWidget: function() {
this.input = $j(document.createElement("input")); this.input = jQuery(document.createElement("input"));
this.input.attr("type", "number"); this.input.attr("type", "number");
this.input.addClass("et2_textbox"); this.input.addClass("et2_textbox");
// bind invalid event to change, to trigger our validation // bind invalid event to change, to trigger our validation

View File

@ -108,7 +108,7 @@ var et2_portlet = (function(){ "use strict"; return et2_valueWidget.extend(
var self = this; var self = this;
// Create DOM nodes // Create DOM nodes
this.div = $j(document.createElement("div")) this.div = jQuery(document.createElement("div"))
.addClass(this.options.class) .addClass(this.options.class)
.addClass("ui-widget ui-widget-content ui-corner-all") .addClass("ui-widget ui-widget-content ui-corner-all")
.addClass("et2_portlet") .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); 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') .attr('id', this.getInstanceManager().uniqueId+'_'+this.id.replace(/\./g, '-') + '_header')
.addClass("ui-widget-header ui-corner-all") .addClass("ui-widget-header ui-corner-all")
.appendTo(this.div) .appendTo(this.div)
.html(this.options.title); .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') .attr('id', this.getInstanceManager().uniqueId+'_'+this.id.replace(/\./g, '-') + '_content')
.appendTo(this.div); .appendTo(this.div);

View File

@ -64,7 +64,7 @@ var et2_radiobox = (function(){ "use strict"; return et2_inputWidget.extend(
}, },
createInputWidget: function() { createInputWidget: function() {
this.input = $j(document.createElement("input")) this.input = jQuery(document.createElement("input"))
.val(this.options.set_value) .val(this.options.set_value)
.attr("type", "radio"); .attr("type", "radio");
@ -200,7 +200,7 @@ var et2_radiobox_ro = (function(){ "use strict"; return et2_valueWidget.extend([
this._super.apply(this, arguments); this._super.apply(this, arguments);
this.value = ""; this.value = "";
this.span = $j(document.createElement("span")) this.span = jQuery(document.createElement("span"))
.addClass("et2_radiobox"); .addClass("et2_radiobox");
this.setDOMNode(this.span[0]); this.setDOMNode(this.span[0]);
@ -308,7 +308,7 @@ var et2_radioGroup = (function(){ "use strict"; return et2_valueWidget.extend([e
*/ */
init: function(parent, attrs) { init: function(parent, attrs) {
this._super.apply(this, arguments); this._super.apply(this, arguments);
this.node = $j(document.createElement("div")) this.node = jQuery(document.createElement("div"))
.addClass("et2_vbox") .addClass("et2_vbox")
.addClass("et2_box_widget"); .addClass("et2_box_widget");
if(this.options.needed) 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 // Create the label container if it didn't exist yet
if (this._labelContainer == null) if (this._labelContainer == null)
{ {
this._labelContainer = $j(document.createElement("label")); this._labelContainer = jQuery(document.createElement("label"));
this.getSurroundings().insertDOMNode(this._labelContainer[0]); this.getSurroundings().insertDOMNode(this._labelContainer[0]);
} }

View File

@ -399,7 +399,7 @@ var et2_selectAccount = (function(){ "use strict"; return et2_selectbox.extend(
var ids = []; var ids = [];
var data = {}; var data = {};
jQuery('#'+widget.getInstanceManager().uniqueId + '_selected li',select_col).each(function() { 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 // Add to list
ids.push(id); ids.push(id);

View File

@ -245,7 +245,7 @@ var et2_selectbox = (function(){ "use strict"; return et2_inputWidget.extend(
return this._appendMultiOption(_value, _label, _title, dom_element); return this._appendMultiOption(_value, _label, _title, dom_element);
} }
var option = $j(document.createElement("option")) var option = jQuery(document.createElement("option"))
.attr("value", _value) .attr("value", _value)
.text(_label+""); .text(_label+"");
@ -328,7 +328,7 @@ var et2_selectbox = (function(){ "use strict"; return et2_inputWidget.extend(
*/ */
createInputWidget: function() { createInputWidget: function() {
// Create the base input widget // Create the base input widget
this.input = $j(document.createElement("select")) this.input = jQuery(document.createElement("select"))
.addClass("et2_selectbox") .addClass("et2_selectbox")
.attr("size", this.options.rows); .attr("size", this.options.rows);
@ -630,7 +630,7 @@ var et2_selectbox = (function(){ "use strict"; return et2_inputWidget.extend(
if (!this.expand_button) if (!this.expand_button)
{ {
var button_id = this.getInstanceManager().uniqueId+'_'+this.id.replace(/\./g, '-') + "_expand"; var button_id = this.getInstanceManager().uniqueId+'_'+this.id.replace(/\./g, '-') + "_expand";
this.expand_button = $j("<button class='et2_button et2_button_icon et2_selectbox_expand ui-icon' id='" + button_id + "'/>") this.expand_button = jQuery("<button class='et2_button et2_button_icon et2_selectbox_expand ui-icon' id='" + button_id + "'/>")
.addClass(this.options.multiple ? 'ui-icon-minus' : 'ui-icon-plus') .addClass(this.options.multiple ? 'ui-icon-minus' : 'ui-icon-plus')
.on("click", jQuery.proxy(function(e) { .on("click", jQuery.proxy(function(e) {
if(typeof this.input.attr('size') !== 'undefined' && this.input.attr('size') != 1) if(typeof this.input.attr('size') !== 'undefined' && this.input.attr('size') != 1)
@ -744,7 +744,7 @@ var et2_selectbox = (function(){ "use strict"; return et2_inputWidget.extend(
if(typeof _options[key]["label"] == 'undefined' && typeof _options[key]["title"] == "undefined") if(typeof _options[key]["label"] == 'undefined' && typeof _options[key]["title"] == "undefined")
{ {
var label = isNaN(key) ? key : _options[key].value; var label = isNaN(key) ? key : _options[key].value;
var group = $j(document.createElement("optgroup")) var group = jQuery(document.createElement("optgroup"))
.attr("label", this.options.no_lang ? label : this.egw().lang(label)) .attr("label", this.options.no_lang ? label : this.egw().lang(label))
.appendTo(this.input); .appendTo(this.input);
if(this.input == null) if(this.input == null)
@ -829,7 +829,7 @@ var et2_selectbox = (function(){ "use strict"; return et2_inputWidget.extend(
{ {
var value = this.getValue(); var value = this.getValue();
// Array comparison // Array comparison
return !($j(this._oldValue).not(value).length == 0 && $j(value).not(this._oldValue).length == 0); return !(jQuery(this._oldValue).not(value).length == 0 && jQuery(value).not(this._oldValue).length == 0);
} }
else else
{ {
@ -1324,7 +1324,7 @@ var et2_selectbox_ro = (function(){ "use strict"; return et2_selectbox.extend([e
}, },
createInputWidget: function() { createInputWidget: function() {
this.span = $j(document.createElement("span")) this.span = jQuery(document.createElement("span"))
.addClass("et2_selectbox readonly") .addClass("et2_selectbox readonly")
.text(this.options.empty_label); .text(this.options.empty_label);
@ -1333,7 +1333,7 @@ var et2_selectbox_ro = (function(){ "use strict"; return et2_selectbox.extend([e
// Handle read-only multiselects in the same way // Handle read-only multiselects in the same way
createMultiSelect: function() { createMultiSelect: function() {
this.span = $j(document.createElement("ul")) this.span = jQuery(document.createElement("ul"))
.addClass("et2_selectbox readonly"); .addClass("et2_selectbox readonly");
this.setDOMNode(this.span[0]); this.setDOMNode(this.span[0]);
@ -1405,7 +1405,7 @@ var et2_selectbox_ro = (function(){ "use strict"; return et2_selectbox.extend([e
} }
else else
{ {
$j('<li>') jQuery('<li>')
.text(label) .text(label)
.attr('data-value', _value[i]) .attr('data-value', _value[i])
.appendTo(this.span); .appendTo(this.span);
@ -1509,7 +1509,7 @@ et2_register_widget(et2_selectbox_ro, ["menupopup_ro", "listbox_ro", "select_ro"
// Only allow other options inside of this element // Only allow other options inside of this element
this.supportedWidgetClasses = [et2_option]; this.supportedWidgetClasses = [et2_option];
this.option = $j(document.createElement("option")) this.option = jQuery(document.createElement("option"))
.attr("value", this.options.value) .attr("value", this.options.value)
.attr("selected", this._parent.options.value == this.options.value ? .attr("selected", this._parent.options.value == this.options.value ?
"selected" : ""); "selected" : "");

View File

@ -67,7 +67,7 @@ var et2_split = (function(){ "use strict"; return et2_DOMWidget.extend([et2_IRes
init: function() { init: function() {
this._super.apply(this, arguments); this._super.apply(this, arguments);
this.div = $j(document.createElement("div")) this.div = jQuery(document.createElement("div"))
.addClass('et2_split'); .addClass('et2_split');
// Create the dynheight component which dynamically scales the inner // Create the dynheight component which dynamically scales the inner
@ -78,8 +78,8 @@ var et2_split = (function(){ "use strict"; return et2_DOMWidget.extend([et2_IRes
); );
// Add something so we can see it - will be replaced if there's children // Add something so we can see it - will be replaced if there's children
this.left = $j("<div>Top / Left</div>").appendTo(this.div); this.left = jQuery("<div>Top / Left</div>").appendTo(this.div);
this.right = $j("<div>Bottom / Right</div>").appendTo(this.div); this.right = jQuery("<div>Bottom / Right</div>").appendTo(this.div);
// Deferred object so we can wait for children // Deferred object so we can wait for children
this.loading = jQuery.Deferred(); this.loading = jQuery.Deferred();
@ -119,13 +119,13 @@ var et2_split = (function(){ "use strict"; return et2_DOMWidget.extend([et2_IRes
if(this._children[0]) if(this._children[0])
{ {
this.left.detach(); this.left.detach();
this.left = $j(this._children[0].getDOMNode(this._children[0])) this.left = jQuery(this._children[0].getDOMNode(this._children[0]))
.appendTo(this.div); .appendTo(this.div);
} }
if(this._children[1]) if(this._children[1])
{ {
this.right.detach(); this.right.detach();
this.right = $j(this._children[1].getDOMNode(this._children[1])) this.right = jQuery(this._children[1].getDOMNode(this._children[1]))
.appendTo(this.div); .appendTo(this.div);
} }
} }
@ -230,7 +230,7 @@ var et2_split = (function(){ "use strict"; return et2_DOMWidget.extend([et2_IRes
if(this.orientation == "v" && pref['sizeLeft'] < this.dynheight.outerNode.width() || if(this.orientation == "v" && pref['sizeLeft'] < this.dynheight.outerNode.width() ||
this.orientation == "h" && pref['sizeTop'] < this.dynheight.outerNode.height()) this.orientation == "h" && pref['sizeTop'] < this.dynheight.outerNode.height())
{ {
options = $j.extend(options, pref); options = jQuery.extend(options, pref);
this.prefSize = pref[this.orientation == "v" ?'sizeLeft' : 'sizeTop']; this.prefSize = pref[this.orientation == "v" ?'sizeLeft' : 'sizeTop'];
} }
} }
@ -270,7 +270,7 @@ var et2_split = (function(){ "use strict"; return et2_DOMWidget.extend([et2_IRes
+ (this.dock_side ? "solid" : "dotted") + "-" + (this.dock_side ? "solid" : "dotted") + "-"
+ (this.orientation == "h" ? "horizontal" : "vertical"); + (this.orientation == "h" ? "horizontal" : "vertical");
$j(document.createElement("div")) jQuery(document.createElement("div"))
.addClass("ui-icon") .addClass("ui-icon")
.addClass(icon) .addClass(icon)
.appendTo(this.left.next()); .appendTo(this.left.next());
@ -419,7 +419,7 @@ var et2_split = (function(){ "use strict"; return et2_DOMWidget.extend([et2_IRes
* @return boolean * @return boolean
*/ */
isDocked: function() { isDocked: function() {
var bar = $j('.splitter-bar',this.div); var bar = jQuery('.splitter-bar',this.div);
return bar.hasClass('splitter-bar-horizontal-docked') || bar.hasClass('splitter-bar-vertical-docked'); return bar.hasClass('splitter-bar-horizontal-docked') || bar.hasClass('splitter-bar-vertical-docked');
}, },

View File

@ -59,16 +59,16 @@ var et2_tabbox = (function(){ "use strict"; return et2_valueWidget.extend([et2_I
*/ */
init: function() { init: function() {
// Create the outer tabbox container // Create the outer tabbox container
this.container = $j(document.createElement("div")) this.container = jQuery(document.createElement("div"))
.addClass("et2_tabbox"); .addClass("et2_tabbox");
// Create the upper container for the tab flags // Create the upper container for the tab flags
this.flagContainer = $j(document.createElement("div")) this.flagContainer = jQuery(document.createElement("div"))
.addClass("et2_tabheader") .addClass("et2_tabheader")
.appendTo(this.container); .appendTo(this.container);
// Create the lower tab container // Create the lower tab container
this.tabContainer = $j(document.createElement("div")) this.tabContainer = jQuery(document.createElement("div"))
.addClass("et2_tabs") .addClass("et2_tabs")
.appendTo(this.container); .appendTo(this.container);
@ -322,7 +322,7 @@ var et2_tabbox = (function(){ "use strict"; return et2_valueWidget.extend([et2_I
for (var i = 0; i < this.tabData.length; i++) for (var i = 0; i < this.tabData.length; i++)
{ {
var entry = this.tabData[i]; var entry = this.tabData[i];
entry.flagDiv = $j(document.createElement("span")) entry.flagDiv = jQuery(document.createElement("span"))
.addClass("et2_tabflag") .addClass("et2_tabflag")
.appendTo(this.flagContainer); .appendTo(this.flagContainer);
// Class to tab's div container // Class to tab's div container
@ -341,13 +341,13 @@ var et2_tabbox = (function(){ "use strict"; return et2_valueWidget.extend([et2_I
e.data.tabs.setActiveTab(e.data.idx); e.data.tabs.setActiveTab(e.data.idx);
}); });
} }
entry.contentDiv = $j(document.createElement("div")) entry.contentDiv = jQuery(document.createElement("div"))
.addClass("et2_tabcntr") .addClass("et2_tabcntr")
.appendTo(this.tabContainer); .appendTo(this.tabContainer);
if (this.options.align_tabs == 'v') { if (this.options.align_tabs == 'v') {
entry.flagDiv.unbind('click'); entry.flagDiv.unbind('click');
entry.flagDiv.text(""); entry.flagDiv.text("");
$j(document.createElement('div')) jQuery(document.createElement('div'))
.addClass('et2_tabtitle') .addClass('et2_tabtitle')
.text(entry.label || "Tab") .text(entry.label || "Tab")
.click({"tabs": this, "idx": i}, function(e) { .click({"tabs": this, "idx": i}, function(e) {
@ -399,7 +399,7 @@ var et2_tabbox = (function(){ "use strict"; return et2_valueWidget.extend([et2_I
this.selected_index = _idx; this.selected_index = _idx;
// Remove the "active" flag from all tabs-flags // Remove the "active" flag from all tabs-flags
$j(".et2_tabflag", this.flagContainer).removeClass("active"); jQuery(".et2_tabflag", this.flagContainer).removeClass("active");
// Hide all tab containers // Hide all tab containers
this.tabContainer.children().hide(); this.tabContainer.children().hide();

View File

@ -210,7 +210,7 @@ var et2_taglist = (function(){ "use strict"; return et2_selectbox.extend([et2_IR
} }
// MagicSuggest would replaces our div, so add a wrapper instead // MagicSuggest would replaces our div, so add a wrapper instead
this.taglist = $j('<div/>').appendTo(this.div); this.taglist = jQuery('<div/>').appendTo(this.div);
this.taglist_options = jQuery.extend( { this.taglist_options = jQuery.extend( {
// magisuggest can NOT work setting an empty autocomplete url, it will then call page url! // magisuggest can NOT work setting an empty autocomplete url, it will then call page url!
@ -255,7 +255,7 @@ var et2_taglist = (function(){ "use strict"; return et2_selectbox.extend([et2_IR
} }
this.taglist = this.taglist.magicSuggest(this.taglist_options); this.taglist = this.taglist.magicSuggest(this.taglist_options);
this.$taglist = $j(this.taglist); this.$taglist = jQuery(this.taglist);
if(this.options.value) if(this.options.value)
{ {
this.taglist.addToSelection(this.options.value,true); this.taglist.addToSelection(this.options.value,true);
@ -276,10 +276,10 @@ var et2_taglist = (function(){ "use strict"; return et2_selectbox.extend([et2_IR
this.$taglist this.$taglist
// Display / hide a loading icon while fetching // Display / hide a loading icon while fetching
.on("beforeload", function() {this.container.prepend('<div class="ui-icon loading"/>');}) .on("beforeload", function() {this.container.prepend('<div class="ui-icon loading"/>');})
.on("load", function() {$j('.loading',this.container).remove();}) .on("load", function() {jQuery('.loading',this.container).remove();})
// Keep focus when selecting from the list // Keep focus when selecting from the list
.on("selectionchange", function() { .on("selectionchange", function() {
$j('input',this.container).focus(); jQuery('input',this.container).focus();
widget.resize(); widget.resize();
}) })
// Bind keyup so we can start ajax search when we like // Bind keyup so we can start ajax search when we like
@ -292,7 +292,7 @@ var et2_taglist = (function(){ "use strict"; return et2_selectbox.extend([et2_IR
}, this)) }, this))
// Hide tooltip when you're editing, it can get annoying otherwise // Hide tooltip when you're editing, it can get annoying otherwise
.on('focus', function() { .on('focus', function() {
$j('.egw_tooltip').hide(); jQuery('.egw_tooltip').hide();
widget.div.addClass('ui-state-active'); widget.div.addClass('ui-state-active');
}) })
// If not using autoSelect, avoid some errors with selection starting // If not using autoSelect, avoid some errors with selection starting
@ -332,18 +332,18 @@ var et2_taglist = (function(){ "use strict"; return et2_selectbox.extend([et2_IR
// Make sure it doesn't go out of the window // Make sure it doesn't go out of the window
var bottom = (wrapper.offset().top + this.taglist.combobox.outerHeight(true)); var bottom = (wrapper.offset().top + this.taglist.combobox.outerHeight(true));
if(bottom > $j(window).height()) if(bottom > jQuery(window).height())
{ {
this.taglist.combobox.height(this.taglist.combobox.height() - (bottom - $j(window).height()) - 5); this.taglist.combobox.height(this.taglist.combobox.height() - (bottom - jQuery(window).height()) - 5);
} }
// Close dropdown if click elsewhere or scroll the sidebox, // Close dropdown if click elsewhere or scroll the sidebox,
// but wait until after or it will close immediately // but wait until after or it will close immediately
window.setTimeout(function() { window.setTimeout(function() {
$j('.egw_fw_ui_scrollarea').one('scroll mousewheel', function() { jQuery('.egw_fw_ui_scrollarea').one('scroll mousewheel', function() {
taglist.collapse(); taglist.collapse();
}); });
$j('body').one('click',function() { jQuery('body').one('click',function() {
taglist.collapse(); taglist.collapse();
taglist.input.focus(); taglist.input.focus();
});},100 });},100
@ -356,12 +356,12 @@ var et2_taglist = (function(){ "use strict"; return et2_selectbox.extend([et2_IR
widget.div.removeClass('expanded'); widget.div.removeClass('expanded');
}); });
$j('.ms-trigger',this.div).on('click', function(e) { jQuery('.ms-trigger',this.div).on('click', function(e) {
e.stopPropagation(); e.stopPropagation();
}); });
// Unbind change handler of widget's ancestor to stop it from bubbling // Unbind change handler of widget's ancestor to stop it from bubbling
// taglist has its own onchange // taglist has its own onchange
$j(this.getDOMNode()).unbind('change.et2_inputWidget'); jQuery(this.getDOMNode()).unbind('change.et2_inputWidget');
// This handles clicking on a suggestion from the list in an et2 friendly way // This handles clicking on a suggestion from the list in an et2 friendly way
// onChange // onChange
@ -376,7 +376,7 @@ var et2_taglist = (function(){ "use strict"; return et2_selectbox.extend([et2_IR
this.div.unbind("click.et2_baseWidget") this.div.unbind("click.et2_baseWidget")
.on("click.et2_baseWidget", '.ms-sel-item', jQuery.proxy(function(event) { .on("click.et2_baseWidget", '.ms-sel-item', jQuery.proxy(function(event) {
// Pass the target as expected, but also the data for that tag // Pass the target as expected, but also the data for that tag
this.click(/*event.target,*/ $j(event.target).parent().data("json")); this.click(/*event.target,*/ jQuery(event.target).parent().data("json"));
},this)); },this));
} }
@ -441,7 +441,7 @@ var et2_taglist = (function(){ "use strict"; return et2_selectbox.extend([et2_IR
// selected), do not ask server // selected), do not ask server
var filtered = []; var filtered = [];
var selected = this.taglist.getSelection(); var selected = this.taglist.getSelection();
$j.each(this.options.select_options, function(index, obj) { jQuery.each(this.options.select_options, function(index, obj) {
var name = obj.label; var name = obj.label;
if(selected.indexOf(obj) < 0 && name.toLowerCase().indexOf(query.toLowerCase()) > -1) if(selected.indexOf(obj) < 0 && name.toLowerCase().indexOf(query.toLowerCase()) > -1)
{ {
@ -683,11 +683,11 @@ var et2_taglist = (function(){ "use strict"; return et2_selectbox.extend([et2_IR
{ {
window.clearTimeout(this._hide_timeout); window.clearTimeout(this._hide_timeout);
} }
$j('.egw_tooltip').hide(); jQuery('.egw_tooltip').hide();
},this)) },this))
.on('mouseleave.small_size', jQuery.proxy(function(event) { .on('mouseleave.small_size', jQuery.proxy(function(event) {
// Ignore tooltip // Ignore tooltip
if(event.toElement && $j(event.toElement).hasClass('egw_tooltip')) return; if(event.toElement && jQuery(event.toElement).hasClass('egw_tooltip')) return;
if(this._hide_timeout) if(this._hide_timeout)
{ {
@ -754,7 +754,7 @@ var et2_taglist = (function(){ "use strict"; return et2_selectbox.extend([et2_IR
} }
else if (this.options.select_options && else if (this.options.select_options &&
// Check options // Check options
(result = $j.grep(this.options.select_options, function(e) { (result = jQuery.grep(this.options.select_options, function(e) {
return e.id == v; return e.id == v;
})) && result.length })) && result.length
) )
@ -772,7 +772,7 @@ var et2_taglist = (function(){ "use strict"; return et2_selectbox.extend([et2_IR
} }
else if (this.taglist && else if (this.taglist &&
// Check current selection to avoid going back to server // Check current selection to avoid going back to server
(result = $j.grep(this.taglist.getSelection(), function(e) { (result = jQuery.grep(this.taglist.getSelection(), function(e) {
return e.id == v; return e.id == v;
})) && result.length) })) && result.length)
{ {
@ -829,12 +829,12 @@ var et2_taglist = (function(){ "use strict"; return et2_selectbox.extend([et2_IR
this.div.removeClass('et2_taglist_small'); this.div.removeClass('et2_taglist_small');
// How much space is needed for first one? // How much space is needed for first one?
var min_width = $j('.ms-sel-item',this.div ).first().outerWidth() || this.div.children().first().width(); var min_width = jQuery('.ms-sel-item',this.div ).first().outerWidth() || this.div.children().first().width();
// Not ready yet // Not ready yet
if(min_width === null) return; if(min_width === null) return;
min_width += (this.options.multiple === 'toggle' ? $j('.toggle',this.div).outerWidth() : 0); min_width += (this.options.multiple === 'toggle' ? jQuery('.toggle',this.div).outerWidth() : 0);
min_width += this.taglist.trigger ? this.taglist.trigger.outerWidth(true) : 0; min_width += this.taglist.trigger ? this.taglist.trigger.outerWidth(true) : 0;
// Not enough for one // Not enough for one
@ -966,11 +966,11 @@ var et2_taglist_account = (function(){ "use strict"; return et2_taglist.extend(
if (typeof v == 'object' && v.id === v.label) v = v.id; if (typeof v == 'object' && v.id === v.label) v = v.id;
if (this.options.select_options && if (this.options.select_options &&
// Check options // Check options
(result = $j.grep(this.options.select_options, function(e) { (result = jQuery.grep(this.options.select_options, function(e) {
return e.id == v; return e.id == v;
})) || })) ||
// Check current selection to avoid going back to server // Check current selection to avoid going back to server
(result = $j.grep(this.taglist.getSelection(), function(e) { (result = jQuery.grep(this.taglist.getSelection(), function(e) {
return e.id == v; return e.id == v;
})) }))
) )
@ -1248,13 +1248,13 @@ var et2_taglist_ro = (function(){ "use strict"; return et2_selectbox_ro.extend(
this.span = jQuery('<div><ul /></div>') this.span = jQuery('<div><ul /></div>')
.addClass('et2_taglist_ro'); .addClass('et2_taglist_ro');
this.setDOMNode(this.span[0]); this.setDOMNode(this.span[0]);
this.span = $j('ul',this.span) this.span = jQuery('ul',this.span)
.addClass('ms-sel-ctn'); .addClass('ms-sel-ctn');
}, },
set_value: function(_value) { set_value: function(_value) {
this._super.apply(this, arguments); this._super.apply(this, arguments);
$j('li',this.span).addClass('ms-sel-item'); jQuery('li',this.span).addClass('ms-sel-item');
} }
});}).call(this); });}).call(this);
et2_register_widget(et2_taglist_ro, ["taglist_ro","taglist_email_ro", "taglist_account_ro" ]); et2_register_widget(et2_taglist_ro, ["taglist_ro","taglist_email_ro", "taglist_account_ro" ]);

View File

@ -195,7 +195,7 @@ var et2_template = (function(){ "use strict"; return et2_DOMWidget.extend(
this._super.apply(this, arguments); this._super.apply(this, arguments);
// Fire load event when done loading // Fire load event when done loading
this.loading.done(jQuery.proxy(function() {$j(this).trigger("load");},this.div)); this.loading.done(jQuery.proxy(function() {jQuery(this).trigger("load");},this.div));
// Not done yet, but widget will let you know // Not done yet, but widget will let you know
return this.loading.promise(); return this.loading.promise();

View File

@ -99,7 +99,7 @@ var et2_textbox = (function(){ "use strict"; return et2_inputWidget.extend([et2_
createInputWidget: function() { createInputWidget: function() {
if (this.options.multiline || this.options.rows > 1 || this.options.cols > 1) if (this.options.multiline || this.options.rows > 1 || this.options.cols > 1)
{ {
this.input = $j(document.createElement("textarea")); this.input = jQuery(document.createElement("textarea"));
if (this.options.rows > 0) if (this.options.rows > 0)
{ {
@ -113,7 +113,7 @@ var et2_textbox = (function(){ "use strict"; return et2_inputWidget.extend([et2_
} }
else else
{ {
this.input = $j(document.createElement("input")); this.input = jQuery(document.createElement("input"));
switch(this.options.type) switch(this.options.type)
{ {
case "passwd": case "passwd":
@ -171,7 +171,7 @@ var et2_textbox = (function(){ "use strict"; return et2_inputWidget.extend([et2_
destroy: function() { destroy: function() {
var node = this.getInputNode(); var node = this.getInputNode();
if (node) $j(node).unbind("keypress"); if (node) jQuery(node).unbind("keypress");
this._super.apply(this, arguments); this._super.apply(this, arguments);
}, },
@ -336,9 +336,9 @@ var et2_textbox_ro = (function(){ "use strict"; return et2_valueWidget.extend([e
this._super.apply(this, arguments); this._super.apply(this, arguments);
this.value = ""; this.value = "";
this.span = $j(document.createElement("label")) this.span = jQuery(document.createElement("label"))
.addClass("et2_label"); .addClass("et2_label");
this.value_span = $j(document.createElement("span")) this.value_span = jQuery(document.createElement("span"))
.addClass("et2_textbox_ro") .addClass("et2_textbox_ro")
.appendTo(this.span); .appendTo(this.span);
@ -609,7 +609,7 @@ var et2_searchbox = (function(){ "use strict"; return et2_textbox.extend(
var node = this.getInputNode(); var node = this.getInputNode();
if (node) if (node)
{ {
$j(node).off('.et2_inputWidget'); jQuery(node).off('.et2_inputWidget');
} }
}, },
});}).call(this); });}).call(this);

View File

@ -59,18 +59,18 @@ var et2_toolbar = (function(){ "use strict"; return et2_DOMWidget.extend([et2_II
*/ */
init: function() { init: function() {
this._super.apply(this, arguments); this._super.apply(this, arguments);
this.div = $j(document.createElement('div')) this.div = jQuery(document.createElement('div'))
.addClass('et2_toolbar ui-widget-header ui-corner-all'); .addClass('et2_toolbar ui-widget-header ui-corner-all');
// Set proper id and dom_id for the widget // Set proper id and dom_id for the widget
this.set_id(this.id); this.set_id(this.id);
//actionbox is the div for stored actions //actionbox is the div for stored actions
this.actionbox = $j(document.createElement('div')) this.actionbox = jQuery(document.createElement('div'))
.addClass("et2_toolbar_more") .addClass("et2_toolbar_more")
.attr('id',this.id +'-'+ 'actionbox'); .attr('id',this.id +'-'+ 'actionbox');
//actionlist is div for active actions //actionlist is div for active actions
this.actionlist = $j(document.createElement('div')) this.actionlist = jQuery(document.createElement('div'))
.addClass("et2_toolbar_actionlist") .addClass("et2_toolbar_actionlist")
.attr('id',this.id +'-'+ 'actionlist'); .attr('id',this.id +'-'+ 'actionlist');
@ -237,10 +237,10 @@ var et2_toolbar = (function(){ "use strict"; return et2_DOMWidget.extend([et2_II
// Add in divider // Add in divider
if(last_group_id != action.group) if(last_group_id != action.group)
{ {
last_group = $j('[data-group="' + action.group + '"]',this.actionlist); last_group = jQuery('[data-group="' + action.group + '"]',this.actionlist);
if(last_group.length == 0) if(last_group.length == 0)
{ {
$j('<span data-group="'+action.group+'">').appendTo(this.actionlist); jQuery('<span data-group="'+action.group+'">').appendTo(this.actionlist);
} }
last_group_id = action.group; last_group_id = action.group;
} }
@ -344,10 +344,10 @@ var et2_toolbar = (function(){ "use strict"; return et2_DOMWidget.extend([et2_II
} }
//console.debug(selected, this, action); //console.debug(selected, this, action);
},dropdown); },dropdown);
$j(dropdown.getDOMNode()) jQuery(dropdown.getDOMNode())
.attr('id',this.id + '-' + dropdown.id) .attr('id',this.id + '-' + dropdown.id)
.addClass(this.preference[action.id]?'et2_toolbar-dropdown et2_toolbar-dropdown-menulist':'et2_toolbar-dropdown') .addClass(this.preference[action.id]?'et2_toolbar-dropdown et2_toolbar-dropdown-menulist':'et2_toolbar-dropdown')
.appendTo(this.preference[action.id]?this.actionbox.children()[1]:$j('[data-group='+action.group+']',this.actionlist)); .appendTo(this.preference[action.id]?this.actionbox.children()[1]:jQuery('[data-group='+action.group+']',this.actionlist));
} }
else else
{ {
@ -426,16 +426,16 @@ var et2_toolbar = (function(){ "use strict"; return et2_DOMWidget.extend([et2_II
var menubox = event.target; var menubox = event.target;
if (ui.oldHeader.length == 0) if (ui.oldHeader.length == 0)
{ {
$j('html').on('click.outsideOfMenu', function (event){ jQuery('html').on('click.outsideOfMenu', function (event){
$j(menubox).accordion( "option", "active", 2); jQuery(menubox).accordion( "option", "active", 2);
$j(this).unbind(event); jQuery(this).unbind(event);
// Remove the focus class, user clicked elsewhere // Remove the focus class, user clicked elsewhere
$j(menubox).children().removeClass('ui-state-focus'); jQuery(menubox).children().removeClass('ui-state-focus');
}); });
} }
}, },
create: function (event, ui) { create: function (event, ui) {
$j('html').unbind('click.outsideOfMenu'); jQuery('html').unbind('click.outsideOfMenu');
}, },
beforeActivate: function () beforeActivate: function ()
{ {
@ -476,12 +476,12 @@ var et2_toolbar = (function(){ "use strict"; return et2_DOMWidget.extend([et2_II
{ {
var button_options = { var button_options = {
}; };
var button = $j(document.createElement('button')) var button = jQuery(document.createElement('button'))
.addClass("et2_button et2_button_text et2_button_with_image") .addClass("et2_button et2_button_text et2_button_with_image")
.attr('id', this.id+'-'+action.id) .attr('id', this.id+'-'+action.id)
.attr('title', (action.hint ? action.hint : action.caption)) .attr('title', (action.hint ? action.hint : action.caption))
.attr('type', 'button') .attr('type', 'button')
.appendTo(this.preference[action.id]?this.actionbox.children()[1]:$j('[data-group='+action.group+']',this.actionlist)); .appendTo(this.preference[action.id]?this.actionbox.children()[1]:jQuery('[data-group='+action.group+']',this.actionlist));
if (action && action.checkbox) if (action && action.checkbox)
{ {

View File

@ -124,7 +124,7 @@ var et2_tree = (function(){ "use strict"; return et2_inputWidget.extend(
this.input = null; this.input = null;
this.div = $j(document.createElement("div")).addClass("dhtmlxTree"); this.div = jQuery(document.createElement("div")).addClass("dhtmlxTree");
this.setDOMNode(this.div[0]); this.setDOMNode(this.div[0]);
}, },

View File

@ -51,7 +51,7 @@ var et2_url = (function(){ "use strict"; return et2_textbox.extend(
* @memberOf et2_url * @memberOf et2_url
*/ */
createInputWidget: function() { createInputWidget: function() {
this.input = $j(document.createElement("input")) this.input = jQuery(document.createElement("input"))
.blur(this,this.validate) .blur(this,this.validate)
.blur(this,function(e){e.data.set_value(e.data.getValue());}); .blur(this,function(e){e.data.set_value(e.data.getValue());});
@ -89,7 +89,7 @@ var et2_url = (function(){ "use strict"; return et2_textbox.extend(
// Create button if it doesn't exist yet // Create button if it doesn't exist yet
if(this._button == null) if(this._button == null)
{ {
this._button = $j(document.createElement("a")).addClass("et2_url"); this._button = jQuery(document.createElement("a")).addClass("et2_url");
this.getSurroundings().insertDOMNode(this._button[0]); this.getSurroundings().insertDOMNode(this._button[0]);
this.getSurroundings().update(); this.getSurroundings().update();
} }
@ -256,7 +256,7 @@ var et2_url_ro = (function(){ "use strict"; return et2_valueWidget.extend([et2_I
this._super.apply(this, arguments); this._super.apply(this, arguments);
this.value = ""; this.value = "";
this.span = $j(document.createElement("a")) this.span = jQuery(document.createElement("a"))
.addClass("et2_textbox readonly"); .addClass("et2_textbox readonly");
// Do not a tag if no call_link is set and not in mobile, empty a tag may conflict // Do not a tag if no call_link is set and not in mobile, empty a tag may conflict
// with some browser telephony addons (eg. telify in FF) // with some browser telephony addons (eg. telify in FF)

View File

@ -47,7 +47,7 @@ var et2_vfs = (function(){ "use strict"; return et2_valueWidget.extend([et2_IDet
this._super.apply(this, arguments); this._super.apply(this, arguments);
this.value = ""; this.value = "";
this.span = $j(document.createElement("ul")) this.span = jQuery(document.createElement("ul"))
.addClass('et2_vfs'); .addClass('et2_vfs');
this.setDOMNode(this.span[0]); this.setDOMNode(this.span[0]);
@ -115,7 +115,7 @@ var et2_vfs = (function(){ "use strict"; return et2_valueWidget.extend([et2_IDet
var link_title = this.egw().link_title(path_parts[2],path_parts[3], var link_title = this.egw().link_title(path_parts[2],path_parts[3],
function(title) { function(title) {
if(!title || this.value.name == title) return; if(!title || this.value.name == title) return;
$j('li',this.span).last().text(title); jQuery('li',this.span).last().text(title);
}, this }, this
); );
if(link_title && typeof link_title !== 'undefined') text = link_title; if(link_title && typeof link_title !== 'undefined') text = link_title;
@ -125,7 +125,7 @@ var et2_vfs = (function(){ "use strict"; return et2_valueWidget.extend([et2_IDet
} }
var self = this; var self = this;
var data = {path: path, type: i < path_parts.length-1 ? this.DIR_MIME_TYPE : _value.mime }; var data = {path: path, type: i < path_parts.length-1 ? this.DIR_MIME_TYPE : _value.mime };
$j(document.createElement("li")) jQuery(document.createElement("li"))
.addClass("vfsFilename") .addClass("vfsFilename")
.text(text + (i < path_parts.length-1 ? '/' : '')) .text(text + (i < path_parts.length-1 ? '/' : ''))
//.attr('title', egw.decodePath(path)) //.attr('title', egw.decodePath(path))
@ -666,7 +666,7 @@ var et2_vfsUpload = (function(){ "use strict"; return et2_file.extend(
*/ */
init: function(_parent, attrs) { init: function(_parent, attrs) {
this._super.apply(this, arguments); this._super.apply(this, arguments);
$j(this.node).addClass("et2_vfs"); jQuery(this.node).addClass("et2_vfs");
if(!this.options.path) if(!this.options.path)
{ {
@ -677,7 +677,7 @@ var et2_vfsUpload = (function(){ "use strict"; return et2_file.extend(
{ {
this.set_multiple(true); this.set_multiple(true);
} }
this.list = $j(document.createElement('table')).appendTo(this.node); this.list = jQuery(document.createElement('table')).appendTo(this.node);
}, },
/** /**
@ -720,14 +720,14 @@ var et2_vfsUpload = (function(){ "use strict"; return et2_file.extend(
if(sender !== this && sender._type.indexOf('vfs') >= 0 ) if(sender !== this && sender._type.indexOf('vfs') >= 0 )
{ {
var value = sender.getValue && sender.getValue() || sender.options.value || {}; var value = sender.getValue && sender.getValue() || sender.options.value || {};
var row = $j('[data-path="'+(value.path)+'"]',this.list); var row = jQuery('[data-path="'+(value.path)+'"]',this.list);
if(sender._type === 'vfs-mime') if(sender._type === 'vfs-mime')
{ {
return $j('.icon',row).get(0) || null; return jQuery('.icon',row).get(0) || null;
} }
else else
{ {
return $j('.title',row).get(0) || null; return jQuery('.title',row).get(0) || null;
} }
} }
else else
@ -751,15 +751,15 @@ var et2_vfsUpload = (function(){ "use strict"; return et2_file.extend(
}, },
_addFile: function(file_data) { _addFile: function(file_data) {
var row = $j(document.createElement("tr")) var row = jQuery(document.createElement("tr"))
.attr("data-path", file_data.path) .attr("data-path", file_data.path)
.attr("draggable", "true") .attr("draggable", "true")
.appendTo(this.list); .appendTo(this.list);
var mime = $j(document.createElement("td")) var mime = jQuery(document.createElement("td"))
.addClass('icon') .addClass('icon')
.appendTo(row); .appendTo(row);
var title = $j(document.createElement("td")) var title = jQuery(document.createElement("td"))
.addClass('title') .addClass('title')
.appendTo(row); .appendTo(row);
var mime = et2_createWidget('vfs-mime',{value: file_data},this); var mime = et2_createWidget('vfs-mime',{value: file_data},this);
@ -769,9 +769,9 @@ var et2_vfsUpload = (function(){ "use strict"; return et2_file.extend(
if (!this.options.readonly) if (!this.options.readonly)
{ {
var self = this; var self = this;
var delete_button = $j(document.createElement("td")) var delete_button = jQuery(document.createElement("td"))
.appendTo(row); .appendTo(row);
$j("<div />") jQuery("<div />")
.appendTo(delete_button) .appendTo(delete_button)
// We don't use ui-icon because it assigns a bg image // We don't use ui-icon because it assigns a bg image
.addClass("delete icon") .addClass("delete icon")
@ -868,7 +868,7 @@ var et2_vfsSelect = (function(){ "use strict"; return et2_inputWidget.extend(
// Allow no child widgets // Allow no child widgets
this.supportedWidgetClasses = []; this.supportedWidgetClasses = [];
this.button = $j(document.createElement("button")) this.button = jQuery(document.createElement("button"))
.attr("title", this.egw().lang("Select file(s) from VFS")) .attr("title", this.egw().lang("Select file(s) from VFS"))
.addClass("et2_button et2_vfs_btn") .addClass("et2_button et2_vfs_btn")
.css("background-image","url("+this.egw().image("filemanager/navbar")+")"); .css("background-image","url("+this.egw().image("filemanager/navbar")+")");
@ -930,7 +930,7 @@ var et2_vfsSelect = (function(){ "use strict"; return et2_inputWidget.extend(
if(popup.closed) { if(popup.closed) {
self.egw().window.clearInterval(poll); self.egw().window.clearInterval(poll);
// Fire a change event so any handlers run // Fire a change event so any handlers run
$j(self.node).change(); jQuery(self.node).change();
} }
},1000 },1000
); );

View File

@ -149,16 +149,16 @@ etemplate2.prototype.resize = function(e)
self.resize_timeout = false; self.resize_timeout = false;
if (self.widgetContainer) if (self.widgetContainer)
{ {
var appHeader = $j('#divAppboxHeader'); var appHeader = jQuery('#divAppboxHeader');
//Calculate the excess height //Calculate the excess height
excess_height = egw(window).is_popup()? $j(window).height() - $j(self.DOMContainer).height() - appHeader.outerHeight()+11: false; excess_height = egw(window).is_popup()? jQuery(window).height() - jQuery(self.DOMContainer).height() - appHeader.outerHeight()+11: false;
// Recalculate excess height if the appheader is shown // Recalculate excess height if the appheader is shown
if (appHeader.length > 0 && appHeader.is(':visible')) excess_height -= appHeader.outerHeight()-9; if (appHeader.length > 0 && appHeader.is(':visible')) excess_height -= appHeader.outerHeight()-9;
// Do not resize if the template height is bigger than screen available height // Do not resize if the template height is bigger than screen available height
// For templates which have sub templates and they are bigger than screenHeight // For templates which have sub templates and they are bigger than screenHeight
if(screen.availHeight < $j(self.DOMContainer).height()) excess_height = 0; if(screen.availHeight < jQuery(self.DOMContainer).height()) excess_height = 0;
// Call the "resize" event of all functions which implement the // Call the "resize" event of all functions which implement the
// "IResizeable" interface // "IResizeable" interface
@ -185,12 +185,12 @@ etemplate2.prototype.resize = function(e)
*/ */
etemplate2.prototype.clear = function() etemplate2.prototype.clear = function()
{ {
$j(this.DOMContainer).trigger('clear'); jQuery(this.DOMContainer).trigger('clear');
// Remove any handlers on window (resize) // Remove any handlers on window (resize)
if(this.uniqueId) if(this.uniqueId)
{ {
$j(window).off("."+this.uniqueId); jQuery(window).off("."+this.uniqueId);
} }
// call our destroy_session handler, if it is not already unbind, and unbind it after // call our destroy_session handler, if it is not already unbind, and unbind it after
@ -207,7 +207,7 @@ etemplate2.prototype.clear = function()
this.widgetContainer.free(); this.widgetContainer.free();
this.widgetContainer = null; this.widgetContainer = null;
} }
$j(this.DOMContainer).empty(); jQuery(this.DOMContainer).empty();
// Remove self from the index // Remove self from the index
for(name in this.templates) for(name in this.templates)
@ -393,7 +393,7 @@ etemplate2.prototype.load = function(_name, _url, _data, _callback, _app, _no_et
} }
// require necessary translations from server, if not already loaded // require necessary translations from server, if not already loaded
if (!$j.isArray(_data.langRequire)) _data.langRequire = []; if (!jQuery.isArray(_data.langRequire)) _data.langRequire = [];
egw(currentapp, window).langRequire(window, _data.langRequire, function() egw(currentapp, window).langRequire(window, _data.langRequire, function()
{ {
// Initialize application js // Initialize application js
@ -476,7 +476,7 @@ etemplate2.prototype.load = function(_name, _url, _data, _callback, _app, _no_et
this.widgetContainer.loadingFinished(deferred); this.widgetContainer.loadingFinished(deferred);
// Connect to the window resize event // Connect to the window resize event
$j(window).on("resize."+this.uniqueId, this, function(e) {e.data.resize(e);}); jQuery(window).on("resize."+this.uniqueId, this, function(e) {e.data.resize(e);});
// Insert the document fragment to the DOM Container // Insert the document fragment to the DOM Container
this.DOMContainer.appendChild(frag); this.DOMContainer.appendChild(frag);
@ -488,7 +488,7 @@ etemplate2.prototype.load = function(_name, _url, _data, _callback, _app, _no_et
if(deferred.length > 0) if(deferred.length > 0)
{ {
var still_deferred = 0; var still_deferred = 0;
$j(deferred).each(function() {if(this.state() == "pending") still_deferred++;}); jQuery(deferred).each(function() {if(this.state() == "pending") still_deferred++;});
if(still_deferred > 0) if(still_deferred > 0)
{ {
egw.debug("log", "Template loaded, waiting for %d/%d deferred to finish...",still_deferred, deferred.length); egw.debug("log", "Template loaded, waiting for %d/%d deferred to finish...",still_deferred, deferred.length);
@ -508,14 +508,14 @@ etemplate2.prototype.load = function(_name, _url, _data, _callback, _app, _no_et
this.resize(); this.resize();
// Automatically set focus to first visible input for popups // Automatically set focus to first visible input for popups
if(this.widgetContainer._egw.is_popup() && $j('[autofocus]',this.DOMContainer).focus().length == 0) if(this.widgetContainer._egw.is_popup() && jQuery('[autofocus]',this.DOMContainer).focus().length == 0)
{ {
var $input = $j('input:visible',this.DOMContainer) var $input = jQuery('input:visible',this.DOMContainer)
// Date fields open the calendar popup on focus // Date fields open the calendar popup on focus
.not('.et2_date') .not('.et2_date')
.filter(function() { .filter(function() {
// Skip inputs that are out of tab ordering // Skip inputs that are out of tab ordering
var $this = $j(this); var $this = jQuery(this);
return !$this.attr('tabindex') || $this.attr('tabIndex')>=0; return !$this.attr('tabindex') || $this.attr('tabIndex')>=0;
}).first(); }).first();
@ -540,7 +540,7 @@ etemplate2.prototype.load = function(_name, _url, _data, _callback, _app, _no_et
app[this.app].et2_ready(this, this.name); app[this.app].et2_ready(this, this.name);
} }
$j(this.DOMContainer).trigger('load', this); jQuery(this.DOMContainer).trigger('load', this);
// Profiling // Profiling
if(egw.debug_level() >= 4) if(egw.debug_level() >= 4)
@ -554,8 +554,8 @@ etemplate2.prototype.load = function(_name, _url, _data, _callback, _app, _no_et
console.profileEnd(_name); console.profileEnd(_name);
} }
var end_time = (new Date).getTime(); var end_time = (new Date).getTime();
var gen_time_div = $j('#divGenTime_'+appname); var gen_time_div = jQuery('#divGenTime_'+appname);
if (!gen_time_div.length) gen_time_div = $j('.pageGenTime'); if (!gen_time_div.length) gen_time_div = jQuery('.pageGenTime');
gen_time_div.find('.et2RenderTime').remove(); gen_time_div.find('.et2RenderTime').remove();
gen_time_div.append('<span class="et2RenderTime">'+egw.lang('eT2 rendering took %1s', (end_time-start_time)/1000)+'</span>'); gen_time_div.append('<span class="et2RenderTime">'+egw.lang('eT2 rendering took %1s', (end_time-start_time)/1000)+'</span>');
} }
@ -1275,8 +1275,8 @@ function xajax_eT_wrapper(obj,widget)
egw().debug("warn", "xajax_eT_wrapper() is deprecated, replace with widget.getInstanceManager().submit()"); egw().debug("warn", "xajax_eT_wrapper() is deprecated, replace with widget.getInstanceManager().submit()");
if(typeof obj == "object") if(typeof obj == "object")
{ {
$j("div.popupManual div.noPrint").hide(); jQuery("div.popupManual div.noPrint").hide();
$j("div.ajax-loader").show(); jQuery("div.ajax-loader").show();
if(typeof widget == "undefined" && obj.id) if(typeof widget == "undefined" && obj.id)
{ {
// Try to find the widget by ID so we don't have to change every call // Try to find the widget by ID so we don't have to change every call
@ -1291,7 +1291,7 @@ function xajax_eT_wrapper(obj,widget)
} }
else else
{ {
$j("div.popupManual div.noPrint").show(); jQuery("div.popupManual div.noPrint").show();
$j("div.ajax-loader").hide(); jQuery("div.ajax-loader").hide();
} }
} }

View File

@ -144,7 +144,7 @@ function expose (widget)
{ {
//Add load class if it's really a slide with error //Add load class if it's really a slide with error
if (gallery.slidesContainer.find('[data-index="'+index+'"]').hasClass(gallery.options.slideErrorClass)) if (gallery.slidesContainer.find('[data-index="'+index+'"]').hasClass(gallery.options.slideErrorClass))
$j(gallery.slides[index]) jQuery(gallery.slides[index])
.addClass(gallery.options.slideLoadingClass) .addClass(gallery.options.slideLoadingClass)
.removeClass(gallery.options.slideErrorClass); .removeClass(gallery.options.slideErrorClass);
return; return;
@ -152,7 +152,7 @@ function expose (widget)
// Remove the loading class if the slide is loaded // Remove the loading class if the slide is loaded
else else
{ {
$j(gallery.slides[index]).removeClass(gallery.options.slideLoadingClass); jQuery(gallery.slides[index]).removeClass(gallery.options.slideLoadingClass);
} }
// Just use add to let gallery create everything it needs // Just use add to let gallery create everything it needs
@ -173,19 +173,19 @@ function expose (widget)
{ {
var var_name = dom_nodes[i]; var var_name = dom_nodes[i];
// Remove old one from DOM // Remove old one from DOM
$j(gallery[var_name][index]).remove(); jQuery(gallery[var_name][index]).remove();
// Move new one into it's place in gallery // Move new one into it's place in gallery
gallery[var_name][index] = gallery[var_name][new_index]; gallery[var_name][index] = gallery[var_name][new_index];
// Move into place in DOM // Move into place in DOM
var node = $j(gallery[var_name][index]); var node = jQuery(gallery[var_name][index]);
node.attr('data-index', index) node.attr('data-index', index)
.insertAfter($j("[data-index='"+(index-1)+"']",node.parent())); .insertAfter(jQuery("[data-index='"+(index-1)+"']",node.parent()));
if(active) node.addClass(gallery.options.activeIndicatorClass); if(active) node.addClass(gallery.options.activeIndicatorClass);
gallery[var_name].splice(new_index,1); gallery[var_name].splice(new_index,1);
} }
if(active) if(active)
{ {
gallery.activeIndicator = $j(gallery.indicators[index]); gallery.activeIndicator = jQuery(gallery.indicators[index]);
} }
// positions // positions
@ -496,22 +496,22 @@ function expose (widget)
{ {
return; return;
} }
$j(this).css('left',min(0,parseInt($j(this).css('left'))-(distance*30))+'px'); jQuery(this).css('left',min(0,parseInt(jQuery(this).css('left'))-(distance*30))+'px');
}); });
// Bind the mousewheel handler for FF (DOMMousewheel), and other browsers (mousewheel) // Bind the mousewheel handler for FF (DOMMousewheel), and other browsers (mousewheel)
$indicator.bind('mousewheel DOMMousewheel',function(event, _delta) { $indicator.bind('mousewheel DOMMousewheel',function(event, _delta) {
var delta = _delta || event.originalEvent.wheelDelta / 120; var delta = _delta || event.originalEvent.wheelDelta / 120;
if(delta > 0 && parseInt($j(this).css('left')) > gallery.container.width() / 2) return; if(delta > 0 && parseInt(jQuery(this).css('left')) > gallery.container.width() / 2) return;
//Reload next pictures into the gallery by scrolling on thumbnails //Reload next pictures into the gallery by scrolling on thumbnails
if (delta<0 && $j(this).width() + parseInt($j(this).css('left')) < gallery.container.width()) if (delta<0 && jQuery(this).width() + parseInt(jQuery(this).css('left')) < gallery.container.width())
{ {
var nextIndex = gallery.indicatorContainer.find('[title="loading"]')[0]; var nextIndex = gallery.indicatorContainer.find('[title="loading"]')[0];
if (nextIndex) self.expose_onslideend(gallery,nextIndex.dataset.index -1); if (nextIndex) self.expose_onslideend(gallery,nextIndex.dataset.index -1);
return; return;
} }
// Move it about 5 indicators // Move it about 5 indicators
$j(this).css('left',parseInt($j(this).css('left'))-(-delta*gallery.activeIndicator.width()*5)+'px'); jQuery(this).css('left',parseInt(jQuery(this).css('left'))-(-delta*gallery.activeIndicator.width()*5)+'px');
event.preventDefault(); event.preventDefault();
}); });
@ -533,7 +533,7 @@ function expose (widget)
{ {
// See if we need to move the indicator // See if we need to move the indicator
var indicator = gallery.container.find('.indicator'); var indicator = gallery.container.find('.indicator');
var current = $j('.active',indicator).position(); var current = jQuery('.active',indicator).position();
if(current) if(current)
{ {

View File

@ -9243,7 +9243,7 @@ jQuery.each([ "Height", "Width" ], function( i, name ) {
// Expose jQuery to the global object // Expose jQuery to the global object
window.jQuery = window.$j = jQuery; window.jQuery = window.jQuery = jQuery;
// Expose jQuery as an AMD module, but only for AMD loaders that // Expose jQuery as an AMD module, but only for AMD loaders that
// understand the issues with loading multiple versions of jQuery // understand the issues with loading multiple versions of jQuery

View File

@ -38,8 +38,8 @@ function widget_browser(list_div, widget_div)
this.et2.widgetContainer.setArrayMgrs(this.et2._createArrayManagers(_data)); this.et2.widgetContainer.setArrayMgrs(this.et2._createArrayManagers(_data));
// Set up UI // Set up UI
this.list_div = $j(list_div); this.list_div = jQuery(list_div);
this.widget_div = $j(widget_div); this.widget_div = jQuery(widget_div);
this.attribute_list = null; this.attribute_list = null;
// Create and popuplate the widget list // Create and popuplate the widget list
@ -58,7 +58,7 @@ widget_browser.prototype._init_list = function()
var self = this; var self = this;
// Create list // Create list
var list = $j(document.createElement('ul')) var list = jQuery(document.createElement('ul'))
.attr('id', 'widgets') .attr('id', 'widgets')
.click(function(e) {self.select_widget(e);}) .click(function(e) {self.select_widget(e);})
.appendTo(this.list_div); .appendTo(this.list_div);
@ -77,14 +77,14 @@ widget_browser.prototype._init_list = function()
} }
// Build attribute table // Build attribute table
attribute_table = $j(document.createElement('table')); attribute_table = jQuery(document.createElement('table'));
attribute_table.append('<thead class = "ui-widget-header"><td>'+egw().lang('Name')+"</td><td>"+egw().lang("Data type") + attribute_table.append('<thead class = "ui-widget-header"><td>'+egw().lang('Name')+"</td><td>"+egw().lang("Data type") +
"</td><td>"+egw().lang("Value") + "</td></thead>"); "</td><td>"+egw().lang("Value") + "</td></thead>");
this.attribute_list = $j(document.createElement('tbody')) this.attribute_list = jQuery(document.createElement('tbody'))
.appendTo(attribute_table); .appendTo(attribute_table);
this.list_div.append( this.list_div.append(
$j(document.createElement('div')) jQuery(document.createElement('div'))
.attr('id', 'widget_attributes') .attr('id', 'widget_attributes')
.append(attribute_table) .append(attribute_table)
); );
@ -130,7 +130,7 @@ widget_browser.prototype.dump_attributes = function(_type)
widget_browser.prototype.select_widget = function(e,f) widget_browser.prototype.select_widget = function(e,f)
{ {
// UI prettyness - clear selected // UI prettyness - clear selected
$j(e.target).parent().children().removeClass("ui-state-active"); jQuery(e.target).parent().children().removeClass("ui-state-active");
// Clear previous widget // Clear previous widget
if(this.widget) if(this.widget)
@ -141,14 +141,14 @@ widget_browser.prototype.select_widget = function(e,f)
} }
// Get the type of widget // Get the type of widget
var type = $j(e.target).text(); var type = jQuery(e.target).text();
if(!type || e.target.nodeName != 'LI') if(!type || e.target.nodeName != 'LI')
{ {
return; return;
} }
// UI prettyness - show item as selected // UI prettyness - show item as selected
$j(e.target).addClass('ui-state-active'); jQuery(e.target).addClass('ui-state-active');
// Widget attributes // Widget attributes
var attrs = {}; var attrs = {};
@ -180,14 +180,14 @@ widget_browser.prototype.select_widget = function(e,f)
widget_browser.prototype.create_attribute = function(name, settings) widget_browser.prototype.create_attribute = function(name, settings)
{ {
var set_function_name = "set_"+name; var set_function_name = "set_"+name;
var row = $j(document.createElement("tr")) var row = jQuery(document.createElement("tr"))
.addClass(typeof this.widget[set_function_name] == 'function' ? 'ui-state-default':'ui-state-disabled') .addClass(typeof this.widget[set_function_name] == 'function' ? 'ui-state-default':'ui-state-disabled')
// Human Name // Human Name
.append($j(document.createElement('td')) .append(jQuery(document.createElement('td'))
.text(settings.name) .text(settings.name)
) )
// Data type // Data type
.append($j(document.createElement('td')) .append(jQuery(document.createElement('td'))
.text(settings.type) .text(settings.type)
); );
// Add attribute name & description as a tooltip // Add attribute name & description as a tooltip
@ -197,7 +197,7 @@ widget_browser.prototype.create_attribute = function(name, settings)
} }
// Value // Value
var value = $j(document.createElement('td')).appendTo(row); var value = jQuery(document.createElement('td')).appendTo(row);
if(row.hasClass('ui-state-disabled')) if(row.hasClass('ui-state-disabled'))
{ {
// No setter - just use text // No setter - just use text
@ -211,14 +211,14 @@ widget_browser.prototype.create_attribute = function(name, settings)
switch(settings.type) switch(settings.type)
{ {
case 'string': case 'string':
input = $j('<input/>') input = jQuery('<input/>')
.change(function(e) { .change(function(e) {
self.widget[set_function_name].apply(self.widget, [$j(e.target).val()]); self.widget[set_function_name].apply(self.widget, [jQuery(e.target).val()]);
}); });
input.val(this.widget.options[name]); input.val(this.widget.options[name]);
break; break;
case 'boolean': case 'boolean':
input = $j('<input type="checkbox"/>') input = jQuery('<input type="checkbox"/>')
.attr("checked", this.widget.options[name]) .attr("checked", this.widget.options[name])
.change(function(e) { .change(function(e) {
self.widget[set_function_name].apply(self.widget, [e.target.checked]); self.widget[set_function_name].apply(self.widget, [e.target.checked]);
@ -253,7 +253,7 @@ widget_browser.prototype._init_dtd = function ()
var self = this; var self = this;
// Create DTD Generator button and bind click handler on it // Create DTD Generator button and bind click handler on it
var dtd_btn = $j(document.createElement('button')) var dtd_btn = jQuery(document.createElement('button'))
.attr({id:'dtd_btn', title:'Generates Document Type Definition (DTD) for all widgets'}) .attr({id:'dtd_btn', title:'Generates Document Type Definition (DTD) for all widgets'})
.click(function(){ .click(function(){
self._dtd_builder(); self._dtd_builder();

View File

@ -40,13 +40,13 @@ var fw_base = (function(){ "use strict"; return Class.extend(
this.activeApp = null; this.activeApp = null;
//Register the resize handler //Register the resize handler
$j(window).resize(function(){window.framework.resizeHandler();}); jQuery(window).resize(function(){window.framework.resizeHandler();});
//Register the global alert handler //Register the global alert handler
window.egw_alertHandler = this.alertHandler; window.egw_alertHandler = this.alertHandler;
//Register the key press handler //Register the key press handler
//$j(document).keypress(this.keyPressHandler); //jQuery(document).keypress(this.keyPressHandler);
//Override the app_window function //Override the app_window function
window.egw_appWindow = this.egw_appWindow; window.egw_appWindow = this.egw_appWindow;
@ -217,8 +217,8 @@ var fw_base = (function(){ "use strict"; return Class.extend(
*/ */
getIFrameHeight: function(_iframe) getIFrameHeight: function(_iframe)
{ {
var $header = $j(this.tabsUi.appHeaderContainer); var $header = jQuery(this.tabsUi.appHeaderContainer);
var height = $j(this.sidemenuDiv).height()-this.tabsUi.appHeaderContainer.outerHeight(); var height = jQuery(this.sidemenuDiv).height()-this.tabsUi.appHeaderContainer.outerHeight();
return height; return height;
}, },
@ -302,7 +302,7 @@ var fw_base = (function(){ "use strict"; return Class.extend(
// Stop ajax loader spinner icon in case there's no data and still is not stopped // Stop ajax loader spinner icon in case there's no data and still is not stopped
if (_data.length <= 0) _app.sidemenuEntry.hideAjaxLoader(); if (_data.length <= 0) _app.sidemenuEntry.hideAjaxLoader();
//Rewrite all form actions if they contain some javascript //Rewrite all form actions if they contain some javascript
var forms = $j('form', contDiv).toArray(); var forms = jQuery('form', contDiv).toArray();
for (var i = 0; i < forms.length; ++i) for (var i = 0; i < forms.length; ++i)
{ {
var form = forms[i]; var form = forms[i];
@ -318,7 +318,7 @@ var fw_base = (function(){ "use strict"; return Class.extend(
_app.sidebox_md5 = _md5; _app.sidebox_md5 = _md5;
//console.log(contJS); //console.log(contJS);
$j(contDiv).append(contJS); jQuery(contDiv).append(contJS);
} }
_app.hasSideboxMenuContent = true; _app.hasSideboxMenuContent = true;
@ -336,7 +336,7 @@ var fw_base = (function(){ "use strict"; return Class.extend(
// reliable init sidebox, as app.js might initialise earlier // reliable init sidebox, as app.js might initialise earlier
if (typeof app[_app.appName] == 'object') if (typeof app[_app.appName] == 'object')
{ {
var sidebox = $j('#favorite_sidebox_'+_app.appName, this.sidemenuDiv); var sidebox = jQuery('#favorite_sidebox_'+_app.appName, this.sidemenuDiv);
var self = this; var self = this;
var currentAppName = _app.appName; var currentAppName = _app.appName;
// make sidebox // make sidebox
@ -982,7 +982,7 @@ var fw_base = (function(){ "use strict"; return Class.extend(
// et2 available, let its widgets prepare // et2 available, let its widgets prepare
var deferred = []; var deferred = [];
var et2_list = []; var et2_list = [];
$j('.et2_container',this.activeApp.tab.contDiv).each(function() { jQuery('.et2_container',this.activeApp.tab.contDiv).each(function() {
var et2 = etemplate2.getById(this.id); var et2 = etemplate2.getById(this.id);
if(et2 && jQuery(et2.DOMContainer).filter(':visible').length) if(et2 && jQuery(et2.DOMContainer).filter(':visible').length)
{ {

View File

@ -51,9 +51,9 @@ var fw_browser = (function(){ "use strict"; return Class.extend(
} }
// Call the resize handler (we have to use the jquery object of the iframe!) // Call the resize handler (we have to use the jquery object of the iframe!)
if (wnd && typeof wnd.$j != "undefined") if (wnd && typeof wnd.jQuery != "undefined")
{ {
wnd.$j(wnd).trigger("resize"); wnd.jQuery(wnd).trigger("resize");
} }
}, },
@ -86,7 +86,7 @@ var fw_browser = (function(){ "use strict"; return Class.extend(
if (_type != this.type) if (_type != this.type)
{ {
//Destroy the iframe and/or the contentDiv //Destroy the iframe and/or the contentDiv
$j(this.baseDiv).empty(); jQuery(this.baseDiv).empty();
this.iframe = null; this.iframe = null;
this.contentDiv = null; this.contentDiv = null;
if(this.loadingDeferred && this.type) if(this.loadingDeferred && this.type)
@ -99,8 +99,8 @@ var fw_browser = (function(){ "use strict"; return Class.extend(
//Create the div for displaying the content //Create the div for displaying the content
case EGW_BROWSER_TYPE_DIV: case EGW_BROWSER_TYPE_DIV:
this.contentDiv = document.createElement('div'); this.contentDiv = document.createElement('div');
$j(this.contentDiv).addClass('egw_fw_content_browser_div'); jQuery(this.contentDiv).addClass('egw_fw_content_browser_div');
$j(this.baseDiv).append(this.contentDiv); jQuery(this.baseDiv).append(this.contentDiv);
break; break;
@ -111,8 +111,8 @@ var fw_browser = (function(){ "use strict"; return Class.extend(
this.iframe.style.borderWidth = 0; this.iframe.style.borderWidth = 0;
this.iframe.frameBorder = 0; this.iframe.frameBorder = 0;
this.iframe.name = 'egw_app_iframe_' + this.app.appName; this.iframe.name = 'egw_app_iframe_' + this.app.appName;
$j(this.iframe).addClass('egw_fw_content_browser_iframe'); jQuery(this.iframe).addClass('egw_fw_content_browser_iframe');
$j(this.baseDiv).append(this.iframe); jQuery(this.baseDiv).append(this.iframe);
break; break;
} }
@ -199,7 +199,7 @@ var fw_browser = (function(){ "use strict"; return Class.extend(
if(typeof etemplate2 == "function") if(typeof etemplate2 == "function")
{ {
// Clear all etemplates on this tab, regardless of application, by using DOM nodes // Clear all etemplates on this tab, regardless of application, by using DOM nodes
$j('.et2_container',this.contentDiv||this.baseDiv).each(function() { jQuery('.et2_container',this.contentDiv||this.baseDiv).each(function() {
var et = etemplate2.getById(this.id); var et = etemplate2.getById(this.id);
if(et !== null) if(et !== null)
{ {
@ -215,7 +215,7 @@ var fw_browser = (function(){ "use strict"; return Class.extend(
{ {
// Clear all etemplates on this tab, regardless of application, by using DOM nodes // Clear all etemplates on this tab, regardless of application, by using DOM nodes
var content = this.iframe.contentWindow; var content = this.iframe.contentWindow;
$j('.et2_container',this.iframe.contentWindow).each(function() { jQuery('.et2_container',this.iframe.contentWindow).each(function() {
var et = content.etemplate2.getById(this.id); var et = content.etemplate2.getById(this.id);
if(et !== null) if(et !== null)
{ {
@ -283,7 +283,7 @@ var fw_browser = (function(){ "use strict"; return Class.extend(
if (this.app.sidemenuEntry) if (this.app.sidemenuEntry)
this.app.sidemenuEntry.showAjaxLoader(); this.app.sidemenuEntry.showAjaxLoader();
this.data = ""; this.data = "";
$j(this.contentDiv).empty(); jQuery(this.contentDiv).empty();
var self_egw = egw(this.app.appName); var self_egw = egw(this.app.appName);
var req = self_egw.json( var req = self_egw.json(
this.app.getMenuaction('ajax_exec'), this.app.getMenuaction('ajax_exec'),
@ -330,11 +330,11 @@ var fw_browser = (function(){ "use strict"; return Class.extend(
egw_seperateJavaScript(content); egw_seperateJavaScript(content);
// Insert the content // Insert the content
$j(this.contentDiv).append(content.html); jQuery(this.contentDiv).append(content.html);
// Run the javascript code // Run the javascript code
//console.log(content.js); //console.log(content.js);
$j(this.contentDiv).append(content.js); jQuery(this.contentDiv).append(content.js);
if(this.loadingDeferred) if(this.loadingDeferred)
{ {

View File

@ -43,11 +43,11 @@
this.setBottomLine(this.parent.entries); this.setBottomLine(this.parent.entries);
//Make the base Div sortable. Set all elements with the style "egw_fw_ui_sidemenu_entry_header" //Make the base Div sortable. Set all elements with the style "egw_fw_ui_sidemenu_entry_header"
//as handle //as handle
if($j(this.elemDiv).data('uiSortable')) if(jQuery(this.elemDiv).data('uiSortable'))
{ {
$j(this.elemDiv).sortable("destroy"); jQuery(this.elemDiv).sortable("destroy");
} }
$j(this.elemDiv).sortable({ jQuery(this.elemDiv).sortable({
handle: ".egw_fw_ui_sidemenu_entry_header", handle: ".egw_fw_ui_sidemenu_entry_header",
distance: 15, distance: 15,
start: function(event, ui) start: function(event, ui)
@ -79,11 +79,11 @@
//If this is the last tab in the tab list, the bottom line must be closed //If this is the last tab in the tab list, the bottom line must be closed
for (var i = 0; i < _entryList.length; i++) for (var i = 0; i < _entryList.length; i++)
{ {
$j(_entryList[i].contentDiv).removeClass("egw_fw_ui_sidemenu_entry_content_bottom"); jQuery(_entryList[i].contentDiv).removeClass("egw_fw_ui_sidemenu_entry_content_bottom");
$j(_entryList[i].headerDiv).removeClass("egw_fw_ui_sidemenu_entry_header_bottom"); jQuery(_entryList[i].headerDiv).removeClass("egw_fw_ui_sidemenu_entry_header_bottom");
} }
$j(this.contentDiv).addClass("egw_fw_ui_sidemenu_entry_content_bottom"); jQuery(this.contentDiv).addClass("egw_fw_ui_sidemenu_entry_content_bottom");
$j(this.headerDiv).addClass("egw_fw_ui_sidemenu_entry_header_bottom"); jQuery(this.headerDiv).addClass("egw_fw_ui_sidemenu_entry_header_bottom");
} }
}); });
@ -106,8 +106,8 @@
{ {
if (this.activeEntry) if (this.activeEntry)
{ {
$j(this.activeEntry.marker).show(); jQuery(this.activeEntry.marker).show();
$j(this.elemDiv).sortable("refresh"); jQuery(this.elemDiv).sortable("refresh");
} }
}, },
@ -119,8 +119,8 @@
{ {
if (this.activeEntry) if (this.activeEntry)
{ {
$j(this.activeEntry.marker).hide(); jQuery(this.activeEntry.marker).hide();
$j(this.elemDiv).sortable("refresh"); jQuery(this.elemDiv).sortable("refresh");
} }
}, },
@ -248,7 +248,7 @@
this.scrollAreaUi.update(); this.scrollAreaUi.update();
// Disable loader, if present // Disable loader, if present
$j('#egw_fw_loading').hide(); jQuery('#egw_fw_loading').hide();
}, },
@ -394,10 +394,10 @@
checkTabOverflow: function() checkTabOverflow: function()
{ {
var width = 0; var width = 0;
var outer_width = $j(this.tabsUi.contHeaderDiv).width(); var outer_width = jQuery(this.tabsUi.contHeaderDiv).width();
var spans = $j(this.tabsUi.contHeaderDiv).children('span'); var spans = jQuery(this.tabsUi.contHeaderDiv).children('span');
spans.css('max-width',''); spans.css('max-width','');
spans.each(function() { width += $j(this).outerWidth(true);}); spans.each(function() { width += jQuery(this).outerWidth(true);});
if(width > outer_width) if(width > outer_width)
{ {
var max_width = Math.floor(outer_width / this.tabsUi.contHeaderDiv.childElementCount) - var max_width = Math.floor(outer_width / this.tabsUi.contHeaderDiv.childElementCount) -

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,4 @@
/* global $j, et2_dialog, Promise, et2_nextmatch, Class, etemplate2, et2_favorites, mailvelope */ /* global jQuery, et2_dialog, Promise, et2_nextmatch, Class, etemplate2, et2_favorites, mailvelope */
/** /**
* EGroupware clientside Application javascript base object * EGroupware clientside Application javascript base object
@ -127,7 +127,7 @@ var AppJS = (function(){ "use strict"; return Class.extend(
if(sidebox.length == 0 && egw_getFramework() != null) if(sidebox.length == 0 && egw_getFramework() != null)
{ {
var egw_fw = egw_getFramework(); var egw_fw = egw_getFramework();
sidebox= $j('#favorite_sidebox_'+this.appname,egw_fw.sidemenuDiv); sidebox= jQuery('#favorite_sidebox_'+this.appname,egw_fw.sidemenuDiv);
} }
// Make sure we're running in the top window when we init sidebox // Make sure we're running in the top window when we init sidebox
if(window.app[this.appname] === this && window.top.app[this.appname] !== this && window.top.app[this.appname]) if(window.app[this.appname] === this && window.top.app[this.appname] !== this && window.top.app[this.appname])
@ -499,7 +499,7 @@ var AppJS = (function(){ "use strict"; return Class.extend(
if (!this.egw.is_popup()) if (!this.egw.is_popup())
{ {
var egw_fw = egw_getFramework(); var egw_fw = egw_getFramework();
var tutorial = $j('#egw_tutorial_'+this.appname+'_sidebox', egw_fw ? egw_fw.sidemenuDiv : document); var tutorial = jQuery('#egw_tutorial_'+this.appname+'_sidebox', egw_fw ? egw_fw.sidemenuDiv : document);
// _init_sidebox gets currently called multiple times, which needs to be fixed // _init_sidebox gets currently called multiple times, which needs to be fixed
if (tutorial.length && !this.tutorial_initialised) if (tutorial.length && !this.tutorial_initialised)
{ {
@ -518,7 +518,7 @@ var AppJS = (function(){ "use strict"; return Class.extend(
.on("click.sidebox","div.ui-icon-trash", this, this.delete_favorite) .on("click.sidebox","div.ui-icon-trash", this, this.delete_favorite)
// need to install a favorite handler, as we switch original one off with .off() // need to install a favorite handler, as we switch original one off with .off()
.on('click.sidebox','li[data-id]', this, function(event) { .on('click.sidebox','li[data-id]', this, function(event) {
var li = $j(this); var li = jQuery(this);
li.siblings().removeClass('ui-state-highlight'); li.siblings().removeClass('ui-state-highlight');
var state = {}; var state = {};
@ -567,7 +567,7 @@ var AppJS = (function(){ "use strict"; return Class.extend(
if(egw_fw && egw_fw.applications[this.appname] && egw_fw.applications[this.appname].browser if(egw_fw && egw_fw.applications[this.appname] && egw_fw.applications[this.appname].browser
&& egw_fw.applications[this.appname].browser.baseDiv) && egw_fw.applications[this.appname].browser.baseDiv)
{ {
$j(egw_fw.applications[this.appname].browser.baseDiv) jQuery(egw_fw.applications[this.appname].browser.baseDiv)
.off('.sidebox') .off('.sidebox')
.on('change.sidebox', function() { .on('change.sidebox', function() {
self.highlight_favorite(); self.highlight_favorite();
@ -632,11 +632,11 @@ var AppJS = (function(){ "use strict"; return Class.extend(
filter_list.push("</ul>"); filter_list.push("</ul>");
}; };
add_to_popup(this.favorite_popup.state); 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( .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() .hide()
.siblings(".ui-icon-circle-plus") .siblings(".ui-icon-circle-plus")
.removeClass("ui-icon-circle-minus"); .removeClass("ui-icon-circle-minus");
@ -690,7 +690,7 @@ var AppJS = (function(){ "use strict"; return Class.extend(
} }
// Create popup // Create popup
this.favorite_popup = $j('<div id="'+this.dom_id + '_nm_favorites_popup" title="' + egw().lang("New favorite") + '">\ this.favorite_popup = jQuery('<div id="'+this.dom_id + '_nm_favorites_popup" title="' + egw().lang("New favorite") + '">\
<form>\ <form>\
<label for="name">'+ <label for="name">'+
this.egw.lang("name") + this.egw.lang("name") +
@ -706,10 +706,10 @@ var AppJS = (function(){ "use strict"; return Class.extend(
// still running under iframe and that gets into conflict with et2 object created for // still running under iframe and that gets into conflict with et2 object created for
// video tutorials in sidebox. // video tutorials in sidebox.
// TODO: this.appname != 'calendar' should be removed after we released new calendar // TODO: this.appname != 'calendar' should be removed after we released new calendar
).appendTo(this.et2 && this.appname != 'calendar' ? this.et2.getDOMNode() : $j('body')); ).appendTo(this.et2 && this.appname != 'calendar' ? this.et2.getDOMNode() : jQuery('body'));
$j(".ui-icon-circle-plus",this.favorite_popup).prev().andSelf().click(function() { jQuery(".ui-icon-circle-plus",this.favorite_popup).prev().andSelf().click(function() {
var details = $j("#"+self.appname+"_favorites_popup_state",self.favorite_popup) var details = jQuery("#"+self.appname+"_favorites_popup_state",self.favorite_popup)
.slideToggle() .slideToggle()
.siblings(".ui-icon-circle-plus") .siblings(".ui-icon-circle-plus")
.toggleClass("ui-icon-circle-minus"); .toggleClass("ui-icon-circle-minus");
@ -740,7 +740,7 @@ var AppJS = (function(){ "use strict"; return Class.extend(
default: true, default: true,
click: function() { click: function() {
// Add a new favorite // Add a new favorite
var name = $j("#name",this); var name = jQuery("#name",this);
if(name.val()) if(name.val())
{ {
@ -781,7 +781,7 @@ var AppJS = (function(){ "use strict"; return Class.extend(
if(self.sidebox) if(self.sidebox)
{ {
// Remove any existing with that name // Remove any existing with that name
$j('[data-id="'+safe_name+'"]',self.sidebox).remove(); jQuery('[data-id="'+safe_name+'"]',self.sidebox).remove();
// Create new item // Create new item
var html = "<li data-id='"+safe_name+"' data-group='" + favorite.group + "' class='ui-menu-item' role='menuitem'>\n"; var html = "<li data-id='"+safe_name+"' data-group='" + favorite.group + "' class='ui-menu-item' role='menuitem'>\n";
@ -791,7 +791,7 @@ var AppJS = (function(){ "use strict"; return Class.extend(
favorite.name; favorite.name;
html += "<div class='ui-icon ui-icon-trash' title='" + egw.lang('Delete') + "'/>"; html += "<div class='ui-icon ui-icon-trash' title='" + egw.lang('Delete') + "'/>";
html += "</a></li>\n"; html += "</a></li>\n";
$j(html).insertBefore($j('li',self.sidebox).last()); jQuery(html).insertBefore(jQuery('li',self.sidebox).last());
self._init_sidebox(self.sidebox); self._init_sidebox(self.sidebox);
} }
@ -801,9 +801,9 @@ var AppJS = (function(){ "use strict"; return Class.extend(
// Reset form // Reset form
delete self.favorite_popup.state; delete self.favorite_popup.state;
name.val(""); name.val("");
$j("#filters",self.favorite_popup).empty(); jQuery("#filters",self.favorite_popup).empty();
$j(this).dialog("close"); jQuery(this).dialog("close");
} }
}; };
buttons[this.egw.lang("cancel")] = function() { buttons[this.egw.lang("cancel")] = function() {
@ -811,7 +811,7 @@ var AppJS = (function(){ "use strict"; return Class.extend(
{ {
self.favorite_popup.group.set_value(null); self.favorite_popup.group.set_value(null);
} }
$j(this).dialog("close"); jQuery(this).dialog("close");
}; };
this.favorite_popup.dialog({ this.favorite_popup.dialog({
@ -830,7 +830,7 @@ var AppJS = (function(){ "use strict"; return Class.extend(
if(e.keyCode == jQuery.ui.keyCode.ENTER && tagName !== 'textarea' && tagName !== 'select' && tagName !=='button') if(e.keyCode == jQuery.ui.keyCode.ENTER && tagName !== 'textarea' && tagName !== 'select' && tagName !=='button')
{ {
e.preventDefault(); e.preventDefault();
$j('button[default]',this.favorite_popup.parent()).trigger('click'); jQuery('button[default]',this.favorite_popup.parent()).trigger('click');
return false; return false;
} }
},this)); },this));
@ -850,9 +850,9 @@ var AppJS = (function(){ "use strict"; return Class.extend(
event.stopImmediatePropagation(); event.stopImmediatePropagation();
var app = event.data; var app = event.data;
var id = $j(this).parentsUntil('li').parent().attr("data-id"); var id = jQuery(this).parentsUntil('li').parent().attr("data-id");
var group = $j(this).parentsUntil('li').parent().attr("data-group") || ''; var group = jQuery(this).parentsUntil('li').parent().attr("data-group") || '';
var line = $j('li[data-id="'+id+'"]',app.sidebox); var line = jQuery('li[data-id="'+id+'"]',app.sidebox);
var name = line.first().text(); var name = line.first().text();
var trash = this; var trash = this;
line.addClass('loading'); line.addClass('loading');
@ -867,7 +867,7 @@ var AppJS = (function(){ "use strict"; return Class.extend(
} }
// Hide the trash // Hide the trash
$j(trash).hide(); jQuery(trash).hide();
// Delete preference server side // Delete preference server side
var request = egw.json("EGroupware\\Api\\Framework::ajax_set_favorite", var request = egw.json("EGroupware\\Api\\Framework::ajax_set_favorite",
@ -889,9 +889,9 @@ var AppJS = (function(){ "use strict"; return Class.extend(
line.removeClass('loading').addClass('ui-state-error'); line.removeClass('loading').addClass('ui-state-error');
} }
}, },
$j(trash).parentsUntil("li").parent(), jQuery(trash).parentsUntil("li").parent(),
true, true,
$j(trash).parentsUntil("li").parent() jQuery(trash).parentsUntil("li").parent()
); );
request.sendRequest(true); request.sendRequest(true);
}; };
@ -915,9 +915,9 @@ var AppJS = (function(){ "use strict"; return Class.extend(
var best_count = 0; var best_count = 0;
var self = this; var self = this;
$j('li[data-id]',this.sidebox).removeClass('ui-state-highlight'); jQuery('li[data-id]',this.sidebox).removeClass('ui-state-highlight');
$j('li[data-id]',this.sidebox).each(function(i,href) { jQuery('li[data-id]',this.sidebox).each(function(i,href) {
var favorite = {}; var favorite = {};
if(this.dataset.id && egw.preference('favorite_'+this.dataset.id,self.appname)) if(this.dataset.id && egw.preference('favorite_'+this.dataset.id,self.appname))
{ {
@ -1005,7 +1005,7 @@ var AppJS = (function(){ "use strict"; return Class.extend(
}); });
if(best_match) if(best_match)
{ {
$j('li[data-id="'+best_match+'"]',this.sidebox).addClass('ui-state-highlight'); jQuery('li[data-id="'+best_match+'"]',this.sidebox).addClass('ui-state-highlight');
} }
}, },

View File

@ -203,8 +203,8 @@
if(typeof console != "undefined" && console.timeEnd) console.timeEnd("egw"); if(typeof console != "undefined" && console.timeEnd) console.timeEnd("egw");
var end_time = (new Date).getTime(); var end_time = (new Date).getTime();
var gen_time_div = $j('#divGenTime_'+window.egw_appName); var gen_time_div = jQuery('#divGenTime_'+window.egw_appName);
if (!gen_time_div.length) gen_time_div = $j('.pageGenTime'); if (!gen_time_div.length) gen_time_div = jQuery('.pageGenTime');
gen_time_div.append('<span class="asyncIncludeTime">'+egw.lang('async includes took %1s', (end_time-start_time)/1000)+'</span>'); gen_time_div.append('<span class="asyncIncludeTime">'+egw.lang('async includes took %1s', (end_time-start_time)/1000)+'</span>');
// Make sure opener knows when we close - start a heartbeat // Make sure opener knows when we close - start a heartbeat
@ -233,8 +233,8 @@
var resize_attempt = 0; var resize_attempt = 0;
var resize_popup = function() var resize_popup = function()
{ {
var $main_div = $j('#popupMainDiv'); var $main_div = jQuery('#popupMainDiv');
var $et2 = $j('.et2_container'); var $et2 = jQuery('.et2_container');
var w = { var w = {
width: egw_getWindowInnerWidth(), width: egw_getWindowInnerWidth(),
height: egw_getWindowInnerHeight() height: egw_getWindowInnerHeight()
@ -277,9 +277,9 @@
}; };
// rest needs DOM to be ready // rest needs DOM to be ready
$j(function() { jQuery(function() {
// load etemplate2 template(s) // load etemplate2 template(s)
$j('form.et2_container[data-etemplate]').each(function(index, node){ jQuery('form.et2_container[data-etemplate]').each(function(index, node){
var data = JSON.parse(node.getAttribute('data-etemplate')) || {}; var data = JSON.parse(node.getAttribute('data-etemplate')) || {};
var currentapp = data.data.currentapp || window.egw_appName; var currentapp = data.data.currentapp || window.egw_appName;
if(popup || window.opener && !egwIsMobile()) if(popup || window.opener && !egwIsMobile())

View File

@ -390,22 +390,22 @@ egw.extend('debug', egw.MODULE_GLOBAL, function(_app, _wnd)
if(window.jQuery && window.jQuery.ui.dialog) if(window.jQuery && window.jQuery.ui.dialog)
{ {
var $wrapper = $j(wrapper); var $wrapper = jQuery(wrapper);
// Start hidden // Start hidden
$j('tr',$wrapper).addClass('hidden') jQuery('tr',$wrapper).addClass('hidden')
.on('click', function() { .on('click', function() {
$j(this).toggleClass('hidden',{}); jQuery(this).toggleClass('hidden',{});
$j(this).find('.stack').children().toggleClass('ui-icon ui-icon-circle-plus'); jQuery(this).find('.stack').children().toggleClass('ui-icon ui-icon-circle-plus');
}); });
// Wrap in div so we can control height // Wrap in div so we can control height
$j('td',$wrapper).wrapInner('<div/>') jQuery('td',$wrapper).wrapInner('<div/>')
.filter('.stack').children().addClass('ui-icon ui-icon-circle-plus'); .filter('.stack').children().addClass('ui-icon ui-icon-circle-plus');
$wrapper.dialog({ $wrapper.dialog({
title: egw.lang('Error log'), title: egw.lang('Error log'),
buttons: [ buttons: [
{text: egw.lang('OK'), click: function() {$j(this).dialog( "close" ); }}, {text: egw.lang('OK'), click: function() {jQuery(this).dialog( "close" ); }},
{text: egw.lang('clear'), click: function() {clear_client_log(); $j(this).empty();}} {text: egw.lang('clear'), click: function() {clear_client_log(); jQuery(this).empty();}}
], ],
width: 800, width: 800,
height: 400 height: 400

View File

@ -36,11 +36,11 @@ egw.extend('jquery', egw.MODULE_WND_LOCAL, function(_app, _wnd)
this.webserverUrl + '/api/js/jquery/jquery-ui.js', this.webserverUrl + '/api/js/jquery/jquery-ui.js',
this.webserverUrl + '/api/js/jquery/jquery.html5_upload.js' this.webserverUrl + '/api/js/jquery/jquery.html5_upload.js'
], function () { ], function () {
this.constant('jquery', '$j', _wnd.$j, _wnd); this.constant('jquery', 'jQuery', _wnd.jQuery, _wnd);
ready.readyDone(token); ready.readyDone(token);
}, this); }, this);
return { return {
'$j': null 'jQuery': null
}; };
}); });

View File

@ -118,7 +118,7 @@ egw.extend('json', egw.MODULE_WND_LOCAL, function(_app, _wnd)
// Send the request via AJAX using the jquery ajax function // Send the request via AJAX using the jquery ajax function
// we need to use jQuery of window of egw object, as otherwise the one from main window is used! // we need to use jQuery of window of egw object, as otherwise the one from main window is used!
// (causing eg. apply from server with app.$app.method to run in main window instead of popup) // (causing eg. apply from server with app.$app.method to run in main window instead of popup)
this.request = (this.egw.window?this.egw.window.$j:$j).ajax({ this.request = (this.egw.window?this.egw.window.jQuery:jQuery).ajax({
url: this.url, url: this.url,
async: this.async, async: this.async,
context: this, context: this,
@ -163,8 +163,8 @@ egw.extend('json', egw.MODULE_WND_LOCAL, function(_app, _wnd)
this.egw.includeJS(js_files, function() { this.egw.includeJS(js_files, function() {
var end_time = (new Date).getTime(); var end_time = (new Date).getTime();
this.handleResponse(data); this.handleResponse(data);
var gen_time_div = $j('#divGenTime_'+this.egw.appname); var gen_time_div = jQuery('#divGenTime_'+this.egw.appname);
if (!gen_time_div.length) gen_time_div = $j('.pageGenTime'); if (!gen_time_div.length) gen_time_div = jQuery('.pageGenTime');
gen_time_div.append('<span class="asyncIncludeTime">'+egw.lang('async includes took %1s', (end_time-start_time)/1000)+'</span>'); gen_time_div.append('<span class="asyncIncludeTime">'+egw.lang('async includes took %1s', (end_time-start_time)/1000)+'</span>');
}, this); }, this);
return; return;
@ -434,7 +434,7 @@ egw.extend('json', egw.MODULE_WND_LOCAL, function(_app, _wnd)
{ {
try try
{ {
var jQueryObject = $j(res.data.select, req.context); var jQueryObject = jQuery(res.data.select, req.context);
jQueryObject[res.data.func].apply(jQueryObject, res.data.parms); jQueryObject[res.data.func].apply(jQueryObject, res.data.parms);
} }
catch (e) catch (e)

View File

@ -296,7 +296,7 @@ egw.extend('links', egw.MODULE_GLOBAL, function()
var othervars = url_othervars[1]; var othervars = url_othervars[1];
if (_extravars && typeof _extravars == 'object') if (_extravars && typeof _extravars == 'object')
{ {
$j.extend(vars, _extravars); jQuery.extend(vars, _extravars);
_extravars = othervars; _extravars = othervars;
} }
else else

View File

@ -121,7 +121,7 @@ egw.extend('message', egw.MODULE_WND_LOCAL, function(_app, _wnd)
egw.setLocalStorageItem(egw.app_name(),'discardedMsgs',JSON.stringify(discarded)); egw.setLocalStorageItem(egw.app_name(),'discardedMsgs',JSON.stringify(discarded));
} }
} }
$j(this).remove(); jQuery(this).remove();
}) })
.css('position', 'absolute'); .css('position', 'absolute');

View File

@ -113,16 +113,16 @@ egw.extend('open', egw.MODULE_WND_LOCAL, function(_egw, _wnd)
else if(compose.length > 1) else if(compose.length > 1)
{ {
// Need to prompt // Need to prompt
var prompt = $j(document.createElement('ul')); var prompt = jQuery(document.createElement('ul'));
for(var i = 0; i < compose.length; i++) for(var i = 0; i < compose.length; i++)
{ {
var w = window.open('',compose[i],'100x100'); var w = window.open('',compose[i],'100x100');
if(w.closed) continue; if(w.closed) continue;
w.blur(); w.blur();
var title = w.document.title || egw.lang("compose"); var title = w.document.title || egw.lang("compose");
$j("<li data-window = '" + compose[i] + "'>"+ title + "</li>") jQuery("<li data-window = '" + compose[i] + "'>"+ title + "</li>")
.click(function() { .click(function() {
var w = egw.open_link('',$j(this).attr("data-window"),'100x100','mail'); var w = egw.open_link('',jQuery(this).attr("data-window"),'100x100','mail');
w.app.mail.setCompose(w.name, content); w.app.mail.setCompose(w.name, content);
prompt.dialog("close"); prompt.dialog("close");
}) })
@ -133,7 +133,7 @@ egw.extend('open', egw.MODULE_WND_LOCAL, function(_egw, _wnd)
}, 200); }, 200);
var _buttons = {}; var _buttons = {};
_buttons[egw.lang("cancel")] = function() { _buttons[egw.lang("cancel")] = function() {
$j(this).dialog("close"); jQuery(this).dialog("close");
}; };
prompt.dialog({ prompt.dialog({
buttons: _buttons buttons: _buttons
@ -264,7 +264,7 @@ egw.extend('open', egw.MODULE_WND_LOCAL, function(_egw, _wnd)
} }
else if (typeof extra == 'object') else if (typeof extra == 'object')
{ {
$j.extend(params, extra); jQuery.extend(params, extra);
} }
popup = app_registry[type+'_popup']; popup = app_registry[type+'_popup'];
} }
@ -515,7 +515,7 @@ egw.extend('open', egw.MODULE_WND_LOCAL, function(_egw, _wnd)
// Add protocol handler as an option if mail handling is not forced so mail can handle mailto: // Add protocol handler as an option if mail handling is not forced so mail can handle mailto:
/* Not working consistantly yet /* Not working consistantly yet
$j(function() { jQuery(function() {
try { try {
if(egw.user('apps').mail && (egw.preference('force_mailto','addressbook')||true) != '0') if(egw.user('apps').mail && (egw.preference('force_mailto','addressbook')||true) != '0')
{ {

View File

@ -118,8 +118,8 @@ egw.extend('preferences', egw.MODULE_GLOBAL, function()
var current_app = this.app_name(); var current_app = this.app_name();
var query = {current_app: current_app}; var query = {current_app: current_app};
// give warning, if app does not support given type, but all apps link to common prefs, if they dont support prefs themselfs // give warning, if app does not support given type, but all apps link to common prefs, if they dont support prefs themselfs
if ($j.isArray(apps) && $j.inArray(current_app, apps) == -1 && (name != 'prefs' && name != 'acl') || if (jQuery.isArray(apps) && jQuery.inArray(current_app, apps) == -1 && (name != 'prefs' && name != 'acl') ||
!$j.isArray(apps) && (typeof apps[current_app] == 'undefined' || !apps[current_app])) !jQuery.isArray(apps) && (typeof apps[current_app] == 'undefined' || !apps[current_app]))
{ {
egw_message(egw.lang('Not supported by current application!'), 'warning'); egw_message(egw.lang('Not supported by current application!'), 'warning');
} }
@ -130,13 +130,13 @@ egw.extend('preferences', egw.MODULE_GLOBAL, function()
{ {
case 'prefs': case 'prefs':
query.menuaction ='preferences.preferences_settings.index'; query.menuaction ='preferences.preferences_settings.index';
if ($j.inArray(current_app, apps) != -1) query.appname=current_app; if (jQuery.inArray(current_app, apps) != -1) query.appname=current_app;
egw.open_link(egw.link(url, query), '_blank', '900x450'); egw.open_link(egw.link(url, query), '_blank', '900x450');
break; break;
case 'acl': case 'acl':
query.menuaction='preferences.preferences_acl.index'; query.menuaction='preferences.preferences_acl.index';
if ($j.inArray(current_app, apps) != -1) query.acl_app=current_app; if (jQuery.inArray(current_app, apps) != -1) query.acl_app=current_app;
egw.open_link(egw.link(url, query), '_blank', '900x450'); egw.open_link(egw.link(url, query), '_blank', '900x450');
break; break;

View File

@ -18,7 +18,7 @@ jQuery(function()
var that = this; var that = this;
var log_tail_start=0; var log_tail_start=0;
var filename = $j('pre[id^="log"]'); var filename = jQuery('pre[id^="log"]');
if (typeof filename !='undefined' && filename.length > 0) if (typeof filename !='undefined' && filename.length > 0)
{ {
filename = filename.attr('data-filename'); filename = filename.attr('data-filename');
@ -30,7 +30,7 @@ jQuery(function()
egw.json("api.EGroupware\\Api\\Json\\Tail.ajax_delete",[filename,buttonId=="empty_log"]) egw.json("api.EGroupware\\Api\\Json\\Tail.ajax_delete",[filename,buttonId=="empty_log"])
.sendRequest(true); .sendRequest(true);
} }
$j("#log").text(""); jQuery("#log").text("");
} }
function refresh_log() function refresh_log()
{ {
@ -38,33 +38,33 @@ jQuery(function()
{ {
if (_data.length) { if (_data.length) {
log_tail_start = _data.next; log_tail_start = _data.next;
var log = $j("#log").append(_data.content.replace(/</g,"&lt;")); var log = jQuery("#log").append(_data.content.replace(/</g,"&lt;"));
log.animate({ scrollTop: log.prop("scrollHeight") - log.height() + 20 }, 500); log.animate({ scrollTop: log.prop("scrollHeight") - log.height() + 20 }, 500);
} }
if (_data.size === false) if (_data.size === false)
{ {
$j("#download_log").hide(); jQuery("#download_log").hide();
} }
else else
{ {
$j("#download_log").show().attr("title",this.egw.lang('Size')+_data.size); jQuery("#download_log").show().attr("title",this.egw.lang('Size')+_data.size);
} }
if (_data.writable === false) if (_data.writable === false)
{ {
$j("#purge_log").hide(); jQuery("#purge_log").hide();
$j("#empty_log").hide(); jQuery("#empty_log").hide();
} }
else else
{ {
$j("#purge_log").show(); jQuery("#purge_log").show();
$j("#empty_log").show(); jQuery("#empty_log").show();
} }
window.setTimeout(refresh_log,_data.length?200:2000); window.setTimeout(refresh_log,_data.length?200:2000);
}).sendRequest(true); }).sendRequest(true);
} }
function resize_log() function resize_log()
{ {
$j("#log").width(egw_getWindowInnerWidth()-20).height(egw_getWindowInnerHeight()-33); jQuery("#log").width(egw_getWindowInnerWidth()-20).height(egw_getWindowInnerHeight()-33);
} }
jQuery('input[id^="clear_log"]').on('click',function(){ jQuery('input[id^="clear_log"]').on('click',function(){
button_log(this.getAttribute('id')); button_log(this.getAttribute('id'));
@ -76,7 +76,7 @@ jQuery(function()
button_log(this.getAttribute('id')); button_log(this.getAttribute('id'));
}); });
egw_LAB.wait(function() { egw_LAB.wait(function() {
$j(document).ready(function() jQuery(document).ready(function()
{ {
if (typeof filename !='undefined' && filename.length > 0) if (typeof filename !='undefined' && filename.length > 0)
{ {
@ -84,6 +84,6 @@ jQuery(function()
refresh_log(); refresh_log();
} }
}); });
$j(window).resize(resize_log); jQuery(window).resize(resize_log);
}); });
}); });

View File

@ -63,8 +63,8 @@ egw.extend('tooltip', egw.MODULE_WND_LOCAL, function(_app, _wnd)
}; };
//Calculate how much space is left on each side of the rectangle //Calculate how much space is left on each side of the rectangle
var window_width = $j(_wnd.document).width(); var window_width = jQuery(_wnd.document).width();
var window_height = $j(_wnd.document).height(); var window_height = jQuery(_wnd.document).height();
var space_left = { var space_left = {
left: (cursor_rect.left), left: (cursor_rect.left),
top: (cursor_rect.top), top: (cursor_rect.top),
@ -113,11 +113,11 @@ egw.extend('tooltip', egw.MODULE_WND_LOCAL, function(_app, _wnd)
hide(); hide();
//Generate the tooltip div, set it's text and append it to the body tag //Generate the tooltip div, set it's text and append it to the body tag
tooltip_div = $j(_wnd.document.createElement('div')); tooltip_div = jQuery(_wnd.document.createElement('div'));
tooltip_div.hide(); tooltip_div.hide();
tooltip_div.append(_html); tooltip_div.append(_html);
tooltip_div.addClass("egw_tooltip"); tooltip_div.addClass("egw_tooltip");
$j(_wnd.document.body).append(tooltip_div); jQuery(_wnd.document.body).append(tooltip_div);
//The tooltip should automatically hide when the mouse comes over it //The tooltip should automatically hide when the mouse comes over it
tooltip_div.mouseenter(function() { tooltip_div.mouseenter(function() {

View File

@ -217,7 +217,7 @@ egw.extend('utils', egw.MODULE_GLOBAL, function()
* @see http://www.foliotek.com/devblog/getting-the-width-of-a-hidden-element-with-jquery-using-width/ * @see http://www.foliotek.com/devblog/getting-the-width-of-a-hidden-element-with-jquery-using-width/
*/ */
getHiddenDimensions: function(element, boolOuter) { getHiddenDimensions: function(element, boolOuter) {
var $item = $j(element); var $item = jQuery(element);
var props = { position: "absolute", visibility: "hidden", display: "block" }; var props = { position: "absolute", visibility: "hidden", display: "block" };
var dim = { "w":0, "h":0 , "left":0, "top":0}; var dim = { "w":0, "h":0 , "left":0, "top":0};
var $hiddenParents = $item.parents().andSelf().not(":visible"); var $hiddenParents = $item.parents().andSelf().not(":visible");
@ -228,7 +228,7 @@ egw.extend('utils', egw.MODULE_GLOBAL, function()
for ( var name in props ) { for ( var name in props ) {
old[ name ] = this.style[ name ]; old[ name ] = this.style[ name ];
} }
$j(this).show(); jQuery(this).show();
oldProps.push(old); oldProps.push(old);
}); });

View File

@ -756,8 +756,8 @@ function addOption(id,label,value,do_onchange)
/** /**
* Install click handlers for popup and multiple triggers of uiaccountselection * Install click handlers for popup and multiple triggers of uiaccountselection
*/ */
$j(function(){ jQuery(function(){
$j(document).on('click', '.uiaccountselection_trigger',function(){ jQuery(document).on('click', '.uiaccountselection_trigger',function(){
var selectBox = document.getElementById(this.id.replace(/(_multiple|_popup)$/, '')); var selectBox = document.getElementById(this.id.replace(/(_multiple|_popup)$/, ''));
if (selectBox) if (selectBox)
{ {
@ -773,7 +773,7 @@ $j(function(){
selectBox.multiple = true; selectBox.multiple = true;
if (selectBox.options[0].value=='') selectBox.options[0] = null; if (selectBox.options[0].value=='') selectBox.options[0] = null;
if (!$j(selectBox).hasClass('groupmembers') && !$j(selectBox).hasClass('selectbox')) // no popup! if (!jQuery(selectBox).hasClass('groupmembers') && !jQuery(selectBox).hasClass('selectbox')) // no popup!
{ {
this.src = egw.image('search'); this.src = egw.image('search');
this.title = egw.lang('Search accounts'); this.title = egw.lang('Search accounts');
@ -786,7 +786,7 @@ $j(function(){
} }
} }
}); });
$j(document).on('change', 'select.uiaccountselection',function(e){ jQuery(document).on('change', 'select.uiaccountselection',function(e){
if (this.value == 'popup') if (this.value == 'popup')
{ {
var link = this.getAttribute('data-popup-link'); var link = this.getAttribute('data-popup-link');

View File

@ -13,31 +13,31 @@ if (top !== window) top.location = window.location;
egw_LAB.wait(function() egw_LAB.wait(function()
{ {
$j(document).ready(function() jQuery(document).ready(function()
{ {
// lock the device orientation in portrait view // lock the device orientation in portrait view
if (screen.orientation) screen.orientation.lock('portrait'); if (screen.orientation) screen.orientation.lock('portrait');
function do_social(_data) function do_social(_data)
{ {
var isPixelegg = $j('link[href*="pixelegg.css"]')[0]; var isPixelegg = jQuery('link[href*="pixelegg.css"]')[0];
var social = $j(document.createElement('div')) var social = jQuery(document.createElement('div'))
.attr({ .attr({
id: "socialMedia", id: "socialMedia",
class: "socialMedia" class: "socialMedia"
}) })
.appendTo($j( isPixelegg? 'form' : '#socialBox')); .appendTo(jQuery( isPixelegg? 'form' : '#socialBox'));
for(var i=0; i < _data.length; ++i) for(var i=0; i < _data.length; ++i)
{ {
var data = _data[i]; var data = _data[i];
var url = (data.lang ? data.lang[$j('meta[name="language"]').attr('content')] : null) || data.url; var url = (data.lang ? data.lang[jQuery('meta[name="language"]').attr('content')] : null) || data.url;
$j(document.createElement('a')).attr({ jQuery(document.createElement('a')).attr({
href: url, href: url,
target: '_blank' target: '_blank'
}) })
.appendTo(social) .appendTo(social)
.append($j(document.createElement('img')) .append(jQuery(document.createElement('img'))
.attr('src', data.svg)); .attr('src', data.svg));
} }
} }

View File

@ -130,7 +130,7 @@ app.classes.calendar = (function(){ "use strict"; return AppJS.extend(
if(this.sidebox_et2) if(this.sidebox_et2)
{ {
var date = this.sidebox_et2.getWidgetById('date'); var date = this.sidebox_et2.getWidgetById('date');
$j(window).off('resize.calendar'+date.dom_id); jQuery(window).off('resize.calendar'+date.dom_id);
} }
this.sidebox_hooked_templates = null; this.sidebox_hooked_templates = null;
@ -170,7 +170,7 @@ app.classes.calendar = (function(){ "use strict"; return AppJS.extend(
if(sidebox.length == 0 && egw_getFramework() != null) if(sidebox.length == 0 && egw_getFramework() != null)
{ {
var egw_fw = egw_getFramework(); var egw_fw = egw_getFramework();
sidebox= $j('#favorite_sidebox_'+this.appname,egw_fw.sidemenuDiv); sidebox= jQuery('#favorite_sidebox_'+this.appname,egw_fw.sidemenuDiv);
} }
var content = this.et2.getArrayMgr('content'); var content = this.et2.getArrayMgr('content');
@ -180,7 +180,7 @@ app.classes.calendar = (function(){ "use strict"; return AppJS.extend(
case 'calendar.sidebox': case 'calendar.sidebox':
this.sidebox_et2 = _et2.widgetContainer; this.sidebox_et2 = _et2.widgetContainer;
this.sidebox_hooked_templates.push(this.sidebox_et2); this.sidebox_hooked_templates.push(this.sidebox_et2);
$j(_et2.DOMContainer).hide(); jQuery(_et2.DOMContainer).hide();
// Set client side holiday cache for this year // Set client side holiday cache for this year
egw.window.et2_calendar_view.holiday_cache[content.data.year] = content.data.holidays; egw.window.et2_calendar_view.holiday_cache[content.data.year] = content.data.holidays;
@ -376,7 +376,7 @@ app.classes.calendar = (function(){ "use strict"; return AppJS.extend(
} }
q.menuaction = 'calendar.calendar_uiviews.index'; q.menuaction = 'calendar.calendar_uiviews.index';
this.sidebox_et2.getWidgetById('iframe').set_src(egw.link('/index.php',q)); this.sidebox_et2.getWidgetById('iframe').set_src(egw.link('/index.php',q));
$j(this.sidebox_et2.parentNode).show(); jQuery(this.sidebox_et2.parentNode).show();
return true; return true;
} }
// Known AJAX view // Known AJAX view
@ -404,13 +404,13 @@ app.classes.calendar = (function(){ "use strict"; return AppJS.extend(
var iframe = this.sidebox_et2.getWidgetById('iframe'); var iframe = this.sidebox_et2.getWidgetById('iframe');
if(!iframe) return false; if(!iframe) return false;
iframe.set_src(_url); iframe.set_src(_url);
$j(this.sidebox_et2.parentNode).show(); jQuery(this.sidebox_et2.parentNode).show();
// Hide other views // Hide other views
for(var _view in app.classes.calendar.views) for(var _view in app.classes.calendar.views)
{ {
for(var i = 0; i < app.classes.calendar.views[_view].etemplates.length; i++) for(var i = 0; i < app.classes.calendar.views[_view].etemplates.length; i++)
{ {
$j(app.classes.calendar.views[_view].etemplates[i].DOMContainer).hide(); jQuery(app.classes.calendar.views[_view].etemplates[i].DOMContainer).hide();
} }
} }
this.state.view = ''; this.state.view = '';
@ -524,7 +524,7 @@ app.classes.calendar = (function(){ "use strict"; return AppJS.extend(
}, },
start: function (event, ui) start: function (event, ui)
{ {
$j('.calendar_calTimeGrid',ui.helper).css('position', 'absolute'); jQuery('.calendar_calTimeGrid',ui.helper).css('position', 'absolute');
// Put owners into row IDs // Put owners into row IDs
app.classes.calendar.views[app.calendar.state.view].etemplates[0].widgetContainer.iterateOver(function(widget) { app.classes.calendar.views[app.calendar.state.view].etemplates[0].widgetContainer.iterateOver(function(widget) {
if(widget.options.owner && !widget.disabled) if(widget.options.owner && !widget.disabled)
@ -606,7 +606,7 @@ app.classes.calendar = (function(){ "use strict"; return AppJS.extend(
handle: '> div:first', handle: '> div:first',
helper: function(event, element) { helper: function(event, element) {
var scroll = element.parentsUntil('.calendar_calTimeGrid').last().next(); var scroll = element.parentsUntil('.calendar_calTimeGrid').last().next();
var helper = $j(document.createElement('div')) var helper = jQuery(document.createElement('div'))
.append(element.clone()) .append(element.clone())
.css('height',scroll.parent().css('height')) .css('height',scroll.parent().css('height'))
.css('background-color','white') .css('background-color','white')
@ -650,7 +650,7 @@ app.classes.calendar = (function(){ "use strict"; return AppJS.extend(
if(app.calendar._scroll_disabled) return; if(app.calendar._scroll_disabled) return;
// Find the template // Find the template
var id = $j(this).closest('.et2_container').attr('id'); var id = jQuery(this).closest('.et2_container').attr('id');
if(id) if(id)
{ {
var template = etemplate2.getById(id); var template = etemplate2.getById(id);
@ -679,12 +679,12 @@ app.classes.calendar = (function(){ "use strict"; return AppJS.extend(
/* Disabled /* Disabled
* *
// We clone the nodes so we can animate the transition // We clone the nodes so we can animate the transition
var original = $j(widget.getDOMNode()).closest('.et2_grid'); var original = jQuery(widget.getDOMNode()).closest('.et2_grid');
var cloned = original.clone(true).attr("id","CLONE"); var cloned = original.clone(true).attr("id","CLONE");
// Moving this stuff around scrolls things around too // Moving this stuff around scrolls things around too
// We need this later // We need this later
var scrollTop = $j('.calendar_calTimeGridScroll',original).scrollTop(); var scrollTop = jQuery('.calendar_calTimeGridScroll',original).scrollTop();
// This is to hide the scrollbar // This is to hide the scrollbar
var wrapper = original.parent(); var wrapper = original.parent();
@ -704,7 +704,7 @@ app.classes.calendar = (function(){ "use strict"; return AppJS.extend(
wrapper.width(direction == "left" || direction == "right" ? 2 * original.outerWidth() : original.outerWidth()); wrapper.width(direction == "left" || direction == "right" ? 2 * original.outerWidth() : original.outerWidth());
// Re-scroll to previous to avoid "jumping" // Re-scroll to previous to avoid "jumping"
$j('.calendar_calTimeGridScroll',original).scrollTop(scrollTop); jQuery('.calendar_calTimeGridScroll',original).scrollTop(scrollTop);
switch(direction) switch(direction)
{ {
case "up": case "up":
@ -735,7 +735,7 @@ app.classes.calendar = (function(){ "use strict"; return AppJS.extend(
break; break;
} }
// Scroll clone to match to avoid "jumping" // Scroll clone to match to avoid "jumping"
$j('.calendar_calTimeGridScroll',cloned).scrollTop(scrollTop); jQuery('.calendar_calTimeGridScroll',cloned).scrollTop(scrollTop);
// Remove // Remove
var remove = function() { var remove = function() {
@ -824,7 +824,7 @@ app.classes.calendar = (function(){ "use strict"; return AppJS.extend(
var at_bottom = direction !== -1; var at_bottom = direction !== -1;
var at_top = direction !== 1; var at_top = direction !== 1;
$j(this).children(":not(.calendar_calGridHeader)").each(function() { jQuery(this).children(":not(.calendar_calGridHeader)").each(function() {
// Check for less than 2px from edge, as sometimes we can't scroll anymore, but still have // Check for less than 2px from edge, as sometimes we can't scroll anymore, but still have
// 2px left to go // 2px left to go
at_bottom = at_bottom && Math.abs(this.scrollTop - (this.scrollHeight - this.offsetHeight)) <= 2; at_bottom = at_bottom && Math.abs(this.scrollTop - (this.scrollHeight - this.offsetHeight)) <= 2;
@ -853,7 +853,7 @@ app.classes.calendar = (function(){ "use strict"; return AppJS.extend(
var at_bottom = direction !== -1; var at_bottom = direction !== -1;
var at_top = direction !== 1; var at_top = direction !== 1;
$j(this).children(":not(.calendar_calGridHeader)").each(function() { jQuery(this).children(":not(.calendar_calGridHeader)").each(function() {
// Check for less than 2px from edge, as sometimes we can't scroll anymore, but still have // Check for less than 2px from edge, as sometimes we can't scroll anymore, but still have
// 2px left to go // 2px left to go
at_bottom = at_bottom && Math.abs(this.scrollTop - (this.scrollHeight - this.offsetHeight)) <= 2; at_bottom = at_bottom && Math.abs(this.scrollTop - (this.scrollHeight - this.offsetHeight)) <= 2;
@ -866,7 +866,7 @@ app.classes.calendar = (function(){ "use strict"; return AppJS.extend(
// But we animate in the opposite direction to the swipe // But we animate in the opposite direction to the swipe
var opposite = {"down": "up", "up": "down", "left": "right", "right": "left"}; var opposite = {"down": "up", "up": "down", "left": "right", "right": "left"};
direction = opposite[direction]; direction = opposite[direction];
scroll_animate.call($j(event.target).closest('.calendar_calTimeGrid, .calendar_plannerWidget')[0], direction, delta) scroll_animate.call(jQuery(event.target).closest('.calendar_calTimeGrid, .calendar_plannerWidget')[0], direction, delta)
return false; return false;
}, },
allowPageScroll: jQuery.fn.swipe.pageScroll.VERTICAL, allowPageScroll: jQuery.fn.swipe.pageScroll.VERTICAL,
@ -1072,7 +1072,7 @@ app.classes.calendar = (function(){ "use strict"; return AppJS.extend(
this.et2._inst.submit(); this.et2._inst.submit();
break; break;
case 'infolog': case 'infolog':
this.egw.open_link('infolog.infolog_ui.edit&action=calendar&action_id='+($j.isPlainObject(event)?event['id']:event),'_blank','700x600','infolog'); this.egw.open_link('infolog.infolog_ui.edit&action=calendar&action_id='+(jQuery.isPlainObject(event)?event['id']:event),'_blank','700x600','infolog');
this.et2._inst.submit(); this.et2._inst.submit();
break; break;
case 'ical': case 'ical':
@ -1873,14 +1873,14 @@ app.classes.calendar = (function(){ "use strict"; return AppJS.extend(
if(typeof app.classes.calendar.views[_view].etemplates[i] !== 'string' && if(typeof app.classes.calendar.views[_view].etemplates[i] !== 'string' &&
view.etemplates.indexOf(app.classes.calendar.views[_view].etemplates[i]) == -1) view.etemplates.indexOf(app.classes.calendar.views[_view].etemplates[i]) == -1)
{ {
$j(app.classes.calendar.views[_view].etemplates[i].DOMContainer).hide(); jQuery(app.classes.calendar.views[_view].etemplates[i].DOMContainer).hide();
} }
} }
} }
} }
if(this.sidebox_et2) if(this.sidebox_et2)
{ {
$j(this.sidebox_et2.getInstanceManager().DOMContainer).hide(); jQuery(this.sidebox_et2.getInstanceManager().DOMContainer).hide();
} }
// Check for valid cache // Check for valid cache
@ -1994,7 +1994,7 @@ app.classes.calendar = (function(){ "use strict"; return AppJS.extend(
// Needs to be visible while updating so sizing works // Needs to be visible while updating so sizing works
for(var i = 0; i < view.etemplates.length; i++) for(var i = 0; i < view.etemplates.length; i++)
{ {
$j(view.etemplates[i].DOMContainer).show(); jQuery(view.etemplates[i].DOMContainer).show();
} }
/* /*
@ -2010,7 +2010,7 @@ app.classes.calendar = (function(){ "use strict"; return AppJS.extend(
var date = new Date(state.state.first); var date = new Date(state.state.first);
// Hide all but the first day header // Hide all but the first day header
$j(grid.getDOMNode()).toggleClass( jQuery(grid.getDOMNode()).toggleClass(
'hideDayColHeader', 'hideDayColHeader',
state.state.view == 'week' || state.state.view == 'day4' state.state.view == 'week' || state.state.view == 'day4'
); );
@ -2102,26 +2102,26 @@ app.classes.calendar = (function(){ "use strict"; return AppJS.extend(
// Swap DOM nodes // Swap DOM nodes
var a = grid._children[0].getDOMNode().parentNode.parentNode; var a = grid._children[0].getDOMNode().parentNode.parentNode;
var a_scroll = $j('.calendar_calTimeGridScroll',a).scrollTop(); var a_scroll = jQuery('.calendar_calTimeGridScroll',a).scrollTop();
var b = grid._children[1].getDOMNode().parentNode.parentNode; var b = grid._children[1].getDOMNode().parentNode.parentNode;
a.parentNode.insertBefore(a,b); a.parentNode.insertBefore(a,b);
// Moving nodes changes scrolling, so set it back // Moving nodes changes scrolling, so set it back
var a_scroll = $j('.calendar_calTimeGridScroll',a).scrollTop(a_scroll); var a_scroll = jQuery('.calendar_calTimeGridScroll',a).scrollTop(a_scroll);
} }
} }
else if (row_index > i) else if (row_index > i)
{ {
// Swap DOM nodes // Swap DOM nodes
var a = grid._children[row_index].getDOMNode().parentNode.parentNode; var a = grid._children[row_index].getDOMNode().parentNode.parentNode;
var a_scroll = $j('.calendar_calTimeGridScroll',a).scrollTop(); var a_scroll = jQuery('.calendar_calTimeGridScroll',a).scrollTop();
var b = grid._children[i].getDOMNode().parentNode.parentNode; var b = grid._children[i].getDOMNode().parentNode.parentNode;
// Simple scroll forward, put top on the bottom // Simple scroll forward, put top on the bottom
// This makes it faster if they scroll back next // This makes it faster if they scroll back next
if(i==0 && row_index == 1) if(i==0 && row_index == 1)
{ {
$j(b).appendTo(b.parentNode); jQuery(b).appendTo(b.parentNode);
grid._children.push(grid._children.shift()); grid._children.push(grid._children.shift());
} }
else else
@ -2132,7 +2132,7 @@ app.classes.calendar = (function(){ "use strict"; return AppJS.extend(
} }
// Moving nodes changes scrolling, so set it back // Moving nodes changes scrolling, so set it back
var a_scroll = $j('.calendar_calTimeGridScroll',a).scrollTop(a_scroll); var a_scroll = jQuery('.calendar_calTimeGridScroll',a).scrollTop(a_scroll);
} }
break; break;
} }
@ -2214,15 +2214,15 @@ app.classes.calendar = (function(){ "use strict"; return AppJS.extend(
if(state.state.last && state.state.last.toJSON) state.state.last = state.state.last.toJSON(); if(state.state.last && state.state.last.toJSON) state.state.last = state.state.last.toJSON();
// Toggle todos // Toggle todos
if((state.state.view == 'day' || this.state.view == 'day') && $j(view.etemplates[0].DOMContainer).is(':visible')) if((state.state.view == 'day' || this.state.view == 'day') && jQuery(view.etemplates[0].DOMContainer).is(':visible'))
{ {
if(state.state.view == 'day' && state.state.owner.length === 1 && !isNaN(state.state.owner) && state.state.owner[0] >= 0 && !egwIsMobile()) if(state.state.view == 'day' && state.state.owner.length === 1 && !isNaN(state.state.owner) && state.state.owner[0] >= 0 && !egwIsMobile())
{ {
view.etemplates[0].widgetContainer.iterateOver(function(w) { view.etemplates[0].widgetContainer.iterateOver(function(w) {
w.set_width($j(view.etemplates[0].DOMContainer).width() * 0.69); w.set_width(jQuery(view.etemplates[0].DOMContainer).width() * 0.69);
},this,et2_calendar_timegrid); },this,et2_calendar_timegrid);
$j(view.etemplates[1].DOMContainer).css({"left":"69%", "height":($j(framework.tabsUi.activeTab.contentDiv).height()-30)+'px'}); jQuery(view.etemplates[1].DOMContainer).css({"left":"69%", "height":(jQuery(framework.tabsUi.activeTab.contentDiv).height()-30)+'px'});
// TODO: Maybe some caching here // TODO: Maybe some caching here
this.egw.jsonq('calendar_uiviews::ajax_get_todos', [state.state.date, state.state.owner[0]], function(data) { this.egw.jsonq('calendar_uiviews::ajax_get_todos', [state.state.date, state.state.owner[0]], function(data) {
this.getWidgetById('label').set_value(data.label||''); this.getWidgetById('label').set_value(data.label||'');
@ -2232,20 +2232,20 @@ app.classes.calendar = (function(){ "use strict"; return AppJS.extend(
} }
else else
{ {
$j(app.classes.calendar.views.day.etemplates[1].DOMContainer).show(); jQuery(app.classes.calendar.views.day.etemplates[1].DOMContainer).show();
$j(app.classes.calendar.views.day.etemplates[1].DOMContainer).css("left","100%"); jQuery(app.classes.calendar.views.day.etemplates[1].DOMContainer).css("left","100%");
window.setTimeout(jQuery.proxy(function() { window.setTimeout(jQuery.proxy(function() {
$j(this).hide(); jQuery(this).hide();
},app.classes.calendar.views.day.etemplates[1].DOMContainer),1000); },app.classes.calendar.views.day.etemplates[1].DOMContainer),1000);
$j(app.classes.calendar.views.day.etemplates[0].DOMContainer).css("width","100%"); jQuery(app.classes.calendar.views.day.etemplates[0].DOMContainer).css("width","100%");
view.etemplates[0].widgetContainer.iterateOver(function(w) { view.etemplates[0].widgetContainer.iterateOver(function(w) {
w.set_width('100%'); w.set_width('100%');
},this,et2_calendar_timegrid); },this,et2_calendar_timegrid);
} }
} }
else if($j(view.etemplates[0].DOMContainer).is(':visible')) else if(jQuery(view.etemplates[0].DOMContainer).is(':visible'))
{ {
$j(view.etemplates[0].DOMContainer).css("width",""); jQuery(view.etemplates[0].DOMContainer).css("width","");
view.etemplates[0].widgetContainer.iterateOver(function(w) { view.etemplates[0].widgetContainer.iterateOver(function(w) {
w.set_width('100%'); w.set_width('100%');
},this,et2_calendar_timegrid); },this,et2_calendar_timegrid);
@ -2471,7 +2471,7 @@ app.classes.calendar = (function(){ "use strict"; return AppJS.extend(
this.state = jQuery.extend({},state.state); this.state = jQuery.extend({},state.state);
if(this.sidebox_et2) if(this.sidebox_et2)
{ {
$j(this.sidebox_et2.getInstanceManager().DOMContainer).show(); jQuery(this.sidebox_et2.getInstanceManager().DOMContainer).show();
} }
var query = jQuery.extend({menuaction: menuaction},state.state||{}); var query = jQuery.extend({menuaction: menuaction},state.state||{});
@ -2509,11 +2509,11 @@ app.classes.calendar = (function(){ "use strict"; return AppJS.extend(
// Also check classes, usually indicating permission // Also check classes, usually indicating permission
if(_action.data && _action.data.enableClass) if(_action.data && _action.data.enableClass)
{ {
is_widget = is_widget && ($j( _selected[i].iface.getDOMNode()).hasClass(_action.data.enableClass)); is_widget = is_widget && (jQuery( _selected[i].iface.getDOMNode()).hasClass(_action.data.enableClass));
} }
if(_action.data && _action.data.disableClass) if(_action.data && _action.data.disableClass)
{ {
is_widget = is_widget && !($j( _selected[i].iface.getDOMNode()).hasClass(_action.data.disableClass)); is_widget = is_widget && !(jQuery( _selected[i].iface.getDOMNode()).hasClass(_action.data.disableClass));
} }
} }
@ -3178,20 +3178,20 @@ app.classes.calendar = (function(){ "use strict"; return AppJS.extend(
if(date_widget) if(date_widget)
{ {
// Dynamic resize of sidebox calendar to fill sidebox // Dynamic resize of sidebox calendar to fill sidebox
var preferred_width = $j('#calendar-sidebox_date .ui-datepicker-inline').outerWidth(); var preferred_width = jQuery('#calendar-sidebox_date .ui-datepicker-inline').outerWidth();
var font_ratio = 12 / parseFloat($j('#calendar-sidebox_date .ui-datepicker-inline').css('font-size')); var font_ratio = 12 / parseFloat(jQuery('#calendar-sidebox_date .ui-datepicker-inline').css('font-size'));
var calendar_resize = function() { var calendar_resize = function() {
try { try {
var percent = 1+(($j(date_widget.getDOMNode()).width() - preferred_width) / preferred_width); var percent = 1+((jQuery(date_widget.getDOMNode()).width() - preferred_width) / preferred_width);
percent *= font_ratio; percent *= font_ratio;
$j('#calendar-sidebox_date .ui-datepicker-inline') jQuery('#calendar-sidebox_date .ui-datepicker-inline')
.css('font-size',(percent*100)+'%'); .css('font-size',(percent*100)+'%');
// Position go and today // Position go and today
var buttons = $j('#calendar-sidebox_date .ui-datepicker-header a span'); var buttons = jQuery('#calendar-sidebox_date .ui-datepicker-header a span');
if(today.length && go_button.length) if(today.length && go_button.length)
{ {
go_button.position({my: 'left+15px center', at: 'right center-1',of: $j('#calendar-sidebox_date .ui-datepicker-year')}); go_button.position({my: 'left+15px center', at: 'right center-1',of: jQuery('#calendar-sidebox_date .ui-datepicker-year')});
today.css({ today.css({
'left': (buttons.first().offset().left + buttons.last().offset().left)/2 - Math.ceil(today.outerWidth(true)/2), 'left': (buttons.first().offset().left + buttons.last().offset().left)/2 - Math.ceil(today.outerWidth(true)/2),
'top': go_button.css('top') 'top': go_button.css('top')
@ -3252,10 +3252,10 @@ app.classes.calendar = (function(){ "use strict"; return AppJS.extend(
// Clickable week numbers // Clickable week numbers
date_widget.input_date.on('mouseenter','.ui-datepicker-week-col', function() { date_widget.input_date.on('mouseenter','.ui-datepicker-week-col', function() {
$j(this).siblings().find('a').addClass('ui-state-hover'); jQuery(this).siblings().find('a').addClass('ui-state-hover');
}) })
.on('mouseleave','.ui-datepicker-week-col', function() { .on('mouseleave','.ui-datepicker-week-col', function() {
$j(this).siblings().find('a').removeClass('ui-state-hover'); jQuery(this).siblings().find('a').removeClass('ui-state-hover');
}) })
.on('click', '.ui-datepicker-week-col', function() { .on('click', '.ui-datepicker-week-col', function() {
var view = app.calendar.state.view; var view = app.calendar.state.view;
@ -3293,7 +3293,7 @@ app.classes.calendar = (function(){ "use strict"; return AppJS.extend(
// Set today button // Set today button
var today = $j('#calendar-sidebox_header_today'); var today = jQuery('#calendar-sidebox_header_today');
today.attr('title',egw.lang('today')); today.attr('title',egw.lang('today'));
// Set go button // Set go button
@ -3313,17 +3313,17 @@ app.classes.calendar = (function(){ "use strict"; return AppJS.extend(
} }
} }
$j(window).on('resize.calendar'+date_widget.dom_id,calendar_resize).trigger('resize'); jQuery(window).on('resize.calendar'+date_widget.dom_id,calendar_resize).trigger('resize');
// Avoid wrapping owner icons if user has group + search // Avoid wrapping owner icons if user has group + search
var button = $j('#calendar-sidebox_owner ~ span.et2_clickable'); var button = jQuery('#calendar-sidebox_owner ~ span.et2_clickable');
if(button.length == 1) if(button.length == 1)
{ {
button.parent().css('margin-right',button.outerWidth(true)+2); button.parent().css('margin-right',button.outerWidth(true)+2);
button.parent().parent().css('white-space','nowrap'); button.parent().parent().css('white-space','nowrap');
} }
$j(window).on('resize.calendar-owner', function() { jQuery(window).on('resize.calendar-owner', function() {
var preferred_width = $j('#calendar-et2_target').children().first().outerWidth()||0; var preferred_width = jQuery('#calendar-et2_target').children().first().outerWidth()||0;
if(app.calendar && app.calendar.sidebox_et2) if(app.calendar && app.calendar.sidebox_et2)
{ {
var owner = app.calendar.sidebox_et2.getWidgetById('owner'); var owner = app.calendar.sidebox_et2.getWidgetById('owner');
@ -3360,7 +3360,7 @@ app.classes.calendar = (function(){ "use strict"; return AppJS.extend(
view_et2 = true; view_et2 = true;
app.classes.calendar.views[view].etemplates[index] = _et2; app.classes.calendar.views[view].etemplates[index] = _et2;
// If a template disappears, we want to release it // If a template disappears, we want to release it
$j(_et2.DOMContainer).one('clear',jQuery.proxy(function() { jQuery(_et2.DOMContainer).one('clear',jQuery.proxy(function() {
this.view.etemplates[this.index] = _name; this.view.etemplates[this.index] = _name;
},jQuery.extend({},{view: app.classes.calendar.views[view], index: ""+index, name: _name}))); },jQuery.extend({},{view: app.classes.calendar.views[view], index: ""+index, name: _name})));
@ -3404,7 +3404,7 @@ app.classes.calendar = (function(){ "use strict"; return AppJS.extend(
{ {
if(hidden) if(hidden)
{ {
$j(_et2.DOMContainer).hide(); jQuery(_et2.DOMContainer).hide();
} }
} }
else else
@ -3415,7 +3415,7 @@ app.classes.calendar = (function(){ "use strict"; return AppJS.extend(
// A template from another application? Keep it up to date as state changes // A template from another application? Keep it up to date as state changes
this.sidebox_hooked_templates.push(_et2.widgetContainer); this.sidebox_hooked_templates.push(_et2.widgetContainer);
// If it leaves (or reloads) remove it // If it leaves (or reloads) remove it
$j(_et2.DOMContainer).one('clear',jQuery.proxy(function() { jQuery(_et2.DOMContainer).one('clear',jQuery.proxy(function() {
if(app.calendar) if(app.calendar)
{ {
app.calendar.sidebox_hooked_templates.splice(this,1,0); app.calendar.sidebox_hooked_templates.splice(this,1,0);
@ -3425,7 +3425,7 @@ app.classes.calendar = (function(){ "use strict"; return AppJS.extend(
} }
if(all_loaded) if(all_loaded)
{ {
$j(window).trigger('resize'); jQuery(window).trigger('resize');
this.setState({state:this.state}); this.setState({state:this.state});
// Hide loader after 1 second as a fallback, it will also be hidden // Hide loader after 1 second as a fallback, it will also be hidden
@ -3487,10 +3487,10 @@ app.classes.calendar = (function(){ "use strict"; return AppJS.extend(
} }
// Bind to tab show/hide events, so that we don't bother refreshing in the background // Bind to tab show/hide events, so that we don't bother refreshing in the background
$j(nm.getInstanceManager().DOMContainer.parentNode).on('hide.calendar', jQuery.proxy(function(e) { jQuery(nm.getInstanceManager().DOMContainer.parentNode).on('hide.calendar', jQuery.proxy(function(e) {
// Stop // Stop
window.clearInterval(this._autorefresh_timer); window.clearInterval(this._autorefresh_timer);
$j(e.target).off(e); jQuery(e.target).off(e);
if(!time) return; if(!time) return;
@ -3500,17 +3500,17 @@ app.classes.calendar = (function(){ "use strict"; return AppJS.extend(
// Check in case it was stopped / destroyed since // Check in case it was stopped / destroyed since
if(!this._autorefresh_timer) return; if(!this._autorefresh_timer) return;
$j(nm.getInstanceManager().DOMContainer.parentNode).one('show.calendar', jQuery(nm.getInstanceManager().DOMContainer.parentNode).one('show.calendar',
// Important to use anonymous function instead of just 'this.refresh' because // Important to use anonymous function instead of just 'this.refresh' because
// of the parameters passed // of the parameters passed
jQuery.proxy(function() {refresh();},this) jQuery.proxy(function() {refresh();},this)
); );
},this), time*1000); },this), time*1000);
},this)); },this));
$j(nm.getInstanceManager().DOMContainer.parentNode).on('show.calendar', jQuery.proxy(function(e) { jQuery(nm.getInstanceManager().DOMContainer.parentNode).on('show.calendar', jQuery.proxy(function(e) {
// Start normal autorefresh timer again // Start normal autorefresh timer again
this._set_autorefresh(this.egw.preference(refresh_preference, 'calendar')); this._set_autorefresh(this.egw.preference(refresh_preference, 'calendar'));
$j(e.target).off(e); jQuery(e.target).off(e);
},this)); },this));
}, },

View File

@ -60,20 +60,20 @@ var et2_calendar_daycol = (function(){ "use strict"; return et2_valueWidget.exte
this._super.apply(this, arguments); this._super.apply(this, arguments);
// Main container // Main container
this.div = $j(document.createElement("div")) this.div = jQuery(document.createElement("div"))
.addClass("calendar_calDayCol") .addClass("calendar_calDayCol")
.css('width',this.options.width) .css('width',this.options.width)
.css('left', this.options.left); .css('left', this.options.left);
this.header = $j(document.createElement('div')) this.header = jQuery(document.createElement('div'))
.addClass("calendar_calDayColHeader") .addClass("calendar_calDayColHeader")
.css('width',this.options.width) .css('width',this.options.width)
.css('left', this.options.left); .css('left', this.options.left);
this.title = $j(document.createElement('div')) this.title = jQuery(document.createElement('div'))
.appendTo(this.header); .appendTo(this.header);
this.all_day = $j(document.createElement('div')) this.all_day = jQuery(document.createElement('div'))
.addClass("calendar_calDayColAllDay") .addClass("calendar_calDayColAllDay")
.appendTo(this.header); .appendTo(this.header);
this.event_wrapper = $j(document.createElement('div')) this.event_wrapper = jQuery(document.createElement('div'))
.addClass("event_wrapper") .addClass("event_wrapper")
.appendTo(this.div); .appendTo(this.div);
@ -156,7 +156,7 @@ var et2_calendar_daycol = (function(){ "use strict"; return et2_valueWidget.exte
*/ */
_draw: function() { _draw: function() {
// Remove any existing // Remove any existing
$j('.calendar_calAddEvent',this.div).remove(); jQuery('.calendar_calAddEvent',this.div).remove();
// Grab real values from parent // Grab real values from parent
if(this._parent && this._parent.instanceOf(et2_calendar_timegrid)) if(this._parent && this._parent.instanceOf(et2_calendar_timegrid))
@ -529,7 +529,7 @@ var et2_calendar_daycol = (function(){ "use strict"; return et2_valueWidget.exte
this.div.children('.hiddenEventAfter').remove(); this.div.children('.hiddenEventAfter').remove();
this.event_wrapper.css('overflow','visible'); this.event_wrapper.css('overflow','visible');
this.all_day.removeClass('overflown'); this.all_day.removeClass('overflown');
$j('.calendar_calEventBody', this.div).css({'padding-top': '','margin-top':''}); jQuery('.calendar_calEventBody', this.div).css({'padding-top': '','margin-top':''});
var timegrid = this._parent; var timegrid = this._parent;
@ -561,7 +561,7 @@ var et2_calendar_daycol = (function(){ "use strict"; return et2_valueWidget.exte
// In gridlist view, we can quickly check if we need it at all // In gridlist view, we can quickly check if we need it at all
if(this.display_settings.granularity === 0 && this._children.length) if(this.display_settings.granularity === 0 && this._children.length)
{ {
$j('div.calendar_calEvent',this.div).show(0); jQuery('div.calendar_calEvent',this.div).show(0);
if(Math.ceil(this.div.height() / this._children[0].div.height()) > this._children.length) if(Math.ceil(this.div.height() / this._children[0].div.height()) > this._children.length)
{ {
return; return;
@ -607,7 +607,7 @@ var et2_calendar_daycol = (function(){ "use strict"; return et2_valueWidget.exte
// Too many in gridlist view, show indicator // Too many in gridlist view, show indicator
else if (this.display_settings.granularity === 0 && hidden) else if (this.display_settings.granularity === 0 && hidden)
{ {
if($j('.hiddenEventAfter',this.div).length == 0) if(jQuery('.hiddenEventAfter',this.div).length == 0)
{ {
this.event_wrapper.css('overflow','hidden'); this.event_wrapper.css('overflow','hidden');
} }
@ -649,9 +649,9 @@ var et2_calendar_daycol = (function(){ "use strict"; return et2_valueWidget.exte
if(top) if(top)
{ {
// Create if not already there // Create if not already there
if($j('.hiddenEventBefore',this.header).length === 0) if(jQuery('.hiddenEventBefore',this.header).length === 0)
{ {
indicator = $j('<div class="hiddenEventBefore"></div>') indicator = jQuery('<div class="hiddenEventBefore"></div>')
.appendTo(this.header) .appendTo(this.header)
.attr('data-hidden_count', 1); .attr('data-hidden_count', 1);
if(!fixed_height) if(!fixed_height)
@ -659,14 +659,14 @@ var et2_calendar_daycol = (function(){ "use strict"; return et2_valueWidget.exte
indicator indicator
.text(event.options.value.title) .text(event.options.value.title)
.on('click', typeof onclick === 'function' ? onclick : function() { .on('click', typeof onclick === 'function' ? onclick : function() {
$j('.calendar_calEvent',day.div).first()[0].scrollIntoView(); jQuery('.calendar_calEvent',day.div).first()[0].scrollIntoView();
return false; return false;
}); });
} }
} }
else else
{ {
indicator = $j('.hiddenEventBefore',this.header); indicator = jQuery('.hiddenEventBefore',this.header);
indicator.attr('data-hidden_count', parseInt(indicator.attr('data-hidden_count')) + 1); indicator.attr('data-hidden_count', parseInt(indicator.attr('data-hidden_count')) + 1);
if (!fixed_height) if (!fixed_height)
@ -678,18 +678,18 @@ var et2_calendar_daycol = (function(){ "use strict"; return et2_valueWidget.exte
// Event is after displayed times // Event is after displayed times
else else
{ {
indicator = $j('.hiddenEventAfter',this.div); indicator = jQuery('.hiddenEventAfter',this.div);
// Create if not already there // Create if not already there
if(indicator.length === 0) if(indicator.length === 0)
{ {
indicator = $j('<div class="hiddenEventAfter"></div>') indicator = jQuery('<div class="hiddenEventAfter"></div>')
.attr('data-hidden_count', 0) .attr('data-hidden_count', 0)
.appendTo(this.div); .appendTo(this.div);
if(!fixed_height) if(!fixed_height)
{ {
indicator indicator
.on('click', typeof onclick === 'function' ? onclick : function() { .on('click', typeof onclick === 'function' ? onclick : function() {
$j('.calendar_calEvent',day.div).last()[0].scrollIntoView(false); jQuery('.calendar_calEvent',day.div).last()[0].scrollIntoView(false);
// Better re-run this to clean up // Better re-run this to clean up
day._out_of_view(); day._out_of_view();
return false; return false;
@ -975,10 +975,10 @@ var et2_calendar_daycol = (function(){ "use strict"; return et2_valueWidget.exte
// custom here. // custom here.
if (!this.onclick) if (!this.onclick)
{ {
$j(this.node).off("click"); jQuery(this.node).off("click");
} }
// But we do want to listen to certain clicks, and handle them internally // But we do want to listen to certain clicks, and handle them internally
$j(this.node).on('click.et2_daycol', jQuery(this.node).on('click.et2_daycol',
'.calendar_calDayColHeader,.calendar_calAddEvent', '.calendar_calDayColHeader,.calendar_calAddEvent',
jQuery.proxy(this.click, this) jQuery.proxy(this.click, this)
); );
@ -997,7 +997,7 @@ var et2_calendar_daycol = (function(){ "use strict"; return et2_valueWidget.exte
click: function(_ev) click: function(_ev)
{ {
// Click on the title // Click on the title
if ($j(_ev.target).hasClass('calendar_calAddEvent')) if (jQuery(_ev.target).hasClass('calendar_calAddEvent'))
{ {
if(this.header.has(_ev.target).length == 0 && !_ev.target.dataset.whole_day) if(this.header.has(_ev.target).length == 0 && !_ev.target.dataset.whole_day)
{ {
@ -1015,7 +1015,7 @@ var et2_calendar_daycol = (function(){ "use strict"; return et2_valueWidget.exte
return false; return false;
} }
// Header, all day non-blocking // Header, all day non-blocking
else if (this.header.has(_ev.target).length && !$j('.hiddenEventBefore',this.header).has(_ev.target).length || else if (this.header.has(_ev.target).length && !jQuery('.hiddenEventBefore',this.header).has(_ev.target).length ||
this.header.is(_ev.target) this.header.is(_ev.target)
) )
{ {

View File

@ -66,7 +66,7 @@ var et2_calendar_event = (function(){ "use strict"; return et2_valueWidget.exten
var event = this; var event = this;
// Main container // Main container
this.div = $j(document.createElement("div")) this.div = jQuery(document.createElement("div"))
.addClass("calendar_calEvent") .addClass("calendar_calEvent")
.addClass(this.options.class) .addClass(this.options.class)
.css('width',this.options.width) .css('width',this.options.width)
@ -79,16 +79,16 @@ var et2_calendar_event = (function(){ "use strict"; return et2_valueWidget.exten
} }
// Hacky to remove egw's tooltip border and let the mouse in // Hacky to remove egw's tooltip border and let the mouse in
window.setTimeout(function() { window.setTimeout(function() {
$j('body .egw_tooltip') jQuery('body .egw_tooltip')
.css('border','none') .css('border','none')
.on('mouseenter', function() { .on('mouseenter', function() {
event.div.off('mouseleave.tooltip'); event.div.off('mouseleave.tooltip');
$j('body.egw_tooltip').remove(); jQuery('body.egw_tooltip').remove();
$j('body').append(this); jQuery('body').append(this);
$j(this).stop(true).fadeTo(400, 1) jQuery(this).stop(true).fadeTo(400, 1)
.on('mouseleave', function() { .on('mouseleave', function() {
$j(this).fadeOut('400', function() { jQuery(this).fadeOut('400', function() {
$j(this).remove(); jQuery(this).remove();
// Set up to work again // Set up to work again
event.set_statustext(event._tooltip()); event.set_statustext(event._tooltip());
}); });
@ -97,13 +97,13 @@ var et2_calendar_event = (function(){ "use strict"; return et2_valueWidget.exten
},105); },105);
}); });
this.title = $j(document.createElement('div')) this.title = jQuery(document.createElement('div'))
.addClass("calendar_calEventHeader") .addClass("calendar_calEventHeader")
.appendTo(this.div); .appendTo(this.div);
this.body = $j(document.createElement('div')) this.body = jQuery(document.createElement('div'))
.addClass("calendar_calEventBody") .addClass("calendar_calEventBody")
.appendTo(this.div); .appendTo(this.div);
this.icons = $j(document.createElement('div')) this.icons = jQuery(document.createElement('div'))
.addClass("calendar_calEventIcons") .addClass("calendar_calEventIcons")
.appendTo(this.title); .appendTo(this.title);
@ -145,7 +145,7 @@ var et2_calendar_event = (function(){ "use strict"; return et2_valueWidget.exten
this.div.remove(); this.div.remove();
this.div = null; this.div = null;
$j('body.egw_tooltip').remove(); jQuery('body.egw_tooltip').remove();
// Unregister, or we'll continue to be notified... // Unregister, or we'll continue to be notified...
if(this.options.value) if(this.options.value)
@ -487,7 +487,7 @@ var et2_calendar_event = (function(){ "use strict"; return et2_valueWidget.exten
if(typeof cat_label != 'string') if(typeof cat_label != 'string')
{ {
cat.span.children().each(function() { cat.span.children().each(function() {
cat_label.push($j(this).text()); cat_label.push(jQuery(this).text());
}); });
cat_label = cat_label.join(', '); cat_label = cat_label.join(', ');
} }
@ -780,7 +780,7 @@ var et2_calendar_event = (function(){ "use strict"; return et2_valueWidget.exten
// custom here. // custom here.
if (!this.onclick) if (!this.onclick)
{ {
$j(this.node).off("click"); jQuery(this.node).off("click");
} }
}, },

View File

@ -74,28 +74,28 @@ var et2_calendar_planner = (function(){ "use strict"; return et2_calendar_view.e
this._super.apply(this, arguments); this._super.apply(this, arguments);
// Main container // Main container
this.div = $j(document.createElement("div")) this.div = jQuery(document.createElement("div"))
.addClass("calendar_plannerWidget"); .addClass("calendar_plannerWidget");
// Header // Header
this.gridHeader = $j(document.createElement("div")) this.gridHeader = jQuery(document.createElement("div"))
.addClass("calendar_plannerHeader") .addClass("calendar_plannerHeader")
.appendTo(this.div); .appendTo(this.div);
this.headerTitle = $j(document.createElement("div")) this.headerTitle = jQuery(document.createElement("div"))
.addClass("calendar_plannerHeaderTitle") .addClass("calendar_plannerHeaderTitle")
.appendTo(this.gridHeader); .appendTo(this.gridHeader);
this.headers = $j(document.createElement("div")) this.headers = jQuery(document.createElement("div"))
.addClass("calendar_plannerHeaderRows") .addClass("calendar_plannerHeaderRows")
.appendTo(this.gridHeader); .appendTo(this.gridHeader);
this.rows = $j(document.createElement("div")) this.rows = jQuery(document.createElement("div"))
.addClass("calendar_plannerRows") .addClass("calendar_plannerRows")
.appendTo(this.div); .appendTo(this.div);
this.grid = $j(document.createElement("div")) this.grid = jQuery(document.createElement("div"))
.addClass("calendar_plannerGrid") .addClass("calendar_plannerGrid")
.appendTo(this.div); .appendTo(this.div);
this.vertical_bar = $j(document.createElement("div")) this.vertical_bar = jQuery(document.createElement("div"))
.addClass('verticalBar') .addClass('verticalBar')
.appendTo(this.div); .appendTo(this.div);
@ -148,7 +148,7 @@ var et2_calendar_planner = (function(){ "use strict"; return et2_calendar_view.e
var that = this; var that = this;
//Resizable event handler //Resizable event handler
$j(this).resizable jQuery(this).resizable
({ ({
distance: 10, distance: 10,
grid: [5, 10000], grid: [5, 10000],
@ -200,12 +200,12 @@ var et2_calendar_planner = (function(){ "use strict"; return et2_calendar_view.e
var loading = ui.helper.clone().appendTo(ui.helper.parent()); var loading = ui.helper.clone().appendTo(ui.helper.parent());
// and add a loading icon so user knows something is happening // and add a loading icon so user knows something is happening
$j('.calendar_timeDemo',loading).after('<div class="loading"></div>'); jQuery('.calendar_timeDemo',loading).after('<div class="loading"></div>');
$j(this).trigger(e); jQuery(this).trigger(e);
// That cleared the resize handles, so remove for re-creation... // That cleared the resize handles, so remove for re-creation...
$j(this).resizable('destroy'); jQuery(this).resizable('destroy');
// Remove loading, done or not // Remove loading, done or not
loading.remove(); loading.remove();
@ -234,7 +234,7 @@ var et2_calendar_planner = (function(){ "use strict"; return et2_calendar_view.e
}) })
.on('mousemove', function(event) { .on('mousemove', function(event) {
// Not when over header // Not when over header
if($j(event.target).closest('.calendar_eventRows').length == 0) if(jQuery(event.target).closest('.calendar_eventRows').length == 0)
{ {
planner.vertical_bar.hide(); planner.vertical_bar.hide();
return; return;
@ -273,16 +273,16 @@ var et2_calendar_planner = (function(){ "use strict"; return et2_calendar_view.e
// Customize and override some draggable settings // Customize and override some draggable settings
this.div.on('dragcreate','.calendar_calEvent', function(event, ui) { this.div.on('dragcreate','.calendar_calEvent', function(event, ui) {
$j(this).draggable('option','cancel','.rowNoEdit'); jQuery(this).draggable('option','cancel','.rowNoEdit');
// Act like you clicked the header, makes it easier to position // Act like you clicked the header, makes it easier to position
$j(this).draggable('option','cursorAt', {top: 5, left: 5}); jQuery(this).draggable('option','cursorAt', {top: 5, left: 5});
}) })
.on('dragstart', '.calendar_calEvent', function(event,ui) { .on('dragstart', '.calendar_calEvent', function(event,ui) {
$j('.calendar_calEvent',ui.helper).width($j(this).width()) jQuery('.calendar_calEvent',ui.helper).width(jQuery(this).width())
.height($j(this).outerHeight()) .height(jQuery(this).outerHeight())
.css('top', '').css('left','') .css('top', '').css('left','')
.appendTo(ui.helper); .appendTo(ui.helper);
ui.helper.width($j(this).width()); ui.helper.width(jQuery(this).width());
}); });
return true; return true;
}, },
@ -708,7 +708,7 @@ var et2_calendar_planner = (function(){ "use strict"; return et2_calendar_view.e
detachFromDOM: function() { detachFromDOM: function() {
// Remove the binding to the change handler // Remove the binding to the change handler
$j(this.div).off("change.et2_calendar_timegrid"); jQuery(this.div).off("change.et2_calendar_timegrid");
this._super.apply(this, arguments); this._super.apply(this, arguments);
}, },
@ -717,7 +717,7 @@ var et2_calendar_planner = (function(){ "use strict"; return et2_calendar_view.e
this._super.apply(this, arguments); this._super.apply(this, arguments);
// Add the binding for the event change handler // Add the binding for the event change handler
$j(this.div).on("change.et2_calendar_timegrid", '.calendar_calEvent', this, function(e) { jQuery(this.div).on("change.et2_calendar_timegrid", '.calendar_calEvent', this, function(e) {
// Make sure function gets a reference to the widget // Make sure function gets a reference to the widget
var args = Array.prototype.slice.call(arguments); var args = Array.prototype.slice.call(arguments);
if(args.indexOf(this) == -1) args.push(this); if(args.indexOf(this) == -1) args.push(this);
@ -726,7 +726,7 @@ var et2_calendar_planner = (function(){ "use strict"; return et2_calendar_view.e
}); });
// Add the binding for the change handler // Add the binding for the change handler
$j(this.div).on("change.et2_calendar_timegrid", '*:not(.calendar_calEvent)', this, function(e) { jQuery(this.div).on("change.et2_calendar_timegrid", '*:not(.calendar_calEvent)', this, function(e) {
return e.data.change.call(e.data, e, this); return e.data.change.call(e.data, e, this);
}); });
@ -1201,15 +1201,15 @@ var et2_calendar_planner = (function(){ "use strict"; return et2_calendar_view.e
*/ */
if(event.type === 'drop') if(event.type === 'drop')
{ {
this.getWidget()._event_drop.call($j('.calendar_d-n-d_timeCounter',_data.ui.helper)[0],this.getWidget(),event, _data.ui); this.getWidget()._event_drop.call(jQuery('.calendar_d-n-d_timeCounter',_data.ui.helper)[0],this.getWidget(),event, _data.ui);
} }
var drag_listener = function(event, ui) { var drag_listener = function(event, ui) {
aoi.getWidget()._drag_helper($j('.calendar_d-n-d_timeCounter',ui.helper)[0],{ aoi.getWidget()._drag_helper(jQuery('.calendar_d-n-d_timeCounter',ui.helper)[0],{
top:ui.position.top, top:ui.position.top,
left: ui.position.left - $j(this).parent().offset().left left: ui.position.left - jQuery(this).parent().offset().left
},0); },0);
}; };
var time = $j('.calendar_d-n-d_timeCounter',_data.ui.helper); var time = jQuery('.calendar_d-n-d_timeCounter',_data.ui.helper);
switch(_event) switch(_event)
{ {
// Triggered once, when something is dragged into the timegrid's div // Triggered once, when something is dragged into the timegrid's div
@ -1237,7 +1237,7 @@ var et2_calendar_planner = (function(){ "use strict"; return et2_calendar_view.e
// Stop listening // Stop listening
_data.ui.draggable.off('drag.et2_timegrid'+widget_object.id); _data.ui.draggable.off('drag.et2_timegrid'+widget_object.id);
// Remove any highlighted time squares // Remove any highlighted time squares
$j('[data-date]',this.doGetDOMNode()).removeClass("ui-state-active"); jQuery('[data-date]',this.doGetDOMNode()).removeClass("ui-state-active");
// Out triggers after the over, count to not accidentally remove // Out triggers after the over, count to not accidentally remove
time.data('count',time.data('count')-1); time.data('count',time.data('count')-1);
@ -1424,7 +1424,7 @@ var et2_calendar_planner = (function(){ "use strict"; return et2_calendar_view.e
element.innerHTML = '<div class="calendar_d-n-d_timeCounter"><span class="calendar_timeDemo" >'+formatted_time+'</span></div>'; element.innerHTML = '<div class="calendar_d-n-d_timeCounter"><span class="calendar_timeDemo" >'+formatted_time+'</span></div>';
//$j(element).width($j(helper).width()); //jQuery(element).width(jQuery(helper).width());
}, },
/** /**
@ -1452,7 +1452,7 @@ var et2_calendar_planner = (function(){ "use strict"; return et2_calendar_view.e
// Leave the helper there until the update is done // Leave the helper there until the update is done
var loading = ui.helper.clone().appendTo(ui.helper.parent()); var loading = ui.helper.clone().appendTo(ui.helper.parent());
// and add a loading icon so user knows something is happening // and add a loading icon so user knows something is happening
$j('.calendar_timeDemo',loading).after('<div class="loading"></div>'); jQuery('.calendar_timeDemo',loading).after('<div class="loading"></div>');
event_widget.recur_prompt(function(button_id) { event_widget.recur_prompt(function(button_id) {
if(button_id === 'cancel' || !button_id) return; if(button_id === 'cancel' || !button_id) return;
@ -1737,7 +1737,7 @@ var et2_calendar_planner = (function(){ "use strict"; return et2_calendar_view.e
var result = true; var result = true;
// Is this click in the event stuff, or in the header? // Is this click in the event stuff, or in the header?
if(!this.options.readonly && this.gridHeader.has(_ev.target).length === 0 && !$j(_ev.target).hasClass('calendar_plannerRowHeader')) if(!this.options.readonly && this.gridHeader.has(_ev.target).length === 0 && !jQuery(_ev.target).hasClass('calendar_plannerRowHeader'))
{ {
// Event came from inside, maybe a calendar event // Event came from inside, maybe a calendar event
var event = this._get_event_info(_ev.originalEvent.target); var event = this._get_event_info(_ev.originalEvent.target);
@ -1768,7 +1768,7 @@ var et2_calendar_planner = (function(){ "use strict"; return et2_calendar_view.e
{ {
var date = this._get_time_from_position(_ev.offsetX, _ev.offsetY); var date = this._get_time_from_position(_ev.offsetX, _ev.offsetY);
} }
var row = $j(_ev.target).closest('.calendar_plannerRowWidget'); var row = jQuery(_ev.target).closest('.calendar_plannerRowWidget');
var data = row.length ? row[0].dataset : {}; var data = row.length ? row[0].dataset : {};
this.egw().open(null, 'calendar', 'add', jQuery.extend({ this.egw().open(null, 'calendar', 'add', jQuery.extend({
start: date.toJSON(), start: date.toJSON(),
@ -1780,7 +1780,7 @@ var et2_calendar_planner = (function(){ "use strict"; return et2_calendar_view.e
return result; return result;
} }
else if (this.gridHeader.has(_ev.target).length > 0 && !jQuery.isEmptyObject(_ev.target.dataset) || else if (this.gridHeader.has(_ev.target).length > 0 && !jQuery.isEmptyObject(_ev.target.dataset) ||
$j(_ev.target).hasClass('calendar_plannerRowHeader') && !jQuery.isEmptyObject(_ev.target.dataset)) jQuery(_ev.target).hasClass('calendar_plannerRowHeader') && !jQuery.isEmptyObject(_ev.target.dataset))
{ {
// Click on a header, we can go there // Click on a header, we can go there
_ev.data = jQuery.extend({},_ev.target.parentNode.dataset, _ev.target.dataset); _ev.data = jQuery.extend({},_ev.target.parentNode.dataset, _ev.target.dataset);
@ -1819,7 +1819,7 @@ var et2_calendar_planner = (function(){ "use strict"; return et2_calendar_view.e
x = Math.round(x); x = Math.round(x);
y = Math.round(y); y = Math.round(y);
var rel_x = Math.min(x / $j('.calendar_eventRows',this.div).width(),1); var rel_x = Math.min(x / jQuery('.calendar_eventRows',this.div).width(),1);
var rel_time = 0; var rel_time = 0;
// Simple math, the x is offset from start date // Simple math, the x is offset from start date
@ -1831,7 +1831,7 @@ var et2_calendar_planner = (function(){ "use strict"; return et2_calendar_view.e
else else
{ {
// Find the correct row so we know which month, then get the offset // Find the correct row so we know which month, then get the offset
var row = $j(document.elementFromPoint(x, y)).closest('.calendar_plannerRowWidget'); var row = jQuery(document.elementFromPoint(x, y)).closest('.calendar_plannerRowWidget');
var row_widget = null; var row_widget = null;
for(var i = 0; i < this._children.length && row.length > 0; i++) for(var i = 0; i < this._children.length && row.length > 0; i++)
{ {
@ -1874,7 +1874,7 @@ var et2_calendar_planner = (function(){ "use strict"; return et2_calendar_view.e
}, },
setDetachedAttributes: function(_nodes, _values) { setDetachedAttributes: function(_nodes, _values) {
this.div = $j(_nodes[0]); this.div = jQuery(_nodes[0]);
if(_values.start_date) if(_values.start_date)
{ {
@ -1890,10 +1890,10 @@ var et2_calendar_planner = (function(){ "use strict"; return et2_calendar_view.e
resize: function () resize: function ()
{ {
// Take the whole tab height // Take the whole tab height
var height = Math.min($j(this.getInstanceManager().DOMContainer).height(),$j(this.getInstanceManager().DOMContainer).parent().innerHeight()); var height = Math.min(jQuery(this.getInstanceManager().DOMContainer).height(),jQuery(this.getInstanceManager().DOMContainer).parent().innerHeight());
// Allow for toolbar // Allow for toolbar
height -= $j('#calendar-toolbar',this.div.parents('.egw_fw_ui_tab_content')).outerHeight(true); height -= jQuery('#calendar-toolbar',this.div.parents('.egw_fw_ui_tab_content')).outerHeight(true);
this.options.height = height; this.options.height = height;
this.div.css('height', this.options.height); this.div.css('height', this.options.height);

View File

@ -47,13 +47,13 @@ var et2_calendar_planner_row = (function(){ "use strict"; return et2_valueWidget
this._super.apply(this, arguments); this._super.apply(this, arguments);
// Main container // Main container
this.div = $j(document.createElement("div")) this.div = jQuery(document.createElement("div"))
.addClass("calendar_plannerRowWidget") .addClass("calendar_plannerRowWidget")
.css('width',this.options.width); .css('width',this.options.width);
this.title = $j(document.createElement('div')) this.title = jQuery(document.createElement('div'))
.addClass("calendar_plannerRowHeader") .addClass("calendar_plannerRowHeader")
.appendTo(this.div); .appendTo(this.div);
this.rows = $j(document.createElement('div')) this.rows = jQuery(document.createElement('div'))
.addClass("calendar_eventRows") .addClass("calendar_eventRows")
.appendTo(this.div); .appendTo(this.div);
@ -259,7 +259,7 @@ var et2_calendar_planner_row = (function(){ "use strict"; return et2_valueWidget
position_event: function(event) position_event: function(event)
{ {
var rows = this._spread_events(); var rows = this._spread_events();
var row = $j('<div class="calendar_plannerEventRowWidget"></div>').appendTo(this.rows); var row = jQuery('<div class="calendar_plannerEventRowWidget"></div>').appendTo(this.rows);
var height = rows.length * (parseInt(window.getComputedStyle(row[0]).getPropertyValue("height")) || 20); var height = rows.length * (parseInt(window.getComputedStyle(row[0]).getPropertyValue("height")) || 20);
row.remove(); row.remove();

View File

@ -85,32 +85,32 @@ var et2_calendar_timegrid = (function(){ "use strict"; return et2_calendar_view.
this._super.apply(this, arguments); this._super.apply(this, arguments);
// Main container // Main container
this.div = $j(document.createElement("div")) this.div = jQuery(document.createElement("div"))
.addClass("calendar_calTimeGrid") .addClass("calendar_calTimeGrid")
.addClass("calendar_TimeGridNoLabel"); .addClass("calendar_TimeGridNoLabel");
// Headers // Headers
this.gridHeader = $j(document.createElement("div")) this.gridHeader = jQuery(document.createElement("div"))
.addClass("calendar_calGridHeader") .addClass("calendar_calGridHeader")
.appendTo(this.div); .appendTo(this.div);
this.dayHeader = $j(document.createElement("div")) this.dayHeader = jQuery(document.createElement("div"))
.appendTo(this.gridHeader); .appendTo(this.gridHeader);
// Contains times / rows // Contains times / rows
this.scrolling = $j(document.createElement('div')) this.scrolling = jQuery(document.createElement('div'))
.addClass("calendar_calTimeGridScroll") .addClass("calendar_calTimeGridScroll")
.appendTo(this.div) .appendTo(this.div)
.append('<div class="calendar_calTimeLabels"></div>'); .append('<div class="calendar_calTimeLabels"></div>');
// Contains days / columns // Contains days / columns
this.days = $j(document.createElement("div")) this.days = jQuery(document.createElement("div"))
.addClass("calendar_calDayCols") .addClass("calendar_calDayCols")
.appendTo(this.scrolling); .appendTo(this.scrolling);
// Used for owners // Used for owners
this.owner = et2_createWidget('select-account_ro',{},this); this.owner = et2_createWidget('select-account_ro',{},this);
this._labelContainer = $j(document.createElement("label")) this._labelContainer = jQuery(document.createElement("label"))
.addClass("et2_label et2_link") .addClass("et2_label et2_link")
.appendTo(this.gridHeader); .appendTo(this.gridHeader);
@ -134,7 +134,7 @@ var et2_calendar_timegrid = (function(){ "use strict"; return et2_calendar_view.
// Stop listening to tab changes // Stop listening to tab changes
if(framework.getApplicationByName('calendar').tab) if(framework.getApplicationByName('calendar').tab)
{ {
$j(framework.getApplicationByName('calendar').tab.contentDiv).off('show.' + this.id); jQuery(framework.getApplicationByName('calendar').tab.contentDiv).off('show.' + this.id);
} }
this._super.apply(this, arguments); this._super.apply(this, arguments);
@ -166,7 +166,7 @@ var et2_calendar_timegrid = (function(){ "use strict"; return et2_calendar_view.
// Listen to tab show to make sure we scroll to the day start, not top // Listen to tab show to make sure we scroll to the day start, not top
if(framework.getApplicationByName('calendar').tab) if(framework.getApplicationByName('calendar').tab)
{ {
$j(framework.getApplicationByName('calendar').tab.contentDiv) jQuery(framework.getApplicationByName('calendar').tab.contentDiv)
.on('show.' + this.id, jQuery.proxy( .on('show.' + this.id, jQuery.proxy(
function() function()
{ {
@ -206,7 +206,7 @@ var et2_calendar_timegrid = (function(){ "use strict"; return et2_calendar_view.
var that = this; var that = this;
//Resizable event handler //Resizable event handler
$j(this).resizable jQuery(this).resizable
({ ({
distance: 10, distance: 10,
// Grid matching preference // Grid matching preference
@ -254,13 +254,13 @@ var et2_calendar_timegrid = (function(){ "use strict"; return et2_calendar_view.
event_widget.options.value.end_m = eT; event_widget.options.value.end_m = eT;
event_widget.options.value.duration = e.data.duration; event_widget.options.value.duration = e.data.duration;
} }
$j(this).trigger(e); jQuery(this).trigger(e);
event_widget._update(event_widget.options.value); event_widget._update(event_widget.options.value);
// That cleared the resize handles, so remove for re-creation... // That cleared the resize handles, so remove for re-creation...
if($j(this).resizable('instance')) if(jQuery(this).resizable('instance'))
{ {
$j(this).resizable('destroy'); jQuery(this).resizable('destroy');
} }
} }
// Clear the helper, re-draw // Clear the helper, re-draw
@ -295,17 +295,17 @@ var et2_calendar_timegrid = (function(){ "use strict"; return et2_calendar_view.
// Customize and override some draggable settings // Customize and override some draggable settings
this.div this.div
.on('dragcreate','.calendar_calEvent', function(event, ui) { .on('dragcreate','.calendar_calEvent', function(event, ui) {
$j(this).draggable('option','cancel','.rowNoEdit'); jQuery(this).draggable('option','cancel','.rowNoEdit');
// Act like you clicked the header, makes it easier to position // Act like you clicked the header, makes it easier to position
// but put it to the side (-5) so we can still do the hover // but put it to the side (-5) so we can still do the hover
$j(this).draggable('option','cursorAt', {top: 5, left: -5}); jQuery(this).draggable('option','cursorAt', {top: 5, left: -5});
}) })
.on('dragstart', '.calendar_calEvent', function(event,ui) { .on('dragstart', '.calendar_calEvent', function(event,ui) {
$j('.calendar_calEvent',ui.helper).width($j(this).width()) jQuery('.calendar_calEvent',ui.helper).width(jQuery(this).width())
.height($j(this).outerHeight()) .height(jQuery(this).outerHeight())
.css('top', '').css('left','') .css('top', '').css('left','')
.appendTo(ui.helper); .appendTo(ui.helper);
ui.helper.width($j(this).width()); ui.helper.width(jQuery(this).width());
}) })
.on('mousemove', function(event) { .on('mousemove', function(event) {
timegrid._get_time_from_position(event.clientX, event.clientY); timegrid._get_time_from_position(event.clientX, event.clientY);
@ -361,7 +361,7 @@ var et2_calendar_timegrid = (function(){ "use strict"; return et2_calendar_view.
{ {
// No times, keep what's in the event // No times, keep what's in the event
// Add class to helper to keep formatting // Add class to helper to keep formatting
$j(helper).addClass('calendar_calTimeGridList'); jQuery(helper).addClass('calendar_calTimeGridList');
} }
else else
{ {
@ -382,7 +382,7 @@ var et2_calendar_timegrid = (function(){ "use strict"; return et2_calendar_view.
{ {
element.innerHTML = '<div class="calendar_d-n-d_forbiden" style="height:100%"></div>'; element.innerHTML = '<div class="calendar_d-n-d_forbiden" style="height:100%"></div>';
} }
$j(element).width($j(helper).width()); jQuery(element).width(jQuery(helper).width());
return element.dropEnd; return element.dropEnd;
}, },
@ -439,15 +439,15 @@ var et2_calendar_timegrid = (function(){ "use strict"; return et2_calendar_view.
} }
// Leave the helper there until the update is done // Leave the helper there until the update is done
var loading = ui.helper.clone(true).appendTo($j('body')); var loading = ui.helper.clone(true).appendTo(jQuery('body'));
// and add a loading icon so user knows something is happening // and add a loading icon so user knows something is happening
if($j('.calendar_timeDemo',loading).length == 0) if(jQuery('.calendar_timeDemo',loading).length == 0)
{ {
$j('.calendar_calEventHeader',loading).addClass('loading'); jQuery('.calendar_calEventHeader',loading).addClass('loading');
} }
else else
{ {
$j('.calendar_timeDemo',loading).after('<div class="loading"></div>'); jQuery('.calendar_timeDemo',loading).after('<div class="loading"></div>');
} }
event_widget.recur_prompt(function(button_id) { event_widget.recur_prompt(function(button_id) {
@ -568,7 +568,7 @@ var et2_calendar_timegrid = (function(){ "use strict"; return et2_calendar_view.
detachFromDOM: function() { detachFromDOM: function() {
// Remove the binding to the change handler // Remove the binding to the change handler
$j(this.div).off(".et2_calendar_timegrid"); jQuery(this.div).off(".et2_calendar_timegrid");
this._super.apply(this, arguments); this._super.apply(this, arguments);
}, },
@ -577,7 +577,7 @@ var et2_calendar_timegrid = (function(){ "use strict"; return et2_calendar_view.
this._super.apply(this, arguments); this._super.apply(this, arguments);
// Add the binding for the event change handler // Add the binding for the event change handler
$j(this.div).on("change.et2_calendar_timegrid", '.calendar_calEvent', this, function(e) { jQuery(this.div).on("change.et2_calendar_timegrid", '.calendar_calEvent', this, function(e) {
// Make sure function gets a reference to the widget // Make sure function gets a reference to the widget
var args = Array.prototype.slice.call(arguments); var args = Array.prototype.slice.call(arguments);
if(args.indexOf(this) == -1) args.push(this); if(args.indexOf(this) == -1) args.push(this);
@ -586,7 +586,7 @@ var et2_calendar_timegrid = (function(){ "use strict"; return et2_calendar_view.
}); });
// Add the binding for the change handler // Add the binding for the change handler
$j(this.div).on("change.et2_calendar_timegrid", '*:not(.calendar_calEvent)', this, function(e) { jQuery(this.div).on("change.et2_calendar_timegrid", '*:not(.calendar_calEvent)', this, function(e) {
return e.data.change.call(e.data, e, this); return e.data.change.call(e.data, e, this);
}); });
@ -650,7 +650,7 @@ var et2_calendar_timegrid = (function(){ "use strict"; return et2_calendar_view.
* lines (mostly via CSS) that span the whole date range. * lines (mostly via CSS) that span the whole date range.
*/ */
_drawTimes: function() { _drawTimes: function() {
$j('.calendar_calTimeRow',this.div).remove(); jQuery('.calendar_calTimeRow',this.div).remove();
this.div.toggleClass('calendar_calTimeGridList', this.options.granularity === 0); this.div.toggleClass('calendar_calTimeGridList', this.options.granularity === 0);
@ -746,7 +746,7 @@ var et2_calendar_timegrid = (function(){ "use strict"; return et2_calendar_view.
} }
// Set heights in pixels for scrolling // Set heights in pixels for scrolling
$j('.calendar_calTimeLabels',this.scrolling) jQuery('.calendar_calTimeLabels',this.scrolling)
.empty() .empty()
.height(this.rowHeight*i) .height(this.rowHeight*i)
.append(html); .append(html);
@ -802,7 +802,7 @@ var et2_calendar_timegrid = (function(){ "use strict"; return et2_calendar_view.
var old_height = this.rowHeight; var old_height = this.rowHeight;
this.rowHeight = new_height; this.rowHeight = new_height;
$j('.calendar_calTimeLabels', this.scrolling).height(this.rowHeight*row_count); jQuery('.calendar_calTimeLabels', this.scrolling).height(this.rowHeight*row_count);
this.days.css('height', this.options.granularity === 0 ? this.days.css('height', this.options.granularity === 0 ?
'100%' : '100%' :
(this.rowHeight*row_count)+'px' (this.rowHeight*row_count)+'px'
@ -841,7 +841,7 @@ var et2_calendar_timegrid = (function(){ "use strict"; return et2_calendar_view.
this.options.owner.length > 1 && this.options.owner.length > 1 &&
this.options.owner.length < (parseInt(egw.preference('day_consolidate','calendar')) || 6); this.options.owner.length < (parseInt(egw.preference('day_consolidate','calendar')) || 6);
var daycols_needed = this.daily_owner ? this.options.owner.length : this.day_list.length; var daycols_needed = this.daily_owner ? this.options.owner.length : this.day_list.length;
var day_width = ( Math.min( $j(this.getInstanceManager().DOMContainer).width(),this.days.width())/daycols_needed); var day_width = ( Math.min( jQuery(this.getInstanceManager().DOMContainer).width(),this.days.width())/daycols_needed);
if(!day_width || !this.day_list) if(!day_width || !this.day_list)
{ {
// Hidden on another tab, or no days for some reason // Hidden on another tab, or no days for some reason
@ -872,7 +872,7 @@ var et2_calendar_timegrid = (function(){ "use strict"; return et2_calendar_view.
if(existing_index != -1 && parseInt(this.day_list[add_index]) < parseInt(this.day_list[existing_index])) if(existing_index != -1 && parseInt(this.day_list[add_index]) < parseInt(this.day_list[existing_index]))
{ {
this.day_widgets.unshift(day); this.day_widgets.unshift(day);
$j(this.getDOMNode(day)).prepend(day.getDOMNode(day)); jQuery(this.getDOMNode(day)).prepend(day.getDOMNode(day));
} }
else else
{ {
@ -1104,16 +1104,16 @@ var et2_calendar_timegrid = (function(){ "use strict"; return et2_calendar_view.
if(event.type === 'drop') if(event.type === 'drop')
{ {
var dropEnd = false; var dropEnd = false;
var helper = $j('.calendar_d-n-d_timeCounter',_data.ui.helper)[0]; var helper = jQuery('.calendar_d-n-d_timeCounter',_data.ui.helper)[0];
if(helper && helper.dropEnd && helper.dropEnd.length >= 1) if(helper && helper.dropEnd && helper.dropEnd.length >= 1)
if (typeof this.dropEnd !== 'undefined' && this.dropEnd.length >= 1) if (typeof this.dropEnd !== 'undefined' && this.dropEnd.length >= 1)
{ {
dropEnd = helper.dropEnd[0].dataset || false; dropEnd = helper.dropEnd[0].dataset || false;
} }
this.getWidget()._event_drop.call($j('.calendar_d-n-d_timeCounter',_data.ui.helper)[0],this.getWidget(),event, _data.ui, dropEnd); this.getWidget()._event_drop.call(jQuery('.calendar_d-n-d_timeCounter',_data.ui.helper)[0],this.getWidget(),event, _data.ui, dropEnd);
} }
var drag_listener = function(_event, ui) { var drag_listener = function(_event, ui) {
aoi.getWidget()._drag_helper($j('.calendar_d-n-d_timeCounter',ui.helper)[0],ui.helper[0],0); aoi.getWidget()._drag_helper(jQuery('.calendar_d-n-d_timeCounter',ui.helper)[0],ui.helper[0],0);
if(aoi.getWidget().daily_owner) if(aoi.getWidget().daily_owner)
{ {
_invite_enabled( _invite_enabled(
@ -1123,7 +1123,7 @@ var et2_calendar_timegrid = (function(){ "use strict"; return et2_calendar_view.
); );
} }
}; };
var time = $j('.calendar_d-n-d_timeCounter',_data.ui.helper); var time = jQuery('.calendar_d-n-d_timeCounter',_data.ui.helper);
switch(_event) switch(_event)
{ {
// Triggered once, when something is dragged into the timegrid's div // Triggered once, when something is dragged into the timegrid's div
@ -1136,8 +1136,8 @@ var et2_calendar_timegrid = (function(){ "use strict"; return et2_calendar_view.
}); });
// Remove formatting for out-of-view events (full day non-blocking) // Remove formatting for out-of-view events (full day non-blocking)
$j('.calendar_calEventHeader',_data.ui.helper).css('top',''); jQuery('.calendar_calEventHeader',_data.ui.helper).css('top','');
$j('.calendar_calEventBody',_data.ui.helper).css('padding-top',''); jQuery('.calendar_calEventBody',_data.ui.helper).css('padding-top','');
// Disable invite / change actions for same calendar or already participant // Disable invite / change actions for same calendar or already participant
var event = _data.ui.draggable.data('selected')[0]; var event = _data.ui.draggable.data('selected')[0];
@ -1303,7 +1303,7 @@ var et2_calendar_timegrid = (function(){ "use strict"; return et2_calendar_view.
else if (links.length) else if (links.length)
{ {
// Get date and time // Get date and time
var params = jQuery.extend({},$j('.drop-hover[data-date]',target.iface.getDOMNode())[0].dataset || {}); var params = jQuery.extend({},jQuery('.drop-hover[data-date]',target.iface.getDOMNode())[0].dataset || {});
// Add link IDs // Add link IDs
var app_registry = egw.link_get_registry('calendar'); var app_registry = egw.link_get_registry('calendar');
@ -1344,16 +1344,16 @@ var et2_calendar_timegrid = (function(){ "use strict"; return et2_calendar_view.
} }
// Leave the helper there until the update is done // Leave the helper there until the update is done
var loading = action.ui.helper.clone(true).appendTo($j('body')); var loading = action.ui.helper.clone(true).appendTo(jQuery('body'));
// and add a loading icon so user knows something is happening // and add a loading icon so user knows something is happening
if($j('.calendar_timeDemo',loading).length == 0) if(jQuery('.calendar_timeDemo',loading).length == 0)
{ {
$j('.calendar_calEventHeader',loading).addClass('loading'); jQuery('.calendar_calEventHeader',loading).addClass('loading');
} }
else else
{ {
$j('.calendar_timeDemo',loading).after('<div class="loading"></div>'); jQuery('.calendar_timeDemo',loading).after('<div class="loading"></div>');
} }
var event_data = egw.dataGetUIDdata(source[i].id).data; var event_data = egw.dataGetUIDdata(source[i].id).data;
@ -1577,7 +1577,7 @@ var et2_calendar_timegrid = (function(){ "use strict"; return et2_calendar_view.
this.owner.options.application = 'api-accounts'; this.owner.options.application = 'api-accounts';
this.owner.set_value(typeof _owner == "string" || typeof _owner == "number" ? _owner : jQuery.extend([],_owner)); this.owner.set_value(typeof _owner == "string" || typeof _owner == "number" ? _owner : jQuery.extend([],_owner));
this.set_label(''); this.set_label('');
$j(this.getDOMNode(this.owner)).prepend(this.owner.getDOMNode()); jQuery(this.getDOMNode(this.owner)).prepend(this.owner.getDOMNode());
} }
if(this.isAttached() && ( if(this.isAttached() && (
@ -1744,7 +1744,7 @@ var et2_calendar_timegrid = (function(){ "use strict"; return et2_calendar_view.
var result = true; var result = true;
// Is this click in the event stuff, or in the header? // Is this click in the event stuff, or in the header?
if(_ev.target.dataset.id || $j(_ev.target).parents('.calendar_calEvent').length) if(_ev.target.dataset.id || jQuery(_ev.target).parents('.calendar_calEvent').length)
{ {
// Event came from inside, maybe a calendar event // Event came from inside, maybe a calendar event
var event = this._get_event_info(_ev.originalEvent.target); var event = this._get_event_info(_ev.originalEvent.target);
@ -1757,7 +1757,7 @@ var et2_calendar_timegrid = (function(){ "use strict"; return et2_calendar_view.
result = this.onclick.apply(this, args); result = this.onclick.apply(this, args);
} }
var event_node = $j(event.event_node); var event_node = jQuery(event.event_node);
if(event.id && result && !this.disabled && !this.options.readonly && if(event.id && result && !this.disabled && !this.options.readonly &&
// Permissions - opening will fail if we try // Permissions - opening will fail if we try
event_node && !(event_node.hasClass('rowNoView')) event_node && !(event_node.hasClass('rowNoView'))
@ -1802,11 +1802,11 @@ var et2_calendar_timegrid = (function(){ "use strict"; return et2_calendar_view.
} }
// No time grid, click on a day // No time grid, click on a day
else if (this.options.granularity === 0 && else if (this.options.granularity === 0 &&
($j(_ev.target).hasClass('event_wrapper') || $j(_ev.target).hasClass('.calendar_calDayCol')) (jQuery(_ev.target).hasClass('event_wrapper') || jQuery(_ev.target).hasClass('.calendar_calDayCol'))
) )
{ {
// Default handler to open a new event at the selected time // Default handler to open a new event at the selected time
var target = $j(_ev.target).hasClass('event_wrapper') ? _ev.target.parentNode : _ev.target; var target = jQuery(_ev.target).hasClass('event_wrapper') ? _ev.target.parentNode : _ev.target;
var options = { var options = {
date: target.dataset.date || this.options.date, date: target.dataset.date || this.options.date,
hour: target.dataset.hour || this._parent.options.day_start, hour: target.dataset.hour || this._parent.options.day_start,
@ -1841,7 +1841,7 @@ var et2_calendar_timegrid = (function(){ "use strict"; return et2_calendar_view.
var time = null; var time = null;
var node = document.elementFromPoint(x,y); var node = document.elementFromPoint(x,y);
var $node = $j(node); var $node = jQuery(node);
// Ignore high level & non-time (grid itself, header parent & week label) // Ignore high level & non-time (grid itself, header parent & week label)
if([this.node, this.gridHeader[0], this._labelContainer[0]].indexOf(node) !== -1 || if([this.node, this.gridHeader[0], this._labelContainer[0]].indexOf(node) !== -1 ||
@ -1857,7 +1857,7 @@ var et2_calendar_timegrid = (function(){ "use strict"; return et2_calendar_view.
{ {
path.push(node); path.push(node);
node.style.display = 'none'; node.style.display = 'none';
$node = $j(node); $node = jQuery(node);
if($node.hasClass('calendar_calDayColHeader')) { if($node.hasClass('calendar_calDayColHeader')) {
for(var id in node.dataset) { for(var id in node.dataset) {
this.gridHover[0].dataset[id] = node.dataset[id]; this.gridHover[0].dataset[id] = node.dataset[id];
@ -1923,7 +1923,7 @@ var et2_calendar_timegrid = (function(){ "use strict"; return et2_calendar_view.
}, },
setDetachedAttributes: function(_nodes, _values) { setDetachedAttributes: function(_nodes, _values) {
this.div = $j(_nodes[0]); this.div = jQuery(_nodes[0]);
if(_values.start_date) if(_values.start_date)
{ {
@ -1961,10 +1961,10 @@ var et2_calendar_timegrid = (function(){ "use strict"; return et2_calendar_view.
},this, et2_calendar_timegrid); },this, et2_calendar_timegrid);
// Take the whole tab height // Take the whole tab height
var height = $j(this.getInstanceManager().DOMContainer).parent().innerHeight(); var height = jQuery(this.getInstanceManager().DOMContainer).parent().innerHeight();
// Allow for toolbar // Allow for toolbar
height -= $j('#calendar-toolbar',this.div.parents('.egw_fw_ui_tab_content')).outerHeight(true); height -= jQuery('#calendar-toolbar',this.div.parents('.egw_fw_ui_tab_content')).outerHeight(true);
this.options.height = Math.floor(height / rowCount); this.options.height = Math.floor(height / rowCount);
@ -1978,7 +1978,7 @@ var et2_calendar_timegrid = (function(){ "use strict"; return et2_calendar_view.
this.gridHeader.outerHeight(); this.gridHeader.outerHeight();
var too_small = needed > this.options.height && this.options.granularity != 0; var too_small = needed > this.options.height && this.options.granularity != 0;
$j(this.getInstanceManager().DOMContainer) jQuery(this.getInstanceManager().DOMContainer)
.css({ .css({
'overflow-y': too_small || _too_small ? 'auto' : 'hidden', 'overflow-y': too_small || _too_small ? 'auto' : 'hidden',
'overflow-x': 'hidden', 'overflow-x': 'hidden',
@ -2013,8 +2013,8 @@ var et2_calendar_timegrid = (function(){ "use strict"; return et2_calendar_view.
} }
// Try to resize width, though animations cause problems // Try to resize width, though animations cause problems
var total_width = $j(this.getInstanceManager().DOMContainer).parent().innerWidth() - this.days.position().left; var total_width = jQuery(this.getInstanceManager().DOMContainer).parent().innerWidth() - this.days.position().left;
var day_width = (total_width > 0 ? total_width : $j(this.getInstanceManager().DOMContainer).width())/this.day_widgets.length; var day_width = (total_width > 0 ? total_width : jQuery(this.getInstanceManager().DOMContainer).width())/this.day_widgets.length;
// update day widgets // update day widgets
for(var i = 0; i < this.day_widgets.length; i++) for(var i = 0; i < this.day_widgets.length; i++)
{ {

View File

@ -55,7 +55,7 @@ var et2_calendar_view = (function(){ "use strict"; return et2_valueWidget.extend
this.date_helper = et2_createWidget('date-time',{},null); this.date_helper = et2_createWidget('date-time',{},null);
this.date_helper.loadingFinished(); this.date_helper.loadingFinished();
this.loader = $j('<div class="egw-loading-prompt-container ui-front loading"></div>'); this.loader = jQuery('<div class="egw-loading-prompt-container ui-front loading"></div>');
this.update_timer = null; this.update_timer = null;
}, },
@ -363,8 +363,8 @@ var et2_calendar_view = (function(){ "use strict"; return et2_valueWidget.extend
_get_event_info: function _get_event_info(dom_node) _get_event_info: function _get_event_info(dom_node)
{ {
// Determine as much relevant info as can be found // Determine as much relevant info as can be found
var event_node = $j(dom_node).closest('[data-id]',this.div)[0]; var event_node = jQuery(dom_node).closest('[data-id]',this.div)[0];
var day_node = $j(event_node).closest('[data-date]',this.div)[0]; var day_node = jQuery(event_node).closest('[data-date]',this.div)[0];
var result = jQuery.extend({ var result = jQuery.extend({
event_node: event_node, event_node: event_node,

View File

@ -76,7 +76,7 @@ app.classes.filemanager = AppJS.extend(
{ {
this.path_widget[et2.DOMContainer.id] = path_widget; this.path_widget[et2.DOMContainer.id] = path_widget;
// Bind to removal to remove from list // Bind to removal to remove from list
$j(et2.DOMContainer).on('clear', function(e) { jQuery(et2.DOMContainer).on('clear', function(e) {
if (app.filemanager && app.filemanager.path_widget) delete app.filemanager.path_widget[e.target.id]; if (app.filemanager && app.filemanager.path_widget) delete app.filemanager.path_widget[e.target.id];
}); });
} }
@ -629,7 +629,7 @@ app.classes.filemanager = AppJS.extend(
} }
// Multiple file download for those that support it // Multiple file download for those that support it
a = $j(a) a = jQuery(a)
.prop('href', url) .prop('href', url)
.prop('download', data ? data.data.name : "") .prop('download', data ? data.data.name : "")
.appendTo(this.et2.getDOMNode()); .appendTo(this.et2.getDOMNode());

View File

@ -106,7 +106,7 @@ app.classes.home = (function(){ "use strict"; return AppJS.extend(
this._do_ordering(); this._do_ordering();
// Accept drops of favorites, which aren't part of action system // Accept drops of favorites, which aren't part of action system
$j(this.et2.getDOMNode().parentNode).droppable({ jQuery(this.et2.getDOMNode().parentNode).droppable({
hoverClass: 'drop-hover', hoverClass: 'drop-hover',
accept: function(draggable) { accept: function(draggable) {
// Check for direct support for that application // Check for direct support for that application
@ -166,10 +166,10 @@ app.classes.home = (function(){ "use strict"; return AppJS.extend(
} }
} }
// It's in the right place for original load, but move it into portlet // It's in the right place for original load, but move it into portlet
var misplaced = $j(etemplate2.getById('home-index').DOMContainer).siblings('#'+et2.DOMContainer.id); var misplaced = jQuery(etemplate2.getById('home-index').DOMContainer).siblings('#'+et2.DOMContainer.id);
if(portlet) if(portlet)
{ {
portlet.content = $j(et2.DOMContainer).appendTo(portlet.content); portlet.content = jQuery(et2.DOMContainer).appendTo(portlet.content);
portlet.addChild(et2.widgetContainer); portlet.addChild(et2.widgetContainer);
et2.resize(); et2.resize();
} }
@ -185,7 +185,7 @@ app.classes.home = (function(){ "use strict"; return AppJS.extend(
// Special handling to deal with legacy (non-et2) calendar links // Special handling to deal with legacy (non-et2) calendar links
if(name == 'home.legacy') if(name == 'home.legacy')
{ {
$j('.calendar_calDayColHeader a, .calendar_plannerDayScale a, .calendar_plannerWeekScale a, .calendar_plannerMonthScale a, .calendar_calGridHeader a', et2.DOMContainer) jQuery('.calendar_calDayColHeader a, .calendar_plannerDayScale a, .calendar_plannerWeekScale a, .calendar_plannerMonthScale a, .calendar_calGridHeader a', et2.DOMContainer)
.on('click', function(e) { .on('click', function(e) {
egw.link_handler(this.href,'calendar'); egw.link_handler(this.href,'calendar');
return false; return false;
@ -255,7 +255,7 @@ app.classes.home = (function(){ "use strict"; return AppJS.extend(
// Try to put it about where the menu was opened // Try to put it about where the menu was opened
if(action.menu_context) if(action.menu_context)
{ {
var $portlet_container = $j(this.portlet_container.getDOMNode()); var $portlet_container = jQuery(this.portlet_container.getDOMNode());
attrs.row = Math.max(1,Math.round((action.menu_context.posy - $portlet_container.offset().top )/ this.GRID)+1); attrs.row = Math.max(1,Math.round((action.menu_context.posy - $portlet_container.offset().top )/ this.GRID)+1);
attrs.col = Math.max(1,Math.round((action.menu_context.posx - $portlet_container.offset().left) / this.GRID)+1); attrs.col = Math.max(1,Math.round((action.menu_context.posx - $portlet_container.offset().left) / this.GRID)+1);
} }
@ -273,7 +273,7 @@ app.classes.home = (function(){ "use strict"; return AppJS.extend(
portlet._process_edit(et2_dialog.OK_BUTTON, attrs); portlet._process_edit(et2_dialog.OK_BUTTON, attrs);
// Set up sorting/grid of new portlet // Set up sorting/grid of new portlet
var $portlet_container = $j(this.portlet_container.getDOMNode()); var $portlet_container = jQuery(this.portlet_container.getDOMNode());
$portlet_container.data("gridster").add_widget( $portlet_container.data("gridster").add_widget(
portlet.getDOMNode(), portlet.getDOMNode(),
this.DEFAULT.WIDTH, this.DEFAULT.HEIGHT, this.DEFAULT.WIDTH, this.DEFAULT.HEIGHT,
@ -295,7 +295,7 @@ app.classes.home = (function(){ "use strict"; return AppJS.extend(
return this.add(action); return this.add(action);
} }
var $portlet_container = $j(this.portlet_container.getDOMNode()); var $portlet_container = jQuery(this.portlet_container.getDOMNode());
// Basic portlet attributes // Basic portlet attributes
var attrs = { var attrs = {
@ -473,7 +473,7 @@ app.classes.home = (function(){ "use strict"; return AppJS.extend(
* Set up the drag / drop / re-order of portlets * Set up the drag / drop / re-order of portlets
*/ */
_do_ordering: function() { _do_ordering: function() {
var $portlet_container = $j(this.portlet_container.getDOMNode()); var $portlet_container = jQuery(this.portlet_container.getDOMNode());
$portlet_container $portlet_container
.addClass("home ui-helper-clearfix") .addClass("home ui-helper-clearfix")
.disableSelection() .disableSelection()
@ -512,7 +512,7 @@ app.classes.home = (function(){ "use strict"; return AppJS.extend(
var changed = this.serialize_changed(); var changed = this.serialize_changed();
// Reset changed, or they keep accumulating // Reset changed, or they keep accumulating
this.$changed = $j([]); this.$changed = jQuery([]);
for (var key in changed) for (var key in changed)
{ {
@ -539,7 +539,7 @@ app.classes.home = (function(){ "use strict"; return AppJS.extend(
e.stopPropagation(); e.stopPropagation();
}); });
// Bind window resize to re-layout gridster // Bind window resize to re-layout gridster
$j(window).one("resize."+this.et2._inst.uniqueId, function() { jQuery(window).one("resize."+this.et2._inst.uniqueId, function() {
// Note this doesn't change the positions, just makes them invalid // Note this doesn't change the positions, just makes them invalid
$portlet_container.data('gridster').recalculate_faux_grid(); $portlet_container.data('gridster').recalculate_faux_grid();
}); });
@ -710,7 +710,7 @@ app.classes.home = (function(){ "use strict"; return AppJS.extend(
} }
// Aim to match the size // Aim to match the size
var portlet_dom = $j('[id$='+id+'][data-sizex]',this.portlet_container.getDOMNode()); var portlet_dom = jQuery('[id$='+id+'][data-sizex]',this.portlet_container.getDOMNode());
var width = portlet_dom.attr('data-sizex') * this.GRID; var width = portlet_dom.attr('data-sizex') * this.GRID;
var height = portlet_dom.attr('data-sizey') * this.GRID; var height = portlet_dom.attr('data-sizey') * this.GRID;
@ -789,7 +789,7 @@ app.classes.home.home_link_portlet = app.classes.home.home_portlet.extend({
// Check for tooltip // Check for tooltip
if(this.portlet) if(this.portlet)
{ {
var content = $j('.tooltip',this.portlet.content); var content = jQuery('.tooltip',this.portlet.content);
if(content.length && content.children().length) if(content.length && content.children().length)
{ {
//Check if the tooltip is already initialized //Check if the tooltip is already initialized
@ -811,10 +811,10 @@ app.classes.home.home_link_portlet = app.classes.home.home_portlet.extend({
close: function(event,ui) { close: function(event,ui) {
ui.tooltip.hover( ui.tooltip.hover(
function() { function() {
$j(this).stop(true).fadeTo(100,1); jQuery(this).stop(true).fadeTo(100,1);
}, },
function() { function() {
$j(this).slideUp("400",function() {$j(this).remove();}); jQuery(this).slideUp("400",function() {jQuery(this).remove();});
} }
); );
} }

View File

@ -55,26 +55,26 @@ app.classes.importexport = AppJS.extend(
if(!this.et2.getArrayMgr("content").getEntry("definition")) if(!this.et2.getArrayMgr("content").getEntry("definition"))
{ {
// et2 doesn't understand a disabled button in the normal sense // et2 doesn't understand a disabled button in the normal sense
$j(this.et2.getWidgetById('export').getDOMNode()).attr('disabled','disabled'); jQuery(this.et2.getWidgetById('export').getDOMNode()).attr('disabled','disabled');
$j(this.et2.getWidgetById('preview').getDOMNode()).attr('disabled','disabled'); jQuery(this.et2.getWidgetById('preview').getDOMNode()).attr('disabled','disabled');
} }
if(!this.et2.getArrayMgr("content").getEntry("filter")) if(!this.et2.getArrayMgr("content").getEntry("filter"))
{ {
$j('input[value="filter"]').parent().hide(); jQuery('input[value="filter"]').parent().hide();
} }
// Disable / hide definition filter if not selected // Disable / hide definition filter if not selected
if(this.et2.getArrayMgr("content").getEntry("selection") != 'filter') if(this.et2.getArrayMgr("content").getEntry("selection") != 'filter')
{ {
$j('div.filters').hide(); jQuery('div.filters').hide();
} }
} }
}, },
export_preview: function(event, widget) export_preview: function(event, widget)
{ {
var preview = $j(widget.getRoot().getWidgetById('preview_box').getDOMNode()); var preview = jQuery(widget.getRoot().getWidgetById('preview_box').getDOMNode());
$j('.content',preview).empty() jQuery('.content',preview).empty()
.append('<div class="loading" style="width:100%;height:100%"></div>'); .append('<div class="loading" style="width:100%;height:100%"></div>');
preview preview
@ -92,15 +92,15 @@ app.classes.importexport = AppJS.extend(
if(test.getValue() == test.options.unselected_value) return true; if(test.getValue() == test.options.unselected_value) return true;
// Show preview // Show preview
var preview = $j(widget.getRoot().getWidgetById('preview_box').getDOMNode()); var preview = jQuery(widget.getRoot().getWidgetById('preview_box').getDOMNode());
$j('.content',preview).empty(); jQuery('.content',preview).empty();
preview preview
.addClass('loading') .addClass('loading')
.show(100, jQuery.proxy(function() { .show(100, jQuery.proxy(function() {
widget.clicked = true; widget.clicked = true;
widget.getInstanceManager().submit(false, true); widget.getInstanceManager().submit(false, true);
widget.clicked = false; widget.clicked = false;
$j(widget.getRoot().getWidgetById('preview_box').getDOMNode()) jQuery(widget.getRoot().getWidgetById('preview_box').getDOMNode())
.removeClass('loading'); .removeClass('loading');
},this)); },this));
return false; return false;
@ -160,7 +160,7 @@ app.classes.importexport = AppJS.extend(
} }
// A little highlight to call attention to the change // A little highlight to call attention to the change
$j('input[value="'+special+'"]',node).parent().parent().effect('highlight',{},500); jQuery('input[value="'+special+'"]',node).parent().parent().effect('highlight',{},500);
break; break;
} }
} }

View File

@ -60,7 +60,7 @@ app.classes.infolog = AppJS.extend(
var filter2 = nm.getWidgetById('filter2'); var filter2 = nm.getWidgetById('filter2');
this.show_details(filter2.value == 'all',nm.getDOMNode(nm)); this.show_details(filter2.value == 'all',nm.getDOMNode(nm));
// Remove the rule added by show_details() if the template is removed // Remove the rule added by show_details() if the template is removed
$j(_et2.DOMContainer).on('clear', function() {egw.css('#infolog-index_nm .et2_box.infoDes');}); jQuery(_et2.DOMContainer).on('clear', function() {egw.css('#infolog-index_nm .et2_box.infoDes');});
// Enable decrypt on hover // Enable decrypt on hover
if(this.egw.user('apps').stylite) if(this.egw.user('apps').stylite)
@ -89,7 +89,7 @@ app.classes.infolog = AppJS.extend(
// Decrypt history on hover // Decrypt history on hover
var history = this.et2.getWidgetById('history'); var history = this.et2.getWidgetById('history');
app.stylite.decrypt_hover(history,'span'); app.stylite.decrypt_hover(history,'span');
$j(history.getDOMNode(history)) jQuery(history.getDOMNode(history))
.tooltip('option','position',{my:'top left', at: 'top left', of: history.getDOMNode(history)}); .tooltip('option','position',{my:'top left', at: 'top left', of: history.getDOMNode(history)});
},this));},this)); },this));},this));
@ -298,7 +298,7 @@ app.classes.infolog = AppJS.extend(
{ {
for(var i = 0; i < _senders.length; i++) for(var i = 0; i < _senders.length; i++)
{ {
if ($j(_senders[i].iface.node).hasClass('infolog_rowHasSubs')) if (jQuery(_senders[i].iface.node).hasClass('infolog_rowHasSubs'))
{ {
children = true; children = true;
break; break;
@ -331,7 +331,7 @@ app.classes.infolog = AppJS.extend(
{ {
for(var i = 0; i < _senders.length; i++) for(var i = 0; i < _senders.length; i++)
{ {
if ($j(_senders[i].iface.getDOMNode()).hasClass('infolog_rowHasSubs')) if (jQuery(_senders[i].iface.getDOMNode()).hasClass('infolog_rowHasSubs'))
{ {
children = true; children = true;
break; break;
@ -422,7 +422,7 @@ app.classes.infolog = AppJS.extend(
if (completed != (status.value == 'done' || status.value == 'billed') || if (completed != (status.value == 'done' || status.value == 'billed') ||
(status.value == 'not-started') != (percent.value == 0)) (status.value == 'not-started') != (percent.value == 0))
{ {
status.value = percent.value == 0 ? ($j('[value="not-started"]',status).length ? 'not-started':'ongoing') : (percent.value == 100 ? 'done' : 'ongoing'); status.value = percent.value == 0 ? (jQuery('[value="not-started"]',status).length ? 'not-started':'ongoing') : (percent.value == 100 ? 'done' : 'ongoing');
} }
break; break;

View File

@ -106,7 +106,7 @@ app.classes.mail = AppJS.extend(
var nm = this.et2.getWidgetById(this.nm_index); var nm = this.et2.getWidgetById(this.nm_index);
if(nm != null) if(nm != null)
{ {
$j(nm).off('refresh'); jQuery(nm).off('refresh');
} }
} }
@ -175,7 +175,7 @@ app.classes.mail = AppJS.extend(
if(nm != null && (typeof jQuery._data(nm).events=='undefined'||typeof jQuery._data(nm).events.refresh == 'undefined')) if(nm != null && (typeof jQuery._data(nm).events=='undefined'||typeof jQuery._data(nm).events.refresh == 'undefined'))
{ {
var self = this; var self = this;
$j(nm).on('refresh',function() {self.mail_refreshFolderStatus.call(self,undefined,undefined,false);}); jQuery(nm).on('refresh',function() {self.mail_refreshFolderStatus.call(self,undefined,undefined,false);});
} }
var tree_wdg = this.et2.getWidgetById(this.nm_index+'[foldertree]'); var tree_wdg = this.et2.getWidgetById(this.nm_index+'[foldertree]');
if (tree_wdg) if (tree_wdg)
@ -763,7 +763,7 @@ app.classes.mail = AppJS.extend(
var widget = et2.getWidgetById(field.widget); var widget = et2.getWidgetById(field.widget);
if(widget == null) continue; if(widget == null) continue;
$j(widget.getDOMNode()).removeClass('visible'); jQuery(widget.getDOMNode()).removeClass('visible');
// Programatically build the child elements // Programatically build the child elements
if(field.build_children) if(field.build_children)
@ -811,8 +811,8 @@ app.classes.mail = AppJS.extend(
// Disable if only 1 address // Disable if only 1 address
content.length <=1 || ( content.length <=1 || (
// Disable if all content is visible // Disable if all content is visible
$j(widget.getDOMNode()).innerWidth() >= widget.getDOMNode().scrollWidth && jQuery(widget.getDOMNode()).innerWidth() >= widget.getDOMNode().scrollWidth &&
$j(widget.getDOMNode()).innerHeight() >= widget.getDOMNode().scrollHeight) jQuery(widget.getDOMNode()).innerHeight() >= widget.getDOMNode().scrollHeight)
); );
},this,et2_button); },this,et2_button);
} }
@ -1041,7 +1041,7 @@ app.classes.mail = AppJS.extend(
list.toggleClass('visible'); list.toggleClass('visible');
// Revert if user clicks elsewhere // Revert if user clicks elsewhere
$j('body').one('click', list, function(ev) { jQuery('body').one('click', list, function(ev) {
ev.data.removeClass('visible'); ev.data.removeClass('visible');
}); });
}, },
@ -1181,7 +1181,7 @@ app.classes.mail = AppJS.extend(
*/ */
drag_attachment: function(_action, _elems) drag_attachment: function(_action, _elems)
{ {
var div = $j(document.createElement("div")) var div = jQuery(document.createElement("div"))
.css({ .css({
position: 'absolute', position: 'absolute',
top: '0px', top: '0px',
@ -1191,7 +1191,7 @@ app.classes.mail = AppJS.extend(
var data = _elems[0].data || {}; var data = _elems[0].data || {};
var text = $j(document.createElement('div')).css({left: '30px', position: 'absolute'}); var text = jQuery(document.createElement('div')).css({left: '30px', position: 'absolute'});
// add filename or number of files for multiple files // add filename or number of files for multiple files
text.text(_elems.length > 1 ? _elems.length+' '+this.egw.lang('files') : data.name || ''); text.text(_elems.length > 1 ? _elems.length+' '+this.egw.lang('files') : data.name || '');
div.append(text); div.append(text);
@ -2991,7 +2991,7 @@ app.classes.mail = AppJS.extend(
// Check that the ID & interface is there. Paste is missing iface. // Check that the ID & interface is there. Paste is missing iface.
if (_actionObjects[i].id.length>0 && _actionObjects[i].iface) if (_actionObjects[i].id.length>0 && _actionObjects[i].iface)
{ {
var dataElem = $j(_actionObjects[i].iface.getDOMNode()); var dataElem = jQuery(_actionObjects[i].iface.getDOMNode());
dataElem.addClass(_class); dataElem.addClass(_class);
} }
@ -3044,7 +3044,7 @@ app.classes.mail = AppJS.extend(
{ {
if (_actionObjects[i].id.length>0) if (_actionObjects[i].id.length>0)
{ {
var dataElem = $j(_actionObjects[i].iface.getDOMNode()); var dataElem = jQuery(_actionObjects[i].iface.getDOMNode());
dataElem.removeClass(_class); dataElem.removeClass(_class);
} }

View File

@ -85,7 +85,7 @@
egwpopup_message.innerHTML = notifymessages[show]; egwpopup_message.innerHTML = notifymessages[show];
// Activate links // Activate links
$j('div[data-id],div[data-url]', egwpopup_message).on('click', jQuery('div[data-id],div[data-url]', egwpopup_message).on('click',
function() { function() {
if(this.dataset.id) if(this.dataset.id)
{ {

Some files were not shown because too many files have changed in this diff Show More