diff --git a/etemplate/js/et2_core_DOMWidget.js b/etemplate/js/et2_core_DOMWidget.js index 47dc2dc9b4..4da381cc74 100644 --- a/etemplate/js/et2_core_DOMWidget.js +++ b/etemplate/js/et2_core_DOMWidget.js @@ -10,8 +10,6 @@ * @version $Id$ */ -"use strict"; - /*egw:uses et2_core_interfaces; et2_core_widget; @@ -25,7 +23,7 @@ * * @augments et2_widget */ -var et2_DOMWidget = et2_widget.extend(et2_IDOMNode, +var et2_DOMWidget = (function(){ "use strict"; return et2_widget.extend(et2_IDOMNode, { attributes: { "disabled": { @@ -429,7 +427,7 @@ var et2_DOMWidget = et2_widget.extend(et2_IDOMNode, } } }, - + set_background: function(_value) { var node = this.getDOMNode(this); @@ -445,7 +443,7 @@ var et2_DOMWidget = et2_widget.extend(et2_IDOMNode, }); } }, - + /** * Set Actions on the widget * @@ -566,8 +564,9 @@ var et2_DOMWidget = et2_widget.extend(et2_IDOMNode, // 'allowed' for this widget at this time var action_links = this._get_action_links(actions); widget_object.updateActionLinks(action_links); - } -}); + } + +});}).call(this); /** * The surroundings manager class allows to append or prepend elements around @@ -575,7 +574,7 @@ var et2_DOMWidget = et2_widget.extend(et2_IDOMNode, * * @augments Class */ -var et2_surroundingsMgr = ClassWithAttributes.extend( +var et2_surroundingsMgr = (function(){ "use strict"; return ClassWithAttributes.extend( { /** * Constructor @@ -781,7 +780,7 @@ var et2_surroundingsMgr = ClassWithAttributes.extend( return this._widgetContainer; } -}); +});}).call(this); /** * The egw_action system requires an egwActionObjectInterface Interface implementation @@ -801,7 +800,7 @@ function et2_action_object_impl(widget, node) aoi.getWidget = function() { return widget; }; - + aoi.doGetDOMNode = function() { return objectNode?objectNode:widget.getDOMNode(); }; diff --git a/etemplate/js/et2_core_arrayMgr.js b/etemplate/js/et2_core_arrayMgr.js index 92a4fcb4c2..9abdeaec6a 100644 --- a/etemplate/js/et2_core_arrayMgr.js +++ b/etemplate/js/et2_core_arrayMgr.js @@ -10,8 +10,6 @@ * @version $Id$ */ -"use strict"; - /*egw:uses et2_core_common; egw_inheritance; @@ -21,7 +19,7 @@ /** * @augments Class */ -var et2_arrayMgr = Class.extend( +var et2_arrayMgr = (function(){ "use strict"; return Class.extend( { splitIds: true, @@ -384,12 +382,12 @@ var et2_arrayMgr = Class.extend( return mgr; } -}); +});}).call(this); /** * @augments et2_arrayMgr */ -var et2_readonlysArrayMgr = et2_arrayMgr.extend( +var et2_readonlysArrayMgr = (function(){ "use strict"; return et2_arrayMgr.extend( { /** @@ -455,7 +453,7 @@ var et2_readonlysArrayMgr = et2_arrayMgr.extend( { return this.perspectiveData.owner.getArrayMgr('content').expandName(ident); } -}); +});}).call(this); /** * Creates a new set of array managers diff --git a/etemplate/js/et2_core_baseWidget.js b/etemplate/js/et2_core_baseWidget.js index 68d110d13e..c3270f45f0 100644 --- a/etemplate/js/et2_core_baseWidget.js +++ b/etemplate/js/et2_core_baseWidget.js @@ -10,8 +10,6 @@ * @version $Id$ */ -"use strict"; - /*egw:uses jquery.jquery; lib/tooltip; @@ -25,7 +23,7 @@ * * @augments et2_DOMWidget */ -var et2_baseWidget = et2_DOMWidget.extend(et2_IAligned, +var et2_baseWidget = (function(){ "use strict"; return et2_DOMWidget.extend(et2_IAligned, { attributes: { "statustext": { @@ -291,14 +289,14 @@ var et2_baseWidget = et2_DOMWidget.extend(et2_IAligned, return this.align; } -}); +});}).call(this); /** * Simple container object * * @augments et2_baseWidget */ -var et2_container = et2_baseWidget.extend( +var et2_container = (function(){ "use strict"; return et2_baseWidget.extend( { /** * Constructor @@ -332,14 +330,14 @@ var et2_container = et2_baseWidget.extend( } } } -}); +});}).call(this); /** * Container object for not-yet supported widgets * * @augments et2_baseWidget */ -var et2_placeholder = et2_baseWidget.extend([et2_IDetachedDOM], +var et2_placeholder = (function(){ "use strict"; return et2_baseWidget.extend([et2_IDetachedDOM], { /** * Constructor @@ -409,5 +407,5 @@ var et2_placeholder = et2_baseWidget.extend([et2_IDetachedDOM], setDetachedAttributes: function(_nodes, _values) { this.placeDiv = jQuery(_nodes[0]); } -}); +});}).call(this); diff --git a/etemplate/js/et2_core_common.js b/etemplate/js/et2_core_common.js index d161c6636a..d5457e76c3 100644 --- a/etemplate/js/et2_core_common.js +++ b/etemplate/js/et2_core_common.js @@ -10,8 +10,6 @@ * @version $Id$ */ -"use strict"; - /** * IE Fix for array.indexOf */ diff --git a/etemplate/js/et2_core_inheritance.js b/etemplate/js/et2_core_inheritance.js index 6ba9ff2d81..37f00022ae 100644 --- a/etemplate/js/et2_core_inheritance.js +++ b/etemplate/js/et2_core_inheritance.js @@ -10,14 +10,12 @@ * @version $Id$ */ -"use strict"; - /*egw:uses et2_core_common; egw_inheritance; */ -var ClassWithAttributes = Class.extend( +var ClassWithAttributes = (function(){ "use strict"; return Class.extend( { /** * Returns the value of the given attribute. If the property does not @@ -157,4 +155,4 @@ var ClassWithAttributes = Class.extend( et2_validateAttrib(key, attributes[key]); } } -}); \ No newline at end of file +});}).call(this); \ No newline at end of file diff --git a/etemplate/js/et2_core_inputWidget.js b/etemplate/js/et2_core_inputWidget.js index f7b67f4263..c11815ca0f 100644 --- a/etemplate/js/et2_core_inputWidget.js +++ b/etemplate/js/et2_core_inputWidget.js @@ -10,8 +10,6 @@ * @version $Id$ */ -"use strict"; - /*egw:uses jquery.jquery; et2_core_interfaces; @@ -25,7 +23,7 @@ * * @augments et2_valueWidget */ -var et2_inputWidget = et2_valueWidget.extend([et2_IInput,et2_ISubmitListener], +var et2_inputWidget = (function(){ "use strict"; return et2_valueWidget.extend([et2_IInput,et2_ISubmitListener], { attributes: { "needed": { @@ -320,5 +318,5 @@ var et2_inputWidget = et2_valueWidget.extend([et2_IInput,et2_ISubmitListener], this.set_validation_error(valid ? false : messages); return valid; } -}); +});}).call(this); diff --git a/etemplate/js/et2_core_interfaces.js b/etemplate/js/et2_core_interfaces.js index 70d2508de9..c8137e2a06 100644 --- a/etemplate/js/et2_core_interfaces.js +++ b/etemplate/js/et2_core_interfaces.js @@ -10,8 +10,6 @@ * @version $Id$ */ -"use strict"; - /*egw:uses et2_core_inheritance; */ diff --git a/etemplate/js/et2_core_legacyJSFunctions.js b/etemplate/js/et2_core_legacyJSFunctions.js index c6bc77371c..25eef39566 100644 --- a/etemplate/js/et2_core_legacyJSFunctions.js +++ b/etemplate/js/et2_core_legacyJSFunctions.js @@ -10,14 +10,14 @@ * @version $Id: et2_core_phpExpressionCompiler.js 38256 2012-03-05 13:07:38Z igel457 $ */ -"use strict"; - /*egw:uses et2_interfaces; et2_core_common; */ -(function() { +(function() +{ + "use strict"; /** * Resolve javascript pseudo functions in onclick or onchange: diff --git a/etemplate/js/et2_core_phpExpressionCompiler.js b/etemplate/js/et2_core_phpExpressionCompiler.js index a60a055910..32fb98d8f1 100644 --- a/etemplate/js/et2_core_phpExpressionCompiler.js +++ b/etemplate/js/et2_core_phpExpressionCompiler.js @@ -10,13 +10,13 @@ * @version $Id$ */ -"use strict"; - /*egw:uses et2_core_common; */ -(function() { +(function() +{ + "use strict"; var STATE_DEFAULT = 0; var STATE_ESCAPED = 1; diff --git a/etemplate/js/et2_core_valueWidget.js b/etemplate/js/et2_core_valueWidget.js index ae0a0fab1b..2cea56756f 100644 --- a/etemplate/js/et2_core_valueWidget.js +++ b/etemplate/js/et2_core_valueWidget.js @@ -10,8 +10,6 @@ * @version $Id$ */ -"use strict"; - /*egw:uses jquery.jquery; et2_core_baseWidget; @@ -24,7 +22,7 @@ * * @augments et2_baseWidget */ -var et2_valueWidget = et2_baseWidget.extend( +var et2_valueWidget = (function(){ "use strict"; return et2_baseWidget.extend( { attributes: { "label": { @@ -127,5 +125,5 @@ var et2_valueWidget = et2_baseWidget.extend( // Copy the given value this.label = _value; } -}); +});}).call(this); diff --git a/etemplate/js/et2_core_widget.js b/etemplate/js/et2_core_widget.js index c4ed083e47..5b96ea154e 100644 --- a/etemplate/js/et2_core_widget.js +++ b/etemplate/js/et2_core_widget.js @@ -10,8 +10,6 @@ * @version $Id$ */ -"use strict"; - /*egw:uses jsapi.egw; et2_core_xml; @@ -35,6 +33,8 @@ var et2_registry = {}; */ function et2_register_widget(_constructor, _types) { + "use strict"; + // Iterate over all given types and register those for (var i = 0; i < _types.length; i++) { @@ -67,6 +67,8 @@ function et2_register_widget(_constructor, _types) */ function et2_createWidget(_name, _attrs, _parent) { + "use strict"; + if (typeof _attrs == "undefined") { _attrs = {}; @@ -104,7 +106,7 @@ function et2_createWidget(_name, _attrs, _parent) * * @augments ClassWithAttributes */ -var et2_widget = ClassWithAttributes.extend( +var et2_widget = (function(){ "use strict"; return ClassWithAttributes.extend( { attributes: { "id": { @@ -1040,5 +1042,5 @@ var et2_widget = ClassWithAttributes.extend( return path; } -}); +});}).call(this); diff --git a/etemplate/js/et2_core_xml.js b/etemplate/js/et2_core_xml.js index ffbdd727ae..9cf3b06dab 100644 --- a/etemplate/js/et2_core_xml.js +++ b/etemplate/js/et2_core_xml.js @@ -10,8 +10,6 @@ * @version $Id$ */ -"use strict"; - /** * Loads the given URL asynchronously from the server * diff --git a/etemplate/js/et2_dataview.js b/etemplate/js/et2_dataview.js index af6dadf0d4..8b5de1c715 100644 --- a/etemplate/js/et2_dataview.js +++ b/etemplate/js/et2_dataview.js @@ -10,8 +10,6 @@ * @version $Id$ */ -"use strict"; - /*egw:uses jquery.jquery; et2_core_common; @@ -31,7 +29,7 @@ * * @augments Class */ -var et2_dataview = Class.extend({ +var et2_dataview = (function(){ "use strict"; return Class.extend({ /** * Constant which regulates the column padding. @@ -275,7 +273,7 @@ var et2_dataview = Class.extend({ this.egw.css(".egwGridView_grid ." + this.uniqueId + "_div_fullRow"); this.egw.css(".egwGridView_outer ." + this.uniqueId + "_td_fullRow"); this.egw.css(".egwGridView_outer ." + this.uniqueId + "_spacer_fullRow"); - + // Reset the headerColumns array and empty the table row this.columnNodes = []; this.columns = []; @@ -404,7 +402,7 @@ var et2_dataview = Class.extend({ .attr("align", "left") .append(cont) .appendTo(this.headTr); - + if(this.columnMgr && this.columnMgr.columns[i]) { column.addClass(this.columnMgr.columns[i].fixedWidth ? 'fixedWidth' : 'relativeWidth'); @@ -609,6 +607,6 @@ var et2_dataview = Class.extend({ return width; } -}); +});}).call(this); diff --git a/etemplate/js/et2_dataview_controller.js b/etemplate/js/et2_dataview_controller.js index 8eacb1a646..8bcbe6cec5 100644 --- a/etemplate/js/et2_dataview_controller.js +++ b/etemplate/js/et2_dataview_controller.js @@ -34,7 +34,7 @@ var ET2_DATAVIEW_STEPSIZE = 50; * instance and the corresponding data source. It manages updating the grid, * as well as inserting and deleting rows. */ -var et2_dataview_controller = Class.extend({ +var et2_dataview_controller = (function(){ "use strict"; return Class.extend({ /** * Constructor of the et2_dataview_controller, connects to the grid @@ -391,7 +391,7 @@ var et2_dataview_controller = Class.extend({ /** * Create a new row. - * + * * @param {type} ctx * @returns {et2_dataview_container} */ @@ -945,5 +945,5 @@ var et2_dataview_controller = Class.extend({ this._grid.makeIndexVisible(_idx); } -}); +});}).call(this); diff --git a/etemplate/js/et2_dataview_controller_selection.js b/etemplate/js/et2_dataview_controller_selection.js index 8ad3c6834a..bb44bb505d 100644 --- a/etemplate/js/et2_dataview_controller_selection.js +++ b/etemplate/js/et2_dataview_controller_selection.js @@ -27,7 +27,7 @@ * * @augments Class */ -var et2_dataview_selectionManager = Class.extend( +var et2_dataview_selectionManager = (function(){ "use strict"; return Class.extend( { /** * Constructor @@ -539,5 +539,5 @@ var et2_dataview_selectionManager = Class.extend( } } -}); +});}).call(this); diff --git a/etemplate/js/et2_dataview_interfaces.js b/etemplate/js/et2_dataview_interfaces.js index 8ef5b7ab70..8a057fafe1 100644 --- a/etemplate/js/et2_dataview_interfaces.js +++ b/etemplate/js/et2_dataview_interfaces.js @@ -10,8 +10,6 @@ * @version $Id$ */ -"use strict"; - /*egw:uses et2_core_inheritance; */ @@ -20,7 +18,7 @@ var et2_dataview_IInvalidatable = new Interface({ invalidate: function() {} -}); +}); var et2_dataview_IViewRange = new Interface({ @@ -76,7 +74,7 @@ var et2_IDataProvider = new Interface({ * * @param _uid is the uid for which the callback should be registered. * @param _callback is the callback which should get called. - * @param _context is an optional parameter which can + * @param _context is an optional parameter which can */ dataRegisterUID: function (_uid, _callback, _context) {}, diff --git a/etemplate/js/et2_dataview_model_columns.js b/etemplate/js/et2_dataview_model_columns.js index 7e38eed789..b8acfa1a6d 100755 --- a/etemplate/js/et2_dataview_model_columns.js +++ b/etemplate/js/et2_dataview_model_columns.js @@ -10,8 +10,6 @@ * @version $Id$ */ -"use strict"; - /*egw:uses et2_inheritance; */ @@ -29,7 +27,7 @@ var ET2_COL_VISIBILITY_ALWAYS_NOSELECT = 3; * * @augments Class */ -var et2_dataview_column = ClassWithAttributes.extend({ +var et2_dataview_column = (function(){ "use strict"; return ClassWithAttributes.extend({ attributes: { "id": { @@ -146,7 +144,7 @@ var et2_dataview_column = ClassWithAttributes.extend({ this.egw().debug("warn", "Invalid visibility option for column: ", _value); } } -}); +});}).call(this); /** * Contains logic for the columns class. The columns class represents the unique set @@ -154,7 +152,7 @@ var et2_dataview_column = ClassWithAttributes.extend({ * do normaly not change. */ -var et2_dataview_columns = Class.extend({ +var et2_dataview_columns = (function(){ "use strict"; return Class.extend({ init: function(_columnData) { // Initialize some variables @@ -431,5 +429,5 @@ var et2_dataview_columns = Class.extend({ } } -}); +});}).call(this); diff --git a/etemplate/js/et2_dataview_view_aoi.js b/etemplate/js/et2_dataview_view_aoi.js index 2a83583732..8054131420 100644 --- a/etemplate/js/et2_dataview_view_aoi.js +++ b/etemplate/js/et2_dataview_view_aoi.js @@ -10,8 +10,6 @@ * @version $Id$ */ -"use strict"; - /*egw:uses egw_action.egw_action_common; egw_action.egw_action; @@ -27,11 +25,15 @@ var EGW_SELECTMODE_DEFAULT = 0; var EGW_SELECTMODE_TOGGLE = 1; /** - * An action object interface for each nextmatch widget row - "inherits" from + * An action object interface for each nextmatch widget row - "inherits" from * egwActionObjectInterface + * + * @param {DOMNode} _node */ function et2_dataview_rowAOI(_node) { + "use strict"; + var aoi = new egwActionObjectInterface(); aoi.node = _node; @@ -51,8 +53,10 @@ function et2_dataview_rowAOI(_node) /** * Now append some action code to the node - * + * * @memberOf et2_dataview_rowAOI + * @param {DOMEvent} e + * @param {object} _params */ var selectHandler = function(e, _params) { // Reset the focus so that keyboard navigation will work properly @@ -62,12 +66,12 @@ function et2_dataview_rowAOI(_node) // Reset the prevent selection code (in order to allow wanted // selection of text) _node.onselectstart = null; - + if (e.target != aoi.checkBox) { var selected = egwBitIsSet(aoi.getState(), EGW_AO_STATE_SELECTED); var state = egwGetShiftState(e); - + if (_params) { if (egwIsMobile()) @@ -112,7 +116,7 @@ function et2_dataview_rowAOI(_node) { selectHandler(event); } - + }); } else { $j(_node).click(selectHandler); diff --git a/etemplate/js/et2_dataview_view_container.js b/etemplate/js/et2_dataview_view_container.js index bb4a0e121e..2bcdbc1888 100644 --- a/etemplate/js/et2_dataview_view_container.js +++ b/etemplate/js/et2_dataview_view_container.js @@ -10,8 +10,6 @@ * @version $Id$ */ -"use strict"; - /*egw:uses jquery.jquery; et2_dataview_interfaces; @@ -33,7 +31,7 @@ * * @augments Class */ -var et2_dataview_container = Class.extend(et2_dataview_IInvalidatable, +var et2_dataview_container = (function(){ "use strict"; return Class.extend(et2_dataview_IInvalidatable, { /** * Initializes the container object. @@ -376,4 +374,4 @@ var et2_dataview_container = Class.extend(et2_dataview_IInvalidatable, { return _node.offsetHeight; } -}); +});}).call(this); diff --git a/etemplate/js/et2_dataview_view_grid.js b/etemplate/js/et2_dataview_view_grid.js index c416ebb8ca..73a332f413 100644 --- a/etemplate/js/et2_dataview_view_grid.js +++ b/etemplate/js/et2_dataview_view_grid.js @@ -10,8 +10,6 @@ * @version $Id$ */ -"use strict"; - /*egw:uses jquery.jquery; et2_core_common; @@ -45,7 +43,7 @@ var ET2_GRID_HOLD_COUNT = 50; /** * @augments et2_dataview_container */ -var et2_dataview_grid = et2_dataview_container.extend(et2_dataview_IViewRange, +var et2_dataview_grid = (function(){ "use strict"; return et2_dataview_container.extend(et2_dataview_IViewRange, { /** * Creates the grid. @@ -1387,5 +1385,5 @@ var et2_dataview_grid = et2_dataview_container.extend(et2_dataview_IViewRange, this.appendNode($j(this.tr[0])); } -}); +});}).call(this); diff --git a/etemplate/js/et2_dataview_view_resizeable.js b/etemplate/js/et2_dataview_view_resizeable.js index 98ea84fff4..06ae7f96ef 100644 --- a/etemplate/js/et2_dataview_view_resizeable.js +++ b/etemplate/js/et2_dataview_view_resizeable.js @@ -10,13 +10,13 @@ * @version $Id$ */ -"use strict"; - /** * This set of functions is currently only supporting resizing in ew-direction */ -(function() { +(function() +{ + "use strict"; // Define some constants var RESIZE_BORDER = 12; diff --git a/etemplate/js/et2_dataview_view_row.js b/etemplate/js/et2_dataview_view_row.js index 8fa501dad9..4ca69b4678 100644 --- a/etemplate/js/et2_dataview_view_row.js +++ b/etemplate/js/et2_dataview_view_row.js @@ -10,8 +10,6 @@ * @version $Id$ */ -"use strict"; - /*egw:uses egw_action.egw_action; @@ -21,7 +19,7 @@ /** * @augments et2_dataview_container */ -var et2_dataview_row = et2_dataview_container.extend(et2_dataview_IViewRange, +var et2_dataview_row = (function(){ "use strict"; return et2_dataview_container.extend(et2_dataview_IViewRange, { /** * Creates the row container. Use the "setRow" function to load the actual @@ -193,5 +191,5 @@ var et2_dataview_row = et2_dataview_container.extend(et2_dataview_IViewRange, } } -}); +});}).call(this); diff --git a/etemplate/js/et2_dataview_view_rowProvider.js b/etemplate/js/et2_dataview_view_rowProvider.js index 5c9c0894e4..0c3cc2c0be 100644 --- a/etemplate/js/et2_dataview_view_rowProvider.js +++ b/etemplate/js/et2_dataview_view_rowProvider.js @@ -24,7 +24,7 @@ * * @augments Class */ -var et2_dataview_rowProvider = Class.extend( +var et2_dataview_rowProvider = (function(){ "use strict"; return Class.extend( { /** * @@ -125,5 +125,5 @@ var et2_dataview_rowProvider = Class.extend( this._prototypes["loading"] = fullRow; } -}); +});}).call(this); diff --git a/etemplate/js/et2_dataview_view_spacer.js b/etemplate/js/et2_dataview_view_spacer.js index a886c5cd18..1eb3a71acb 100644 --- a/etemplate/js/et2_dataview_view_spacer.js +++ b/etemplate/js/et2_dataview_view_spacer.js @@ -10,8 +10,6 @@ * @version $Id$ */ -"use strict"; - /*egw:uses jquery.jquery; et2_dataview_view_container; @@ -20,11 +18,11 @@ /** * @augments et2_dataview_container */ -var et2_dataview_spacer = et2_dataview_container.extend( +var et2_dataview_spacer = (function(){ "use strict"; return et2_dataview_container.extend( { /** * Constructor - * + * * @param _parent * @param _rowProvider * @memberOf et2_dataview_spacer @@ -103,5 +101,5 @@ var et2_dataview_spacer = et2_dataview_container.extend( return tr; } -}); +});}).call(this); diff --git a/etemplate/js/et2_dataview_view_tile.js b/etemplate/js/et2_dataview_view_tile.js index a4f67d55d6..6ee829e648 100644 --- a/etemplate/js/et2_dataview_view_tile.js +++ b/etemplate/js/et2_dataview_view_tile.js @@ -10,8 +10,6 @@ * @version $Id: et2_dataview_view_container_1.js 46338 2014-03-20 09:40:37Z ralfbecker $ */ -"use strict"; - /*egw:uses jquery.jquery; et2_dataview_interfaces; @@ -25,7 +23,7 @@ * * @augments et2_dataview_container */ -var et2_dataview_tile = et2_dataview_row.extend([], +var et2_dataview_tile = (function(){ "use strict"; return et2_dataview_row.extend([], { columns: 4, @@ -47,7 +45,7 @@ var et2_dataview_tile = et2_dataview_row.extend([], makeExpandable: function (_expandable, _callback, _context) { // Nope. It mostly works, it's just weird. }, - + getAvgHeightData: function() { var res = { "avgHeight": this.getHeight() / this.columns, @@ -103,4 +101,4 @@ var et2_dataview_tile = et2_dataview_row.extend([], this.columns = Math.max(1,parseInt(this.tr.parent().innerWidth() / this.tr.outerWidth(true))); } } -}); +});}).call(this); diff --git a/etemplate/js/et2_extension_customfields.js b/etemplate/js/et2_extension_customfields.js index 895754303a..6ee4e6c5a8 100644 --- a/etemplate/js/et2_extension_customfields.js +++ b/etemplate/js/et2_extension_customfields.js @@ -10,8 +10,6 @@ * @version $Id$ */ -"use strict"; - /*egw:uses lib/tooltip; jquery.jquery; @@ -23,7 +21,7 @@ /** * @augments et2_dataview */ -var et2_customfields_list = et2_valueWidget.extend([et2_IDetachedDOM, et2_IInput], +var et2_customfields_list = (function(){ "use strict"; return et2_valueWidget.extend([et2_IDetachedDOM, et2_IInput], { attributes: { 'customfields': { @@ -476,7 +474,7 @@ var et2_customfields_list = et2_valueWidget.extend([et2_IDetachedDOM, et2_IInput attrs.empty_label = egw.lang('Select'); return this._setup_select(field_name, field, attrs); }, - + _setup_date: function(field_name, field, attrs) { attrs.data_format = 'Y-m-d'; return true; @@ -622,7 +620,7 @@ var et2_customfields_list = et2_valueWidget.extend([et2_IDetachedDOM, et2_IInput // This controls where the widget is placed in the DOM this.rows[attrs.id] = cf[0]; $j(widget.getDOMNode(widget)).css('vertical-align','top'); - + // Add a link to existing VFS file var select_attrs = jQuery.extend({}, attrs, @@ -640,7 +638,7 @@ var et2_customfields_list = et2_valueWidget.extend([et2_IDetachedDOM, et2_IInput // Do not store in the widgets list, one name for multiple widgets would cause problems widget = et2_createWidget(select_attrs.type, select_attrs, this); - $j(widget.getDOMNode(widget)).css('vertical-align','top').prependTo(cf); + $j(widget.getDOMNode(widget)).css('vertical-align','top').prependTo(cf); } return false; }, @@ -694,7 +692,7 @@ var et2_customfields_list = et2_valueWidget.extend([et2_IDetachedDOM, et2_IInput $j(_nodes[i]).toggle(_values.fields[key] && _values.value[this.prefix + key]?true:false); } } -}); +});}).call(this); et2_register_widget(et2_customfields_list, ["customfields", "customfields-list"]); diff --git a/etemplate/js/et2_extension_itempicker_actions.js b/etemplate/js/et2_extension_itempicker_actions.js index 300ac1401f..ab9312bf6f 100644 --- a/etemplate/js/et2_extension_itempicker_actions.js +++ b/etemplate/js/et2_extension_itempicker_actions.js @@ -13,9 +13,10 @@ * @version $Id: et2_widget_itempicker.js 38623 2012-03-26 23:27:53Z jaytraxx $ */ -"use strict"; +function itempickerDocumentAction(context, data) +{ + "use strict"; -function itempickerDocumentAction(context, data) { var formid = "itempicker_action_form"; var form = "