* jQuery: changed $ to $j to work around mootools use in Joomla templates and other js code in imported projects

required to change $ --> $j:
phpgwapi/*
jdots/*
etemplate/*
stylite/*
felamimail/*
admin/*
news_admin/*
projectmanager/*
importexport/*
infolog/*
ranking/*

required, but not automatic:
importexport/setup/etemplates.inc.php
phpgwapi/js/jquery/*

negative, not to touch or revert later:
phpgwapi/inc/savant2/Savant2/Savant2_Compiler_basic.php:		'(\$(.+))'            => 'print $1',
phpgwapi/js/dhtmlxtree/libCompiler/core.js
sitemgr/*
phpfreechat/*
gallery/*
activesync/include/smb.php:        '^\tIPC\\\$(.*)[ ]+IPC' => 'skip',
etemplate/inc/class.bo_merge.inc.php: if ($this->table_plugins && preg_match_all('/\\$\\$table\\/([A-Za-z0-9_]+)\\$\\$(.*?)\\$\\$endtable\\$\\$/s',$content,$matches,PREG_SET_ORDER))

find phpgwapi jdots etemplate stylite felamimail admin news_admin projectmanager importexport infolog ranking \
	\( -name '*.php' -o -name '*.js' \) -exec grep -q '\$(' {} \; -print \
	-exec sed -i '' 's|\$(|$j(|g' {} \;
svn revert phpgwapi/inc/savant2/Savant2/Savant2_Compiler_basic.php phpgwapi/js/dhtmlxtree/libCompiler/core.js \
	importexport/setup/etemplates.inc.php phpgwapi/js/jquery/jquery.js etemplate/inc/class.bo_merge.inc.php
	
additional changes:
phpgwapi/js/jquery/jquery.js:	window.$ --> window.$j
phpgwapi/js/egw_json.js:291	this.request = $j.ajax({url: this.url,
jdots/templates/jdots/head.tpl:59			$j(document).ready(function() {
phpgwapi/js/egw_action/egw_grid_view.js: $.browser --> $j.browser
importexport/setup/etemplates.inc.php: etemplate editor importexport.wizard_basic_export_csv.choose_fields onclick of check icon changed
phpgwapi/js/egw_action/tests/*.html
phpgwapi/js/egw_action/tests/js/jquery.js:	window.$ --> window.$j
This commit is contained in:
Ralf Becker 2011-07-03 09:00:36 +00:00
parent a7aef6a4da
commit 03e379e570
19 changed files with 130 additions and 130 deletions

View File

@ -246,7 +246,7 @@ class admin_categories
}
egw_framework::validate_file('.','global_categories','admin');
egw_framework::set_onload('$(document).ready(function() {
egw_framework::set_onload('$j(document).ready(function() {
cat_original_owner = [' . ($content['owner'] ? $content['owner'] : ($content['id'] ? '0' : '')) .'];
permission_prompt = \'' . lang('Removing access for groups may cause problems for data in this category. Are you sure? Users in these groups may no longer have access:').'\';
});');

View File

@ -10,14 +10,14 @@ var permission_prompt;
* Check to see if admin has taken away access to a category
*/
function check_owner(element_id) {
var checkboxes = $(':checkbox', document.getElementById(element_id));
var all_users = $(document.getElementById(element_id + '[0]'));
var checkboxes = $j(':checkbox', document.getElementById(element_id));
var all_users = $j(document.getElementById(element_id + '[0]'));
// If they checked all users, uncheck the others
if(all_users.length > 0 && all_users.attr("checked")) {
checkboxes.attr("checked",false);
all_users.attr("checked", true);
checkboxes = $(':checkbox', document.getElementById(element_id)).filter(':checked');
checkboxes = $j(':checkbox', document.getElementById(element_id)).filter(':checked');
return true;
}
@ -27,17 +27,17 @@ function check_owner(element_id) {
var checkbox = checkboxes.filter('[value="'+cat_original_owner[i]+'"]');
if(checkbox.filter(':checked').length == 0 && checkbox.get(0) != undefined) {
diff.push(cat_original_owner[i]);
labels.push($(checkbox.get(0).nextSibling).text());
labels.push($j(checkbox.get(0).nextSibling).text());
}
}
// Single selection?
if(checkboxes.length == 0) {
var new_group = $(document.getElementById(element_id));
var new_group = $j(document.getElementById(element_id));
if(new_group.attr('value') != 0 && cat_original_owner.length > 0) {
diff.push(cat_original_owner[0]);
var selector = 'option[value="'+cat_original_owner[0]+'"]';
labels.push("\n"+$(selector, new_group).text());
labels.push("\n"+$j(selector, new_group).text());
}
}

View File

@ -890,7 +890,7 @@ class nextmatch_widget
return '
<script type="text/javascript">
$(document).ready(function() {
$j(document).ready(function() {
// Initialize the action manager and add some actions to it
var actionManager = egw_getActionManager("'.$app.'");
var objectManager = egw_getObjectManager("'.$app.'");
@ -909,7 +909,7 @@ class nextmatch_widget
// Create a new action object for each table row
var divObj = document.getElementById("'.$template_name.'");
$("table.egwGridView_grid>tbody>tr", divObj).each(function(index, elem)
$j("table.egwGridView_grid>tbody>tr", divObj).each(function(index, elem)
{
// Create a new action object
if (elem.id) {

View File

@ -29,7 +29,7 @@ function nextmatchRowAOI(_node, _selectMode)
aoi.node = _node;
aoi.selectMode = _selectMode;
aoi.checkBox = ($(":checkbox", aoi.node))[0];
aoi.checkBox = ($j(":checkbox", aoi.node))[0];
// Rows without a checkbox OR an id set are unselectable
if (typeof aoi.checkBox != "undefined" || _node.id)
@ -40,7 +40,7 @@ function nextmatchRowAOI(_node, _selectMode)
// Prevent the browser from selecting the content of the element, when
// a special key is pressed.
$(_node).mousedown(egwPreventSelect);
$j(_node).mousedown(egwPreventSelect);
// Now append some action code to the node
selectHandler = function(e) {
@ -76,15 +76,15 @@ function nextmatchRowAOI(_node, _selectMode)
if (egwIsMobile()) {
_node.ontouchend = selectHandler;
} else {
$(_node).click(selectHandler);
$j(_node).click(selectHandler);
}
$(aoi.checkBox).change(function() {
$j(aoi.checkBox).change(function() {
aoi.updateState(EGW_AO_STATE_SELECTED, this.checked, EGW_AO_SHIFT_STATE_MULTI);
});
// Don't execute the default action when double clicking on an entry
$(aoi.checkBox).dblclick(function() {
$j(aoi.checkBox).dblclick(function() {
return false;
});
@ -96,9 +96,9 @@ function nextmatchRowAOI(_node, _selectMode)
this.checkBox.checked = selected;
}
$(this.node).toggleClass('focused',
$j(this.node).toggleClass('focused',
egwBitIsSet(_state, EGW_AO_STATE_FOCUSED));
$(this.node).toggleClass('selected',
$j(this.node).toggleClass('selected',
selected);
}
}
@ -235,7 +235,7 @@ function nm_action(_action, _senders)
*/
function nm_not_disableClass(_action, _senders, _target)
{
return !$(_target.iface.getDOMNode()).hasClass(_action.data.disableClass);
return !$j(_target.iface.getDOMNode()).hasClass(_action.data.disableClass);
}
/**
@ -248,7 +248,7 @@ function nm_not_disableClass(_action, _senders, _target)
*/
function nm_enableClass(_action, _senders, _target)
{
return $(_target.iface.getDOMNode()).hasClass(_action.data.enableClass);
return $j(_target.iface.getDOMNode()).hasClass(_action.data.enableClass);
}
/**
@ -283,7 +283,7 @@ function nm_compare_field(_action, _senders, _target)
if (!field) return false;
var value = $(field).val();
var value = $j(field).val();
if (_action.data.fieldValue.substr(0,1) == '!')
return value != _action.data.fieldValue.substr(1);
@ -346,9 +346,9 @@ function nm_hide_popup(element, div_id)
*/
function nm_activate_link(_action, _senders)
{
// $(_senders[0].iface.getDOMNode()).find('a:first').trigger('click'); not sure why this is NOT working
// $j(_senders[0].iface.getDOMNode()).find('a:first').trigger('click'); not sure why this is NOT working
var a_href = $(_senders[0].iface.getDOMNode()).find('a:first');
var a_href = $j(_senders[0].iface.getDOMNode()).find('a:first');
if (typeof a_href != undefined)
{

View File

@ -161,7 +161,7 @@ if(actionMgr && objectMgr && win.egwAction) {
if(objectMgr.selectedChildren.length == 0) {
// Be nice and select all, if they forgot to select any
if(actionMgr.getActionById(\'select_all\')) {
var total = parseInt($(\'span#total\',actionMgr.etemplate_form).text());
var total = parseInt($j(\'span#total\',actionMgr.etemplate_form).text());
if(total > 0) {
actionMgr.getActionById(\'select_all\').set_checked(true);
toggle_select = true;

View File

@ -2,7 +2,7 @@
/**
* EGroupware - eTemplates for Application importexport
* http://www.egroupware.org
* generated by soetemplate::dump4setup() 2011-06-17 16:01
* generated by soetemplate::dump4setup() 2011-07-03 10:45
*
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @package importexport
@ -106,7 +106,7 @@ $templ_data[] = array('name' => 'importexport.wizardbox','template' => '','lang'
$templ_data[] = array('name' => 'importexport.wizard_basic_export_csv.choosesepncharset','template' => '','lang' => '','group' => '0','version' => '1.9.001','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:6:{i:0;a:1:{s:1:"B";s:5:"180px";}i:1;a:2:{s:1:"A";a:4:{s:4:"type";s:5:"label";s:7:"no_lang";s:1:"1";s:4:"name";s:3:"msg";s:4:"span";s:3:"all";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:2;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:14:"Fieldseperator";}s:1:"B";a:4:{s:4:"type";s:4:"text";s:7:"no_lang";s:1:"1";s:4:"name";s:9:"delimiter";s:4:"size";s:1:"1";}}i:3;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:15:"Charset of file";}s:1:"B";a:4:{s:4:"type";s:6:"select";s:7:"no_lang";s:1:"1";s:4:"name";s:7:"charset";s:4:"span";s:9:",width180";}}i:4;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:14:"Include header";}s:1:"B";a:2:{s:4:"type";s:6:"select";s:4:"name";s:21:"begin_with_fieldnames";}}i:5;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:14:"Export data as";}s:1:"B";a:2:{s:4:"type";s:6:"select";s:4:"name";s:7:"convert";}}}s:4:"rows";i:5;s:4:"cols";i:2;}}','size' => '','style' => '.width180 select { width:150px;}','modified' => '1286480442',);
$templ_data[] = array('name' => 'importexport.wizard_basic_export_csv.choose_fields','template' => '','lang' => '','group' => '0','version' => '1.9.001','data' => 'a:1:{i:0;a:5:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:0:{}i:1;a:1:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"span";s:3:"all";s:4:"name";s:3:"msg";}}i:2;a:1:{s:1:"A";a:7:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:1:{s:2:"c1";s:2:"th";}i:1;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:5:"Field";}s:1:"B";a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";i:1;a:2:{s:4:"type";s:5:"label";s:5:"label";s:6:"Export";}i:2;a:7:{s:4:"type";s:10:"buttononly";s:4:"size";s:5:"check";s:5:"label";s:9:"Check all";s:4:"name";s:9:"check_all";s:4:"help";s:9:"Check all";s:7:"onclick";s:88:"$(\'input:checkbox\').attr(\'checked\', !$(\'input:checkbox\').attr(\'checked\')); return false;";s:6:"needed";s:1:"1";}}}i:2;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"name";s:12:"${row}[name]";s:7:"no_lang";s:1:"1";}s:1:"B";a:4:{s:4:"type";s:8:"checkbox";s:7:"no_lang";s:1:"1";s:4:"name";s:14:"export[${row}]";s:4:"size";s:18:"{$row_cont[field]}";}}}s:4:"rows";i:2;s:4:"cols";i:2;s:4:"size";s:10:",,,,,,auto";s:4:"name";s:6:"fields";s:7:"options";a:1:{i:6;s:4:"auto";}}}}s:4:"rows";i:2;s:4:"cols";i:1;s:7:"options";a:0:{}}}','size' => '','style' => '','modified' => '1286466690',);
$templ_data[] = array('name' => 'importexport.wizard_basic_export_csv.choose_fields','template' => '','lang' => '','group' => '0','version' => '1.9.001','data' => 'a:1:{i:0;a:5:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:0:{}i:1;a:1:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"span";s:3:"all";s:4:"name";s:3:"msg";}}i:2;a:1:{s:1:"A";a:7:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:1:{s:2:"c1";s:2:"th";}i:1;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:5:"Field";}s:1:"B";a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";i:1;a:2:{s:4:"type";s:5:"label";s:5:"label";s:6:"Export";}i:2;a:7:{s:4:"type";s:10:"buttononly";s:4:"size";s:5:"check";s:5:"label";s:9:"Check all";s:4:"name";s:9:"check_all";s:4:"help";s:9:"Check all";s:7:"onclick";s:90:"$j(\'input:checkbox\').attr(\'checked\', !$j(\'input:checkbox\').attr(\'checked\')); return false;";s:6:"needed";s:1:"1";}}}i:2;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"name";s:12:"${row}[name]";s:7:"no_lang";s:1:"1";}s:1:"B";a:4:{s:4:"type";s:8:"checkbox";s:7:"no_lang";s:1:"1";s:4:"name";s:14:"export[${row}]";s:4:"size";s:18:"{$row_cont[field]}";}}}s:4:"rows";i:2;s:4:"cols";i:2;s:4:"size";s:10:",,,,,,auto";s:4:"name";s:6:"fields";s:7:"options";a:1:{i:6;s:4:"auto";}}}}s:4:"rows";i:2;s:4:"cols";i:1;s:7:"options";a:0:{}}}','size' => '','style' => '','modified' => '1286466690',);
$templ_data[] = array('name' => 'importexport.wizard_basic_import_csv.choosesepncharset','template' => '','lang' => '','group' => '0','version' => '1.9.001','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:6:{i:0;a:2:{s:1:"B";s:5:"180px";s:2:"h5";s:9:",@no_cats";}i:1;a:2:{s:1:"A";a:4:{s:4:"type";s:5:"label";s:7:"no_lang";s:1:"1";s:4:"name";s:3:"msg";s:4:"span";s:3:"all";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:2;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:14:"Fieldseperator";}s:1:"B";a:4:{s:4:"type";s:4:"text";s:7:"no_lang";s:1:"1";s:4:"name";s:8:"fieldsep";s:4:"size";s:1:"1";}}i:3;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:15:"Charset of file";}s:1:"B";a:4:{s:4:"type";s:6:"select";s:7:"no_lang";s:1:"1";s:4:"name";s:7:"charset";s:4:"span";s:9:",width180";}}i:4;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:20:"Header lines to skip";}s:1:"B";a:3:{s:4:"type";s:3:"int";s:4:"name";s:16:"num_header_lines";s:4:"size";s:1:"0";}}i:5;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:17:"Update categories";}s:1:"B";a:2:{s:4:"type";s:6:"select";s:4:"name";s:11:"update_cats";}}}s:4:"rows";i:5;s:4:"cols";i:2;}}','size' => '','style' => '.width180 select { width:150px;}','modified' => '1287425796',);

View File

@ -20,7 +20,7 @@ function confirm_delete(_action, _senders)
var child_button = document.getElementById(egw_globalObjectManager.getObjectById('infolog.index.rows').etemplate_var_prefix+'[delete_sub]');
if(child_button) {
for(var i = 0; i < _senders.length; i++) {
if ($(_senders[i].iface.node).hasClass('rowHasSubs')) {
if ($j(_senders[i].iface.node).hasClass('rowHasSubs')) {
children = true;
break;
}

View File

@ -149,7 +149,7 @@ class jscalendar
{
inputField : "'.$name.'",'.(!$useicon ? '' : '
button : "'.$name.'-trigger"').',
onUpdate : function(){var input = document.getElementById("'.$name.'"); $(input).change(); }
onUpdate : function(){var input = document.getElementById("'.$name.'"); $j(input).change(); }
}
);
</script>

View File

@ -87,7 +87,7 @@ function egwDragActionImplementation()
return false;
};
$(node).draggable(
$j(node).draggable(
{
"distance": 20,
"cursor": "move",
@ -102,8 +102,8 @@ function egwDragActionImplementation()
// and the multiple dragDropTypes (ai.ddTypes)
_callback.call(_context, false, ai);
$(node).data("ddTypes", ai.ddTypes);
$(node).data("selected", ai.selected);
$j(node).data("ddTypes", ai.ddTypes);
$j(node).data("selected", ai.selected);
if (ai.helper)
{
@ -111,12 +111,12 @@ function egwDragActionImplementation()
// fixes a bug in IE: If the element isn't inserted into
// the DOM-tree jquery appends it to the parent node.
// In case this is a table it doesn't work correctly
$("body").append(ai.helper);
$j("body").append(ai.helper);
return ai.helper;
}
// Return an empty div if the helper dom node is not set
return $(document.createElement("div"));
return $j(document.createElement("div"));
},
"start": function(e) {
return ai.helper != null;
@ -140,7 +140,7 @@ function egwDragActionImplementation()
var node = _aoi.getDOMNode();
if (node) {
$(node).draggable("destroy");
$j(node).draggable("destroy");
}
}
@ -185,7 +185,7 @@ function egwDragActionImplementation()
// If no helper has been defined, create an default one
if (!this.helper && hasLink)
{
this.helper = $(document.createElement("div"));
this.helper = $j(document.createElement("div"));
this.helper.addClass("egw_action_ddHelper");
this.helper.text("(" + _selected.length + ")");
}
@ -274,7 +274,7 @@ function egwDropActionImplementation()
if (node)
{
$(node).droppable(
$j(node).droppable(
{
"accept": function(_draggable) {
if (typeof _draggable.data("ddTypes") != "undefined")
@ -378,7 +378,7 @@ function egwDropActionImplementation()
var node = _aoi.getDOMNode();
if (node) {
$(node).droppable("destroy");
$j(node).droppable("destroy");
}
}

View File

@ -131,7 +131,7 @@ function egwPopupActionImplementation()
}
if (egwIsMobile()) {
$(_node).bind('click', defaultHandler);
$j(_node).bind('click', defaultHandler);
} else {
_node.ondblclick = defaultHandler;
}
@ -238,7 +238,7 @@ function egwPopupActionImplementation()
}
if (egwIsMobile()) {
$(_node).bind('taphold', contextHandler);
$j(_node).bind('taphold', contextHandler);
} else {
_node.oncontextmenu = contextHandler;
}
@ -285,8 +285,8 @@ function egwPopupActionImplementation()
// Calculate context menu position from the given DOM-Node
var node = _context;
x = $(node).offset().left;
y = $(node).offset().top;
x = $j(node).offset().left;
y = $j(node).offset().top;
_context = {"posx": x, "posy": y}
}

View File

@ -21,7 +21,7 @@ function dhtmlxTree_getNode(_tree, _itemId) {
{
// Get the outer html table node of the tree node - return the first
// "tr" child of the element
return $("tr:first", node.htmlNode);
return $j("tr:first", node.htmlNode);
}
}
@ -41,11 +41,11 @@ function dhtmlxtreeItemAOI(_tree, _itemId)
aoi.doTriggerEvent = function(_event) {
if (_event == EGW_AI_DRAG_OVER)
{
$(this.node).addClass("draggedOver");
$j(this.node).addClass("draggedOver");
}
if (_event == EGW_AI_DRAG_OUT)
{
$(this.node).removeClass("draggedOver");
$j(this.node).removeClass("draggedOver");
}
}

View File

@ -76,7 +76,7 @@ var EGW_UNIQUE_COUNTER = 0;
function egwGridViewOuter(_parentNode, _dataRoot, _selectColsCallback, _toggleAllCallback,
_sortColsCallback, _context)
{
this.parentNode = $(_parentNode);
this.parentNode = $j(_parentNode);
this.dataRoot = _dataRoot;
EGW_UNIQUE_COUNTER++;
@ -217,11 +217,11 @@ egwGridViewOuter.prototype.updateColumns = function(_columns)
// Ugly browser dependant code - each browser seems to treat the
// right (collapsed) border of the row differently
var addBorder = 0;
if ($.browser.mozilla || ($.browser.webkit && !first))
if ($j.browser.mozilla || ($j.browser.webkit && !first))
{
addBorder = 1;
}
if (($.browser.msie || $.browser.opera) && first)
if (($j.browser.msie || $j.browser.opera) && first)
{
addBorder = -1;
}
@ -276,12 +276,12 @@ egwGridViewOuter.prototype.buildBase = function()
</table>
*/
this.outer_table = $(document.createElement("table"));
this.outer_table = $j(document.createElement("table"));
this.outer_table.addClass("egwGridView_outer");
this.outer_thead = $(document.createElement("thead"));
this.outer_tbody = $(document.createElement("tbody"));
this.outer_tr = $(document.createElement("tr"));
this.outer_head_tr = $(document.createElement("tr"));
this.outer_thead = $j(document.createElement("thead"));
this.outer_tbody = $j(document.createElement("tbody"));
this.outer_tr = $j(document.createElement("tr"));
this.outer_head_tr = $j(document.createElement("tr"));
this.outer_table.append(this.outer_thead, this.outer_tbody);
this.outer_tbody.append(this.outer_tr);
@ -294,7 +294,7 @@ egwGridViewOuter.prototype.updateColSortmode = function(_colIdx, _sortArrow)
{
if (typeof _sortArrow == "undefined")
{
_sortArrow = $("span.sort", this.headerColumns[_colIdx]);
_sortArrow = $j("span.sort", this.headerColumns[_colIdx]);
}
var col = this.columns[_colIdx];
@ -328,29 +328,29 @@ egwGridViewOuter.prototype.buildBaseHeader = function()
var col = this.columns[i];
// Create the column element and insert it into the DOM-Tree
var column = $(document.createElement("th"));
var column = $j(document.createElement("th"));
column.addClass(col.tdClass);
this.headerColumns.push(column);
var cont = $(document.createElement("div"));
var cont = $j(document.createElement("div"));
cont.addClass("innerContainer");
cont.addClass(col.divClass);
if (col.type == EGW_COL_TYPE_CHECKBOX)
{
this.checkbox = $(document.createElement("input"));
this.checkbox = $j(document.createElement("input"));
this.checkbox.attr("type", "checkbox");
this.checkbox.change(this, function(e) {
// Call the toggle all callback
if (e.data.toggleAllCallback)
{
e.data.toggleAllCallback.call(e.data.context, $(this).is(":checked"));
e.data.toggleAllCallback.call(e.data.context, $j(this).is(":checked"));
}
});
cont.append(this.checkbox);
} else {
var caption = $(document.createElement("span"));
var caption = $j(document.createElement("span"));
caption.html(col.caption);
cont.append(caption);
@ -358,7 +358,7 @@ egwGridViewOuter.prototype.buildBaseHeader = function()
if (col.type != EGW_COL_TYPE_CHECKBOX && col.sortable != EGW_COL_SORTABLE_NONE)
{
var sortArrow = $(document.createElement("span"));
var sortArrow = $j(document.createElement("span"));
sortArrow.addClass("sort");
cont.append(sortArrow);
@ -379,11 +379,11 @@ egwGridViewOuter.prototype.buildBaseHeader = function()
}
// Build the "select columns" icon
this.selectcols = $(document.createElement("span"));
this.selectcols = $j(document.createElement("span"));
this.selectcols.addClass("selectcols");
// Build the option column
this.optcol = $(document.createElement("th"));
this.optcol = $j(document.createElement("th"));
this.optcol.addClass("optcol");
this.optcol.append(this.selectcols);
@ -408,9 +408,9 @@ egwGridViewOuter.prototype.getScrollbarWidth = function()
if (EGW_GRID_SCROLLBAR_WIDTH === false)
{
// Create a temporary td and two div, which are inserted into the dom-tree
var td = $(document.createElement("td"));
var div_outer = $(document.createElement("div"));
var div_inner = $(document.createElement("div"));
var td = $j(document.createElement("td"));
var div_outer = $j(document.createElement("div"));
var div_inner = $j(document.createElement("div"));
// 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.
@ -423,10 +423,10 @@ egwGridViewOuter.prototype.getScrollbarWidth = function()
// Clone the outer table and insert it into the top window (which should)
// always be visible.
var clone = this.outer_table.clone();
var top_body = $(window.top.document.getElementsByTagName("body")[0]);
var top_body = $j(window.top.document.getElementsByTagName("body")[0]);
top_body.append(clone);
$("tbody tr", clone).append(td);
$j("tbody tr", clone).append(td);
td.append(div_outer);
div_outer.append(div_inner);
@ -448,20 +448,20 @@ egwGridViewOuter.prototype.getScrollbarWidth = function()
if (EGW_GRID_HEADER_BORDER_WIDTH === false)
{
// Create a temporary th which is appended to the outer thead row
var cont = $(document.createElement("div"));
var cont = $j(document.createElement("div"));
cont.addClass("innerContainer");
var th = $(document.createElement("th"));
var th = $j(document.createElement("th"));
th.append(cont);
// Clone the outer table and insert it into the top window (which should)
// always be visible.
var clone = this.outer_table.clone();
var top_body = $(window.top.document.getElementsByTagName("body")[0]);
var top_body = $j(window.top.document.getElementsByTagName("body")[0]);
top_body.append(clone);
// Insert the th into the document tree
$("thead tr", clone).append(th);
$j("thead tr", clone).append(th);
// Calculate the total border width
EGW_GRID_HEADER_BORDER_WIDTH = th.outerWidth(true) - cont.width();
@ -481,19 +481,19 @@ egwGridViewOuter.prototype.getColumnBorderWidth = function()
if (EGW_GRID_COLUMN_BORDER_WIDTH === false)
{
// Create a temporary td which is appended to the outer tbody row
var cont = $(document.createElement("div"));
var cont = $j(document.createElement("div"));
cont.addClass("innerContainer");
var td = $(document.createElement("td"));
var td = $j(document.createElement("td"));
td.append(cont);
// Insert the th into the document tree
var clone = this.outer_table.clone();
var top_body = $(window.top.document.getElementsByTagName("body")[0]);
var top_body = $j(window.top.document.getElementsByTagName("body")[0]);
top_body.append(clone);
clone.addClass("egwGridView_grid");
$("tbody tr", clone).append(td);
$j("tbody tr", clone).append(td);
// Calculate the total border width
EGW_GRID_COLUMN_BORDER_WIDTH = td.outerWidth(true) - cont.width();
@ -568,7 +568,7 @@ egwGridViewContainer.prototype.setVisible = function(_visible, _force)
if ((_visible != this.visible || _force) && this.parentNode)
{
$(this.parentNode).toggleClass("hidden", !_visible);
$j(this.parentNode).toggleClass("hidden", !_visible);
if (_visible)
{
@ -607,7 +607,7 @@ egwGridViewContainer.prototype.insertIntoDOM = function(_parentNode, _columns)
{
// Copy the function arguments
this.columns = _columns;
this.parentNode = $(_parentNode);
this.parentNode = $j(_parentNode);
// Call the interface function of the implementation which will insert its data
// into the parent node.
@ -678,7 +678,7 @@ egwGridViewContainer.prototype.setPosition = function(_top)
* of the mostly called functions in the whole grid code and should stay
* quite fast.
*/
if ($.browser.mozilla)
if ($j.browser.mozilla)
{
egwGridViewContainer.prototype.getHeight = function(_update)
{
@ -1009,12 +1009,12 @@ function egwGridViewGrid_setupContainer()
</td>
*/
this.outerNode = $(document.createElement("td"));
this.outerNode = $j(document.createElement("td"));
this.outerNode.addClass("frame");
if (this.scrollable)
{
this.scrollarea = $(document.createElement("div"));
this.scrollarea = $j(document.createElement("div"));
this.scrollarea.addClass("egwGridView_scrollarea");
this.scrollarea.css("height", this.scrollHeight + "px");
this.scrollarea.scroll(this, function(e) {
@ -1026,10 +1026,10 @@ function egwGridViewGrid_setupContainer()
});
}
var table = $(document.createElement("table"));
var table = $j(document.createElement("table"));
table.addClass("egwGridView_grid");
this.innerNode = $(document.createElement("tbody"));
this.innerNode = $j(document.createElement("tbody"));
if (this.scrollable)
{
@ -1174,7 +1174,7 @@ function egwGridViewGrid_insertContainer(_after, _class, _params)
this.children.splice(idx, 0, container);
// Create a table row for that element
var tr = $(document.createElement("tr"));
var tr = $j(document.createElement("tr"));
// Insert the table row after the container specified in the _after parameter
// and set the top position of the node
@ -1552,10 +1552,10 @@ function egwGridViewRow_doInsertIntoDOM()
{
var col = this.columns[i];
var td = $(document.createElement("td"));
var td = $j(document.createElement("td"));
td.addClass(col.tdClass);
var cont = $(document.createElement("div"));
var cont = $j(document.createElement("div"));
cont.addClass(col.divClass);
cont.addClass("innerContainer");
@ -1565,7 +1565,7 @@ function egwGridViewRow_doInsertIntoDOM()
td.mousedown(egwPreventSelect);
if (col.type == EGW_COL_TYPE_CHECKBOX)
{
this.checkbox = $(document.createElement("input"));
this.checkbox = $j(document.createElement("input"));
this.checkbox.attr("type", "checkbox");
this.checkbox.attr("checked", egwBitIsSet(this.aoi.getState(),
EGW_AO_STATE_SELECTED));
@ -1663,20 +1663,20 @@ function egwGridViewRow_doUpdateData(_immediate)
if (depth > 0)
{
// Build the indentation object
var indentation = $(document.createElement("span"));
var indentation = $j(document.createElement("span"));
indentation.addClass("indentation");
indentation.css("width", (depth * 20) + "px");
cont.append(indentation);
}
// Insert the open/close arrow
var arrow = $(document.createElement("span"));
var arrow = $j(document.createElement("span"));
arrow.addClass("arrow");
if (this.item.canHaveChildren)
{
arrow.addClass(this.item.opened ? "opened" : "closed");
arrow.click(this, function(e) {
$this = $(this);
$this = $j(this);
if (!e.data.opened)
{
@ -1701,7 +1701,7 @@ function egwGridViewRow_doUpdateData(_immediate)
if (data[col.id].iconUrl)
{
// Build the icon container
var iconContainer = $(document.createElement("span"));
var iconContainer = $j(document.createElement("span"));
iconContainer.addClass("iconContainer " + this.grid.uniqueId);
// Default the iconContainer height to the average height - this attribute
@ -1709,10 +1709,10 @@ function egwGridViewRow_doUpdateData(_immediate)
iconContainer.css("min-height", this.grid.avgIconHeight + "px");
// Build the icon
var overlayCntr = $(document.createElement("span"));
var overlayCntr = $j(document.createElement("span"));
overlayCntr.addClass("iconOverlayContainer");
var icon = $(document.createElement("img"));
var icon = $j(document.createElement("img"));
if (this.item.iconSize)
{
icon.css("height", this.item.iconSize + "px");
@ -1720,7 +1720,7 @@ function egwGridViewRow_doUpdateData(_immediate)
}
icon.load({"item": this, "cntr": iconContainer}, function(e) {
e.data.cntr.css("min-height", "");
var icon = $(this);
var icon = $j(this);
window.setTimeout(function() {
e.data.item.grid.setIconWidth(icon.width());
e.data.item.grid.addIconHeightToAvg(icon.height());
@ -1734,11 +1734,11 @@ function egwGridViewRow_doUpdateData(_immediate)
if (this.item.iconOverlay.length > 0)
{
var overlayCntr2 = $(document.createElement("span"));
var overlayCntr2 = $j(document.createElement("span"));
overlayCntr2.addClass("overlayContainer");
for (var i = 0; i < this.item.iconOverlay.length; i++)
{
var overlay = $(document.createElement("img"));
var overlay = $j(document.createElement("img"));
overlay.addClass("overlay");
overlay.attr("src", this.item.iconOverlay[i]);
overlayCntr2.append(overlay);
@ -1754,7 +1754,7 @@ function egwGridViewRow_doUpdateData(_immediate)
// Build the caption
if (data[col.id].caption)
{
var caption = $(document.createElement("span"));
var caption = $j(document.createElement("span"));
caption.addClass("caption");
caption.html(data[col.id].caption);
cont.append(caption);
@ -1819,7 +1819,7 @@ function egwGridViewRow_setOpen(_open, _force)
if (!this.childGrid)
{
// Get the arrow and put it to "loading" state
var arrow = $(".arrow", this.parentNode);
var arrow = $j(".arrow", this.parentNode);
arrow.removeClass("closed");
arrow.addClass("loading");
@ -1918,7 +1918,7 @@ function egwGridViewSpacer_setItemList(_items)
*/
function egwGridViewSpacer_doInsertIntoDOM()
{
this.domNode = $(document.createElement("td"));
this.domNode = $j(document.createElement("td"));
this.domNode.addClass("egwGridView_spacer");
this.domNode.addClass(this.grid.getOuter().uniqueId + "_spacer_fullRow");
this.domNode.css("height", (this.items.length * this.itemHeight) + "px");
@ -2026,10 +2026,10 @@ function egwGridViewFullRow_doInsertIntoDOM()
this.item.setGridViewObj(this);
}
var td = this.td = $(document.createElement("td"));
var td = this.td = $j(document.createElement("td"));
td.attr("colspan", this.columns.length);
var cont = this.cont = $(document.createElement("div"));
var cont = this.cont = $j(document.createElement("div"));
cont.addClass("innerContainer");
cont.addClass(this.grid.getOuter().uniqueId + '_div_fullRow');
@ -2052,14 +2052,14 @@ function egwGridViewFullRow_doUpdateData(_immediate)
if (depth > 0)
{
// Build the indentation object
var indentation = $(document.createElement("span"));
var indentation = $j(document.createElement("span"));
indentation.addClass("indentation");
indentation.css("width", (depth * 20) + "px");
this.cont.append(indentation);
}
// Insert the caption
var caption = $(document.createElement("span"));
var caption = $j(document.createElement("span"));
caption.addClass("caption");
caption.html(this.item.caption);
this.cont.append(caption);

View File

@ -142,11 +142,11 @@ function _egw_nodeIsInInput(_node)
/**
* Register the onkeypress handler on the document
*/
$(document).ready(function() {
$j(document).ready(function() {
// Fetch the key down event and translate it into browser-independent and
// easy to use key codes and shift states
$(document).keydown( function(e) {
$j(document).keydown( function(e) {
// Translate the given key code and make it valid
var keyCode = e.which;

View File

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

View File

@ -89,7 +89,7 @@
var actionManager = null;
var objectManager = null;
$(document).ready(function() {
$j(document).ready(function() {
init();
});
@ -100,7 +100,7 @@
var aoi = new egwActionObjectInterface();
aoi.node = _node;
aoi.checkBox = ($(":checkbox", aoi.node))[0];
aoi.checkBox = ($j(":checkbox", aoi.node))[0];
aoi.checkBox.checked = false;
aoi.doGetDOMNode = function() {
@ -116,7 +116,7 @@
}
// Now append some action code to the node
$(_node).click(function(e) {
$j(_node).click(function(e) {
if (e.target != aoi.checkBox)
{
var selected = egwBitIsSet(aoi.getState(), EGW_AO_STATE_SELECTED);
@ -133,27 +133,27 @@
}
});
$(aoi.checkBox).change(function() {
$j(aoi.checkBox).change(function() {
aoi.updateState(EGW_AO_STATE_SELECTED, this.checked, EGW_AO_SHIFT_STATE_MULTI);
});
aoi.doTriggerEvent = function(_event) {
if (_event == EGW_AI_DRAG_OVER)
{
$(this.node).addClass("draggedOver");
$j(this.node).addClass("draggedOver");
}
if (_event == EGW_AI_DRAG_OUT)
{
$(this.node).removeClass("draggedOver");
$j(this.node).removeClass("draggedOver");
}
}
aoi.doSetState = function(_state) {
var selected = egwBitIsSet(_state, EGW_AO_STATE_SELECTED);
this.checkBox.checked = selected;
$(this.node).toggleClass('focused',
$j(this.node).toggleClass('focused',
egwBitIsSet(_state, EGW_AO_STATE_FOCUSED));
$(this.node).toggleClass('selected',
$j(this.node).toggleClass('selected',
selected);
}
@ -178,7 +178,7 @@
text.push(_senders[i].id);
}
return $("<div class=\"ddhelper\">" + _senders.length + " (" + text.join(", ") + ") Elements selected </div>")
return $j("<div class=\"ddhelper\">" + _senders.length + " (" + text.join(", ") + ") Elements selected </div>")
}
function init()
@ -380,11 +380,11 @@
"folder_drop", "folder_drop2"
];
$('#lb1 tr:odd').addClass('odd');
$j('#lb1 tr:odd').addClass('odd');
//Create an object representation for each listbox-row and append
//each to its own listboxItemAOI
$('#lb1 tr').each(function(index, elem) {
$j('#lb1 tr').each(function(index, elem) {
var obj = objectManager.addObject(elem.id, new listboxItemAOI(elem));
//Apply the links to the actions
if (elem.id.substr(0,4) == "file")
@ -393,11 +393,11 @@
obj.updateActionLinks(listboxFolderLinks);
});
$("#selectAll").click(function() {
$j("#selectAll").click(function() {
objectManager.toggleAllSelected();
});
$("#performAction").click(function(e) {
$j("#performAction").click(function(e) {
if (!objectManager.executeActionImplementation(this, "popup"))
alert("Please select one or more objects.");
return false;

View File

@ -38,7 +38,7 @@
+ ids + "'");
}
$(document).ready(function() {
$j(document).ready(function() {
actionManager = new egwActionManager();
actionManager.updateActions(
[

View File

@ -234,7 +234,7 @@
}
function clean() {
$("#container").children().remove();
$j("#container").children().remove();
actionManager = null;
objectManager = null;
grid = null;
@ -243,8 +243,8 @@
function buildGrid() {
clean();
var cnt = $(document.createElement("div"));
$("#container").append(cnt);
var cnt = $j(document.createElement("div"));
$j("#container").append(cnt);
actionManager = new egwActionManager();
actionManager.updateActions(actions);
@ -268,7 +268,7 @@
grid.reload();
}
$(document).ready(function() {
$j(document).ready(function() {
buildGrid();
});

View File

@ -125,13 +125,13 @@ var egw_json_files = {};
/**
* Initialize the egw_json_files object with all files which are already bound in
*/
$(document).ready(function() {
$("script, link").each(function() {
$j(document).ready(function() {
$j("script, link").each(function() {
var file = false;
if ($(this).attr("src")) {
file = $(this).attr("src");
} else if ($(this).attr("href")) {
file = $(this).attr("href");
if ($j(this).attr("src")) {
file = $j(this).attr("src");
} else if ($j(this).attr("href")) {
file = $j(this).attr("href");
}
if (file) {
egw_json_files[file] = true;
@ -288,7 +288,7 @@ egw_json_request.prototype.sendRequest = function(_async, _callback, _sender)
};
//Send the request via the jquery AJAX interface to the server
this.request = $.ajax({url: this.url,
this.request = $j.ajax({url: this.url,
async: is_async,
context: this,
data: request_obj,
@ -407,7 +407,7 @@ egw_json_request.prototype.handleResponse = function(data, textStatus, XMLHttpRe
{
try
{
var jQueryObject = $(res.data.select, this.context);
var jQueryObject = $j(res.data.select, this.context);
jQueryObject[res.data.func].apply(jQueryObject, res.data.parms);
}
catch (e)
@ -653,7 +653,7 @@ function _egw_json_getFormValues(serialized, children, _filterClass)
if (typeof child.childNodes != "undefined")
_egw_json_getFormValues(serialized, child.childNodes, _filterClass);
if ((!_filterClass || $(child).hasClass(_filterClass)) && typeof child.name != "undefined")
if ((!_filterClass || $j(child).hasClass(_filterClass)) && typeof child.name != "undefined")
{
//alert('_egw_json_getFormValues(,,'+_filterClass+') calling _egw_json_getFormValue for name='+child.name+', class='+child.class+', value='+child.value);
_egw_json_getFormValue(serialized, child);

File diff suppressed because one or more lines are too long