fixing scope of "use strict", so we do not need to remove it when concatinating our scripts like we do now with minjs

This commit is contained in:
Ralf Becker 2016-02-29 20:40:43 +00:00
parent fc7d679fea
commit aa31a8705f
76 changed files with 548 additions and 630 deletions

View File

@ -10,8 +10,6 @@
* @version $Id$ * @version $Id$
*/ */
"use strict";
/*egw:uses /*egw:uses
et2_core_interfaces; et2_core_interfaces;
et2_core_widget; et2_core_widget;
@ -25,7 +23,7 @@
* *
* @augments et2_widget * @augments et2_widget
*/ */
var et2_DOMWidget = et2_widget.extend(et2_IDOMNode, var et2_DOMWidget = (function(){ "use strict"; return et2_widget.extend(et2_IDOMNode,
{ {
attributes: { attributes: {
"disabled": { "disabled": {
@ -567,7 +565,8 @@ var et2_DOMWidget = et2_widget.extend(et2_IDOMNode,
var action_links = this._get_action_links(actions); var action_links = this._get_action_links(actions);
widget_object.updateActionLinks(action_links); widget_object.updateActionLinks(action_links);
} }
});
});}).call(this);
/** /**
* The surroundings manager class allows to append or prepend elements around * 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 * @augments Class
*/ */
var et2_surroundingsMgr = ClassWithAttributes.extend( var et2_surroundingsMgr = (function(){ "use strict"; return ClassWithAttributes.extend(
{ {
/** /**
* Constructor * Constructor
@ -781,7 +780,7 @@ var et2_surroundingsMgr = ClassWithAttributes.extend(
return this._widgetContainer; return this._widgetContainer;
} }
}); });}).call(this);
/** /**
* The egw_action system requires an egwActionObjectInterface Interface implementation * The egw_action system requires an egwActionObjectInterface Interface implementation

View File

@ -10,8 +10,6 @@
* @version $Id$ * @version $Id$
*/ */
"use strict";
/*egw:uses /*egw:uses
et2_core_common; et2_core_common;
egw_inheritance; egw_inheritance;
@ -21,7 +19,7 @@
/** /**
* @augments Class * @augments Class
*/ */
var et2_arrayMgr = Class.extend( var et2_arrayMgr = (function(){ "use strict"; return Class.extend(
{ {
splitIds: true, splitIds: true,
@ -384,12 +382,12 @@ var et2_arrayMgr = Class.extend(
return mgr; return mgr;
} }
}); });}).call(this);
/** /**
* @augments et2_arrayMgr * @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); return this.perspectiveData.owner.getArrayMgr('content').expandName(ident);
} }
}); });}).call(this);
/** /**
* Creates a new set of array managers * Creates a new set of array managers

View File

@ -10,8 +10,6 @@
* @version $Id$ * @version $Id$
*/ */
"use strict";
/*egw:uses /*egw:uses
jquery.jquery; jquery.jquery;
lib/tooltip; lib/tooltip;
@ -25,7 +23,7 @@
* *
* @augments et2_DOMWidget * @augments et2_DOMWidget
*/ */
var et2_baseWidget = et2_DOMWidget.extend(et2_IAligned, var et2_baseWidget = (function(){ "use strict"; return et2_DOMWidget.extend(et2_IAligned,
{ {
attributes: { attributes: {
"statustext": { "statustext": {
@ -291,14 +289,14 @@ var et2_baseWidget = et2_DOMWidget.extend(et2_IAligned,
return this.align; return this.align;
} }
}); });}).call(this);
/** /**
* Simple container object * Simple container object
* *
* @augments et2_baseWidget * @augments et2_baseWidget
*/ */
var et2_container = et2_baseWidget.extend( var et2_container = (function(){ "use strict"; return et2_baseWidget.extend(
{ {
/** /**
* Constructor * Constructor
@ -332,14 +330,14 @@ var et2_container = et2_baseWidget.extend(
} }
} }
} }
}); });}).call(this);
/** /**
* Container object for not-yet supported widgets * Container object for not-yet supported widgets
* *
* @augments et2_baseWidget * @augments et2_baseWidget
*/ */
var et2_placeholder = et2_baseWidget.extend([et2_IDetachedDOM], var et2_placeholder = (function(){ "use strict"; return et2_baseWidget.extend([et2_IDetachedDOM],
{ {
/** /**
* Constructor * Constructor
@ -409,5 +407,5 @@ var et2_placeholder = et2_baseWidget.extend([et2_IDetachedDOM],
setDetachedAttributes: function(_nodes, _values) { setDetachedAttributes: function(_nodes, _values) {
this.placeDiv = jQuery(_nodes[0]); this.placeDiv = jQuery(_nodes[0]);
} }
}); });}).call(this);

View File

@ -10,8 +10,6 @@
* @version $Id$ * @version $Id$
*/ */
"use strict";
/** /**
* IE Fix for array.indexOf * IE Fix for array.indexOf
*/ */

View File

@ -10,14 +10,12 @@
* @version $Id$ * @version $Id$
*/ */
"use strict";
/*egw:uses /*egw:uses
et2_core_common; et2_core_common;
egw_inheritance; 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 * 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]); et2_validateAttrib(key, attributes[key]);
} }
} }
}); });}).call(this);

View File

@ -10,8 +10,6 @@
* @version $Id$ * @version $Id$
*/ */
"use strict";
/*egw:uses /*egw:uses
jquery.jquery; jquery.jquery;
et2_core_interfaces; et2_core_interfaces;
@ -25,7 +23,7 @@
* *
* @augments et2_valueWidget * @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: { attributes: {
"needed": { "needed": {
@ -320,5 +318,5 @@ var et2_inputWidget = et2_valueWidget.extend([et2_IInput,et2_ISubmitListener],
this.set_validation_error(valid ? false : messages); this.set_validation_error(valid ? false : messages);
return valid; return valid;
} }
}); });}).call(this);

View File

@ -10,8 +10,6 @@
* @version $Id$ * @version $Id$
*/ */
"use strict";
/*egw:uses /*egw:uses
et2_core_inheritance; et2_core_inheritance;
*/ */

View File

@ -10,14 +10,14 @@
* @version $Id: et2_core_phpExpressionCompiler.js 38256 2012-03-05 13:07:38Z igel457 $ * @version $Id: et2_core_phpExpressionCompiler.js 38256 2012-03-05 13:07:38Z igel457 $
*/ */
"use strict";
/*egw:uses /*egw:uses
et2_interfaces; et2_interfaces;
et2_core_common; et2_core_common;
*/ */
(function() { (function()
{
"use strict";
/** /**
* Resolve javascript pseudo functions in onclick or onchange: * Resolve javascript pseudo functions in onclick or onchange:

View File

@ -10,13 +10,13 @@
* @version $Id$ * @version $Id$
*/ */
"use strict";
/*egw:uses /*egw:uses
et2_core_common; et2_core_common;
*/ */
(function() { (function()
{
"use strict";
var STATE_DEFAULT = 0; var STATE_DEFAULT = 0;
var STATE_ESCAPED = 1; var STATE_ESCAPED = 1;

View File

@ -10,8 +10,6 @@
* @version $Id$ * @version $Id$
*/ */
"use strict";
/*egw:uses /*egw:uses
jquery.jquery; jquery.jquery;
et2_core_baseWidget; et2_core_baseWidget;
@ -24,7 +22,7 @@
* *
* @augments et2_baseWidget * @augments et2_baseWidget
*/ */
var et2_valueWidget = et2_baseWidget.extend( var et2_valueWidget = (function(){ "use strict"; return et2_baseWidget.extend(
{ {
attributes: { attributes: {
"label": { "label": {
@ -127,5 +125,5 @@ var et2_valueWidget = et2_baseWidget.extend(
// Copy the given value // Copy the given value
this.label = _value; this.label = _value;
} }
}); });}).call(this);

View File

@ -10,8 +10,6 @@
* @version $Id$ * @version $Id$
*/ */
"use strict";
/*egw:uses /*egw:uses
jsapi.egw; jsapi.egw;
et2_core_xml; et2_core_xml;
@ -35,6 +33,8 @@ var et2_registry = {};
*/ */
function et2_register_widget(_constructor, _types) function et2_register_widget(_constructor, _types)
{ {
"use strict";
// Iterate over all given types and register those // Iterate over all given types and register those
for (var i = 0; i < _types.length; i++) for (var i = 0; i < _types.length; i++)
{ {
@ -67,6 +67,8 @@ function et2_register_widget(_constructor, _types)
*/ */
function et2_createWidget(_name, _attrs, _parent) function et2_createWidget(_name, _attrs, _parent)
{ {
"use strict";
if (typeof _attrs == "undefined") if (typeof _attrs == "undefined")
{ {
_attrs = {}; _attrs = {};
@ -104,7 +106,7 @@ function et2_createWidget(_name, _attrs, _parent)
* *
* @augments ClassWithAttributes * @augments ClassWithAttributes
*/ */
var et2_widget = ClassWithAttributes.extend( var et2_widget = (function(){ "use strict"; return ClassWithAttributes.extend(
{ {
attributes: { attributes: {
"id": { "id": {
@ -1040,5 +1042,5 @@ var et2_widget = ClassWithAttributes.extend(
return path; return path;
} }
}); });}).call(this);

View File

@ -10,8 +10,6 @@
* @version $Id$ * @version $Id$
*/ */
"use strict";
/** /**
* Loads the given URL asynchronously from the server * Loads the given URL asynchronously from the server
* *

View File

@ -10,8 +10,6 @@
* @version $Id$ * @version $Id$
*/ */
"use strict";
/*egw:uses /*egw:uses
jquery.jquery; jquery.jquery;
et2_core_common; et2_core_common;
@ -31,7 +29,7 @@
* *
* @augments Class * @augments Class
*/ */
var et2_dataview = Class.extend({ var et2_dataview = (function(){ "use strict"; return Class.extend({
/** /**
* Constant which regulates the column padding. * Constant which regulates the column padding.
@ -609,6 +607,6 @@ var et2_dataview = Class.extend({
return width; return width;
} }
}); });}).call(this);

View File

@ -34,7 +34,7 @@ var ET2_DATAVIEW_STEPSIZE = 50;
* instance and the corresponding data source. It manages updating the grid, * instance and the corresponding data source. It manages updating the grid,
* as well as inserting and deleting rows. * 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 * Constructor of the et2_dataview_controller, connects to the grid
@ -945,5 +945,5 @@ var et2_dataview_controller = Class.extend({
this._grid.makeIndexVisible(_idx); this._grid.makeIndexVisible(_idx);
} }
}); });}).call(this);

View File

@ -27,7 +27,7 @@
* *
* @augments Class * @augments Class
*/ */
var et2_dataview_selectionManager = Class.extend( var et2_dataview_selectionManager = (function(){ "use strict"; return Class.extend(
{ {
/** /**
* Constructor * Constructor
@ -539,5 +539,5 @@ var et2_dataview_selectionManager = Class.extend(
} }
} }
}); });}).call(this);

View File

@ -10,8 +10,6 @@
* @version $Id$ * @version $Id$
*/ */
"use strict";
/*egw:uses /*egw:uses
et2_core_inheritance; et2_core_inheritance;
*/ */

View File

@ -10,8 +10,6 @@
* @version $Id$ * @version $Id$
*/ */
"use strict";
/*egw:uses /*egw:uses
et2_inheritance; et2_inheritance;
*/ */
@ -29,7 +27,7 @@ var ET2_COL_VISIBILITY_ALWAYS_NOSELECT = 3;
* *
* @augments Class * @augments Class
*/ */
var et2_dataview_column = ClassWithAttributes.extend({ var et2_dataview_column = (function(){ "use strict"; return ClassWithAttributes.extend({
attributes: { attributes: {
"id": { "id": {
@ -146,7 +144,7 @@ var et2_dataview_column = ClassWithAttributes.extend({
this.egw().debug("warn", "Invalid visibility option for column: ", _value); 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 * 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. * do normaly not change.
*/ */
var et2_dataview_columns = Class.extend({ var et2_dataview_columns = (function(){ "use strict"; return Class.extend({
init: function(_columnData) { init: function(_columnData) {
// Initialize some variables // Initialize some variables
@ -431,5 +429,5 @@ var et2_dataview_columns = Class.extend({
} }
} }
}); });}).call(this);

View File

@ -10,8 +10,6 @@
* @version $Id$ * @version $Id$
*/ */
"use strict";
/*egw:uses /*egw:uses
egw_action.egw_action_common; egw_action.egw_action_common;
egw_action.egw_action; egw_action.egw_action;
@ -29,9 +27,13 @@ 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 * egwActionObjectInterface
*
* @param {DOMNode} _node
*/ */
function et2_dataview_rowAOI(_node) function et2_dataview_rowAOI(_node)
{ {
"use strict";
var aoi = new egwActionObjectInterface(); var aoi = new egwActionObjectInterface();
aoi.node = _node; aoi.node = _node;
@ -53,6 +55,8 @@ function et2_dataview_rowAOI(_node)
* Now append some action code to the node * Now append some action code to the node
* *
* @memberOf et2_dataview_rowAOI * @memberOf et2_dataview_rowAOI
* @param {DOMEvent} e
* @param {object} _params
*/ */
var selectHandler = function(e, _params) { var selectHandler = function(e, _params) {
// Reset the focus so that keyboard navigation will work properly // Reset the focus so that keyboard navigation will work properly

View File

@ -10,8 +10,6 @@
* @version $Id$ * @version $Id$
*/ */
"use strict";
/*egw:uses /*egw:uses
jquery.jquery; jquery.jquery;
et2_dataview_interfaces; et2_dataview_interfaces;
@ -33,7 +31,7 @@
* *
* @augments Class * @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. * Initializes the container object.
@ -376,4 +374,4 @@ var et2_dataview_container = Class.extend(et2_dataview_IInvalidatable,
{ {
return _node.offsetHeight; return _node.offsetHeight;
} }
}); });}).call(this);

View File

@ -10,8 +10,6 @@
* @version $Id$ * @version $Id$
*/ */
"use strict";
/*egw:uses /*egw:uses
jquery.jquery; jquery.jquery;
et2_core_common; et2_core_common;
@ -45,7 +43,7 @@ var ET2_GRID_HOLD_COUNT = 50;
/** /**
* @augments et2_dataview_container * @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. * Creates the grid.
@ -1387,5 +1385,5 @@ var et2_dataview_grid = et2_dataview_container.extend(et2_dataview_IViewRange,
this.appendNode($j(this.tr[0])); this.appendNode($j(this.tr[0]));
} }
}); });}).call(this);

View File

@ -10,13 +10,13 @@
* @version $Id$ * @version $Id$
*/ */
"use strict";
/** /**
* This set of functions is currently only supporting resizing in ew-direction * This set of functions is currently only supporting resizing in ew-direction
*/ */
(function() { (function()
{
"use strict";
// Define some constants // Define some constants
var RESIZE_BORDER = 12; var RESIZE_BORDER = 12;

View File

@ -10,8 +10,6 @@
* @version $Id$ * @version $Id$
*/ */
"use strict";
/*egw:uses /*egw:uses
egw_action.egw_action; egw_action.egw_action;
@ -21,7 +19,7 @@
/** /**
* @augments et2_dataview_container * @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 * 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);

View File

@ -24,7 +24,7 @@
* *
* @augments Class * @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; this._prototypes["loading"] = fullRow;
} }
}); });}).call(this);

View File

@ -10,8 +10,6 @@
* @version $Id$ * @version $Id$
*/ */
"use strict";
/*egw:uses /*egw:uses
jquery.jquery; jquery.jquery;
et2_dataview_view_container; et2_dataview_view_container;
@ -20,7 +18,7 @@
/** /**
* @augments et2_dataview_container * @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 * Constructor
@ -103,5 +101,5 @@ var et2_dataview_spacer = et2_dataview_container.extend(
return tr; return tr;
} }
}); });}).call(this);

View File

@ -10,8 +10,6 @@
* @version $Id: et2_dataview_view_container_1.js 46338 2014-03-20 09:40:37Z ralfbecker $ * @version $Id: et2_dataview_view_container_1.js 46338 2014-03-20 09:40:37Z ralfbecker $
*/ */
"use strict";
/*egw:uses /*egw:uses
jquery.jquery; jquery.jquery;
et2_dataview_interfaces; et2_dataview_interfaces;
@ -25,7 +23,7 @@
* *
* @augments et2_dataview_container * @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, columns: 4,
@ -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))); this.columns = Math.max(1,parseInt(this.tr.parent().innerWidth() / this.tr.outerWidth(true)));
} }
} }
}); });}).call(this);

View File

@ -10,8 +10,6 @@
* @version $Id$ * @version $Id$
*/ */
"use strict";
/*egw:uses /*egw:uses
lib/tooltip; lib/tooltip;
jquery.jquery; jquery.jquery;
@ -23,7 +21,7 @@
/** /**
* @augments et2_dataview * @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: { attributes: {
'customfields': { 'customfields': {
@ -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); $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"]); et2_register_widget(et2_customfields_list, ["customfields", "customfields-list"]);

View File

@ -13,9 +13,10 @@
* @version $Id: et2_widget_itempicker.js 38623 2012-03-26 23:27:53Z jaytraxx $ * @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 formid = "itempicker_action_form";
var form = "<form id='" + formid + "' action='index.php?menuaction=" + data.app + "." + data.app + "_merge.download_by_request' method='POST'>" var form = "<form id='" + formid + "' action='index.php?menuaction=" + data.app + "." + data.app + "_merge.download_by_request' method='POST'>"
+ "<input type='hidden' name='data_document_name' value='" + data.value.name + "' />" + "<input type='hidden' name='data_document_name' value='" + data.value.name + "' />"

View File

@ -10,8 +10,6 @@
* @version $Id$ * @version $Id$
*/ */
"use strict";
/*egw:uses /*egw:uses
// Include the action system // Include the action system
@ -82,7 +80,7 @@ var et2_INextmatchSortable = new Interface({
* +--------------+-----------+-------+ * +--------------+-----------+-------+
* @augments et2_DOMWidget * @augments et2_DOMWidget
*/ */
var et2_nextmatch = et2_DOMWidget.extend([et2_IResizeable, et2_IInput, et2_IPrint], var et2_nextmatch = (function(){ "use strict"; return et2_DOMWidget.extend([et2_IResizeable, et2_IInput, et2_IPrint],
{ {
attributes: { attributes: {
// These normally set in settings, but broken out into attributes to allow run-time changes // These normally set in settings, but broken out into attributes to allow run-time changes
@ -2172,7 +2170,7 @@ var et2_nextmatch = et2_DOMWidget.extend([et2_IResizeable, et2_IInput, et2_IPrin
this.dynheight.outerNode.css('max-width','inherit'); this.dynheight.outerNode.css('max-width','inherit');
this.resize(); this.resize();
} }
}); });}).call(this);
et2_register_widget(et2_nextmatch, ["nextmatch"]); et2_register_widget(et2_nextmatch, ["nextmatch"]);
/** /**
@ -2182,7 +2180,7 @@ et2_register_widget(et2_nextmatch, ["nextmatch"]);
* actually load templates from the server. * actually load templates from the server.
* @augments et2_DOMWidget * @augments et2_DOMWidget
*/ */
var et2_nextmatch_header_bar = et2_DOMWidget.extend(et2_INextmatchHeader, var et2_nextmatch_header_bar = (function(){ "use strict"; return et2_DOMWidget.extend(et2_INextmatchHeader,
{ {
attributes: { attributes: {
"filter_label": { "filter_label": {
@ -2811,7 +2809,7 @@ var et2_nextmatch_header_bar = et2_DOMWidget.extend(et2_INextmatchHeader,
jQuery.extend(true, this.nextmatch.activeFilters,mgr.data); jQuery.extend(true, this.nextmatch.activeFilters,mgr.data);
}, this, et2_inputWidget); }, this, et2_inputWidget);
} }
}); });}).call(this);
et2_register_widget(et2_nextmatch_header_bar, ["nextmatch_header_bar"]); et2_register_widget(et2_nextmatch_header_bar, ["nextmatch_header_bar"]);
/** /**
@ -2819,7 +2817,7 @@ et2_register_widget(et2_nextmatch_header_bar, ["nextmatch_header_bar"]);
* *
* @augments et2_baseWidget * @augments et2_baseWidget
*/ */
var et2_nextmatch_header = et2_baseWidget.extend(et2_INextmatchHeader, var et2_nextmatch_header = (function(){ "use strict"; return et2_baseWidget.extend(et2_INextmatchHeader,
{ {
attributes: { attributes: {
"label": { "label": {
@ -2864,7 +2862,7 @@ var et2_nextmatch_header = et2_baseWidget.extend(et2_INextmatchHeader,
this.labelNode.text(_value); this.labelNode.text(_value);
} }
}); });}).call(this);
et2_register_widget(et2_nextmatch_header, ['nextmatch-header']); et2_register_widget(et2_nextmatch_header, ['nextmatch-header']);
/** /**
@ -2872,7 +2870,7 @@ et2_register_widget(et2_nextmatch_header, ['nextmatch-header']);
* *
* @augments et2_customfields_list * @augments et2_customfields_list
*/ */
var et2_nextmatch_customfields = et2_customfields_list.extend(et2_INextmatchHeader, var et2_nextmatch_customfields = (function(){ "use strict"; return et2_customfields_list.extend(et2_INextmatchHeader,
{ {
attributes: { attributes: {
'customfields': { 'customfields': {
@ -3088,13 +3086,13 @@ var et2_nextmatch_customfields = et2_customfields_list.extend(et2_INextmatchHead
} }
return name; return name;
} }
}); });}).call(this);
et2_register_widget(et2_nextmatch_customfields, ['nextmatch-customfields']); et2_register_widget(et2_nextmatch_customfields, ['nextmatch-customfields']);
/** /**
* @augments et2_nextmatch_header * @augments et2_nextmatch_header
*/ */
var et2_nextmatch_sortheader = et2_nextmatch_header.extend(et2_INextmatchSortable, var et2_nextmatch_sortheader = (function(){ "use strict"; return et2_nextmatch_header.extend(et2_INextmatchSortable,
{ {
attributes: { attributes: {
"sortmode": { "sortmode": {
@ -3156,13 +3154,13 @@ var et2_nextmatch_sortheader = et2_nextmatch_header.extend(et2_INextmatchSortabl
this.sortmode = _mode; this.sortmode = _mode;
} }
}); });}).call(this);
et2_register_widget(et2_nextmatch_sortheader, ['nextmatch-sortheader']); et2_register_widget(et2_nextmatch_sortheader, ['nextmatch-sortheader']);
/** /**
* @augments et2_selectbox * @augments et2_selectbox
*/ */
var et2_nextmatch_filterheader = et2_selectbox.extend([et2_INextmatchHeader, et2_IResizeable], var et2_nextmatch_filterheader = (function(){ "use strict"; return et2_selectbox.extend([et2_INextmatchHeader, et2_IResizeable],
{ {
/** /**
* Override to add change handler * Override to add change handler
@ -3217,13 +3215,13 @@ var et2_nextmatch_filterheader = et2_selectbox.extend([et2_INextmatchHeader, et2
this.input.css("max-width",jQuery(this.parentNode).innerWidth() + "px"); this.input.css("max-width",jQuery(this.parentNode).innerWidth() + "px");
} }
}); });}).call(this);
et2_register_widget(et2_nextmatch_filterheader, ['nextmatch-filterheader']); et2_register_widget(et2_nextmatch_filterheader, ['nextmatch-filterheader']);
/** /**
* @augments et2_selectAccount * @augments et2_selectAccount
*/ */
var et2_nextmatch_accountfilterheader = et2_selectAccount.extend([et2_INextmatchHeader, et2_IResizeable], var et2_nextmatch_accountfilterheader = (function(){ "use strict"; return et2_selectAccount.extend([et2_INextmatchHeader, et2_IResizeable],
{ {
/** /**
* Override to add change handler * Override to add change handler
@ -3277,13 +3275,13 @@ var et2_nextmatch_accountfilterheader = et2_selectAccount.extend([et2_INextmatch
this.input.css("max-width",max + "px"); this.input.css("max-width",max + "px");
} }
}); });}).call(this);
et2_register_widget(et2_nextmatch_accountfilterheader, ['nextmatch-accountfilter']); et2_register_widget(et2_nextmatch_accountfilterheader, ['nextmatch-accountfilter']);
/** /**
* @augments et2_link_entry * @augments et2_link_entry
*/ */
var et2_nextmatch_entryheader = et2_link_entry.extend(et2_INextmatchHeader, var et2_nextmatch_entryheader = (function(){ "use strict"; return et2_link_entry.extend(et2_INextmatchHeader,
{ {
/** /**
* Override to add change handler * Override to add change handler
@ -3364,13 +3362,13 @@ var et2_nextmatch_entryheader = et2_link_entry.extend(et2_INextmatchHeader,
var self = this; var self = this;
// Fire on lost focus, clear filter if user emptied box // Fire on lost focus, clear filter if user emptied box
} }
}); });}).call(this);
et2_register_widget(et2_nextmatch_entryheader, ['nextmatch-entryheader']); et2_register_widget(et2_nextmatch_entryheader, ['nextmatch-entryheader']);
/** /**
* @augments et2_nextmatch_filterheader * @augments et2_nextmatch_filterheader
*/ */
var et2_nextmatch_customfilter = et2_nextmatch_filterheader.extend( var et2_nextmatch_customfilter = (function(){ "use strict"; return et2_nextmatch_filterheader.extend(
{ {
attributes: { attributes: {
"widget_type": { "widget_type": {
@ -3447,5 +3445,5 @@ var et2_nextmatch_customfilter = et2_nextmatch_filterheader.extend(
return this.real_node.setNextmatch(_nextmatch); return this.real_node.setNextmatch(_nextmatch);
} }
} }
}); });}).call(this);
et2_register_widget(et2_nextmatch_customfilter, ['nextmatch-customfilter']); et2_register_widget(et2_nextmatch_customfilter, ['nextmatch-customfilter']);

View File

@ -10,8 +10,6 @@
* @version $Id$ * @version $Id$
*/ */
"use strict";
/*egw:uses /*egw:uses
et2_core_common; et2_core_common;
et2_core_inheritance; et2_core_inheritance;
@ -29,7 +27,7 @@
/** /**
* @augments et2_dataview_controller * @augments et2_dataview_controller
*/ */
var et2_nextmatch_controller = et2_dataview_controller.extend(et2_IDataProvider, var et2_nextmatch_controller = (function(){ "use strict"; return et2_dataview_controller.extend(et2_IDataProvider,
{ {
// Display constants // Display constants
VIEW_ROW: 'row', VIEW_ROW: 'row',
@ -683,6 +681,6 @@ var et2_nextmatch_controller = et2_dataview_controller.extend(et2_IDataProvider,
// Overwritten in the constructor // Overwritten in the constructor
} }
}); });}).call(this);

View File

@ -10,8 +10,6 @@
* @version $Id$ * @version $Id$
*/ */
"use strict";
/*egw:use /*egw:use
jquery.jquery; jquery.jquery;
et2_core_inheritance; et2_core_inheritance;
@ -24,7 +22,7 @@
* *
* @augments Class * @augments Class
*/ */
var et2_dynheight = Class.extend( var et2_dynheight = (function(){ "use strict"; return Class.extend(
{ {
/** /**
* Constructor for the dynheight object * Constructor for the dynheight object
@ -192,5 +190,5 @@ var et2_dynheight = Class.extend(
} }
} }
}); });}).call(this);

View File

@ -24,7 +24,7 @@
* *
* @augments Class * @augments Class
*/ */
var et2_nextmatch_rowProvider = ClassWithAttributes.extend( var et2_nextmatch_rowProvider = (function(){ "use strict"; return ClassWithAttributes.extend(
{ {
/** /**
* Creates the nextmatch row provider. * Creates the nextmatch row provider.
@ -536,12 +536,12 @@ var et2_nextmatch_rowProvider = ClassWithAttributes.extend(
} }
} }
}); });}).call(this);
/** /**
* @augments et2_widget * @augments et2_widget
*/ */
var et2_nextmatch_rowWidget = et2_widget.extend(et2_IDOMNode, var et2_nextmatch_rowWidget = (function(){ "use strict"; return et2_widget.extend(et2_IDOMNode,
{ {
/** /**
* Constructor * Constructor
@ -604,12 +604,12 @@ var et2_nextmatch_rowWidget = et2_widget.extend(et2_IDOMNode,
return null; return null;
} }
}); });}).call(this);
/** /**
* @augments et2_widget * @augments et2_widget
*/ */
var et2_nextmatch_rowTemplateWidget = et2_widget.extend(et2_IDOMNode, var et2_nextmatch_rowTemplateWidget = (function(){ "use strict"; return et2_widget.extend(et2_IDOMNode,
{ {
/** /**
* Constructor * Constructor
@ -670,5 +670,5 @@ var et2_nextmatch_rowTemplateWidget = et2_widget.extend(et2_IDOMNode,
return null; return null;
} }
}); });}).call(this);

View File

@ -11,8 +11,6 @@
* @version $Id$ * @version $Id$
*/ */
"use strict";
/*egw:uses /*egw:uses
jquery.jquery; jquery.jquery;
jquery.jquery-ui; jquery.jquery-ui;
@ -29,7 +27,7 @@
* This widget can get data from any function that can provide data to a nextmatch widget. * This widget can get data from any function that can provide data to a nextmatch widget.
* @augments et2_inputWidget * @augments et2_inputWidget
*/ */
var et2_ajaxSelect = et2_inputWidget.extend( var et2_ajaxSelect = (function(){ "use strict"; return et2_inputWidget.extend(
{ {
attributes: { attributes: {
'get_rows': { 'get_rows': {
@ -191,14 +189,14 @@ var et2_ajaxSelect = et2_inputWidget.extend(
this.input.removeAttr("placeholder"); this.input.removeAttr("placeholder");
} }
} }
}); });}).call(this);
et2_register_widget(et2_ajaxSelect, ["ajax_select"]); et2_register_widget(et2_ajaxSelect, ["ajax_select"]);
/** /**
* et2_textbox_ro is the dummy readonly implementation of the textbox. * et2_textbox_ro is the dummy readonly implementation of the textbox.
* @augments et2_valueWidget * @augments et2_valueWidget
*/ */
var et2_ajaxSelect_ro = et2_valueWidget.extend([et2_IDetachedDOM], var et2_ajaxSelect_ro = (function(){ "use strict"; return et2_valueWidget.extend([et2_IDetachedDOM],
{ {
/** /**
* Ignore all more advanced attributes. * Ignore all more advanced attributes.
@ -250,6 +248,6 @@ var et2_ajaxSelect_ro = et2_valueWidget.extend([et2_IDetachedDOM],
this.set_value(_values["value"]); this.set_value(_values["value"]);
} }
} }
}); });}).call(this);
et2_register_widget(et2_ajaxSelect_ro, ["ajax_select_ro"]); et2_register_widget(et2_ajaxSelect_ro, ["ajax_select_ro"]);

View File

@ -10,8 +10,6 @@
* @version $Id:$ * @version $Id:$
*/ */
"use strict";
/*egw:uses /*egw:uses
jquery.jquery; jquery.jquery;
/phpgwapi/js/jquery/barcode/jquery-barcode.min.js; /phpgwapi/js/jquery/barcode/jquery-barcode.min.js;
@ -46,7 +44,7 @@
* *
* @augments et2_baseWidget * @augments et2_baseWidget
*/ */
var et2_barcode = et2_valueWidget.extend( var et2_barcode = (function(){ "use strict"; return et2_valueWidget.extend(
{ {
attributes : { attributes : {
"code_type": { "code_type": {
@ -130,7 +128,7 @@ var et2_barcode = et2_valueWidget.extend(
{ {
return this.value; return this.value;
} }
}); });}).call(this);
et2_register_widget(et2_barcode, ["barcode"]); et2_register_widget(et2_barcode, ["barcode"]);
// Static part of the class // Static part of the class

View File

@ -10,8 +10,6 @@
* @version $Id$ * @version $Id$
*/ */
"use strict";
/*egw:uses /*egw:uses
jquery.jquery; jquery.jquery;
et2_core_baseWidget; et2_core_baseWidget;
@ -22,7 +20,7 @@
* *
* @augments et2_baseWidget * @augments et2_baseWidget
*/ */
var et2_box = et2_baseWidget.extend([et2_IDetachedDOM], var et2_box = (function(){ "use strict"; return et2_baseWidget.extend([et2_IDetachedDOM],
{ {
attributes: { attributes: {
// Not needed // Not needed
@ -150,7 +148,7 @@ var et2_box = et2_baseWidget.extend([et2_IDetachedDOM],
} }
} }
}); });}).call(this);
et2_register_widget(et2_box, ["vbox", "box"]); et2_register_widget(et2_box, ["vbox", "box"]);
/** /**
@ -166,7 +164,7 @@ et2_register_widget(et2_box, ["vbox", "box"]);
* <details/> * <details/>
* *
*/ */
var et2_details = et2_box.extend( var et2_details = (function(){ "use strict"; return et2_box.extend(
{ {
attributes:{ attributes:{
"toggle_align": { "toggle_align": {
@ -240,5 +238,5 @@ var et2_details = et2_box.extend(
return this.wrapper[0]; return this.wrapper[0];
} }
} }
}); });}).call(this);
et2_register_widget(et2_details, ["details"]); et2_register_widget(et2_details, ["details"]);

View File

@ -10,8 +10,6 @@
* @version $Id$ * @version $Id$
*/ */
"use strict";
/*egw:uses /*egw:uses
jquery.jquery; jquery.jquery;
et2_core_interfaces; et2_core_interfaces;
@ -22,7 +20,7 @@
* Class which implements the "button" XET-Tag * Class which implements the "button" XET-Tag
* @augments et2_baseWidget * @augments et2_baseWidget
*/ */
var et2_button = et2_baseWidget.extend([et2_IInput, et2_IDetachedDOM], var et2_button = (function(){ "use strict"; return et2_baseWidget.extend([et2_IInput, et2_IDetachedDOM],
{ {
attributes: { attributes: {
"label": { "label": {
@ -406,7 +404,7 @@ var et2_button = et2_baseWidget.extend([et2_IInput, et2_IDetachedDOM],
return e.data.click.call(e.data,e); return e.data.click.call(e.data,e);
}); });
} }
}); });}).call(this);
et2_register_widget(et2_button, ["button", "buttononly"]); et2_register_widget(et2_button, ["button", "buttononly"]);
// Static class stuff // Static class stuff

View File

@ -10,8 +10,6 @@
* @version $Id$ * @version $Id$
*/ */
"use strict";
/*egw:uses /*egw:uses
jquery.jquery; jquery.jquery;
et2_core_inputWidget; et2_core_inputWidget;
@ -23,7 +21,7 @@
* *
* @augments et2_inputWidget * @augments et2_inputWidget
*/ */
var et2_checkbox = et2_inputWidget.extend( var et2_checkbox = (function(){ "use strict"; return et2_inputWidget.extend(
{ {
attributes: { attributes: {
"selected_value": { "selected_value": {
@ -123,6 +121,8 @@ var et2_checkbox = et2_inputWidget.extend(
/** /**
* Override default to place checkbox before label, if there is no %s in the label * Override default to place checkbox before label, if there is no %s in the label
*
* @param {string} label
*/ */
set_label: function(label) { set_label: function(label) {
if(label.length && label.indexOf('%s') < 0) if(label.length && label.indexOf('%s') < 0)
@ -134,6 +134,8 @@ var et2_checkbox = et2_inputWidget.extend(
}, },
/** /**
* Override default to match against set/unset value * Override default to match against set/unset value
*
* @param {string|boolean} _value
*/ */
set_value: function(_value) { set_value: function(_value) {
if(_value != this.value) { if(_value != this.value) {
@ -171,14 +173,14 @@ var et2_checkbox = et2_inputWidget.extend(
return this.options.unselected_value; return this.options.unselected_value;
} }
} }
}); });}).call(this);
et2_register_widget(et2_checkbox, ["checkbox"]); et2_register_widget(et2_checkbox, ["checkbox"]);
/** /**
* et2_checkbox_ro is the dummy readonly implementation of the checkbox * et2_checkbox_ro is the dummy readonly implementation of the checkbox
* @augments et2_checkbox * @augments et2_checkbox
*/ */
var et2_checkbox_ro = et2_checkbox.extend( var et2_checkbox_ro = (function(){ "use strict"; return et2_checkbox.extend(
{ {
/** /**
* Ignore unset value * Ignore unset value
@ -207,6 +209,8 @@ var et2_checkbox_ro = et2_checkbox.extend(
/** /**
* note: checkbox is checked if even there is a value but not only if the _value is only "true" * note: checkbox is checked if even there is a value but not only if the _value is only "true"
* it's an exceptional validation for cases that we pass non boolean values as checkbox _value * it's an exceptional validation for cases that we pass non boolean values as checkbox _value
*
* @param {string|boolean} _value
*/ */
set_value: function(_value) { set_value: function(_value) {
if(_value == this.options.selected_value ||_value && this.options.selected_value == this.attributes.selected_value["default"] && if(_value == this.options.selected_value ||_value && this.options.selected_value == this.attributes.selected_value["default"] &&
@ -217,5 +221,5 @@ var et2_checkbox_ro = et2_checkbox.extend(
this.span.text(this.options.ro_false); this.span.text(this.options.ro_false);
} }
} }
}); });}).call(this);
et2_register_widget(et2_checkbox_ro, ["checkbox_ro"]); et2_register_widget(et2_checkbox_ro, ["checkbox_ro"]);

View File

@ -10,8 +10,6 @@
* @version $Id$ * @version $Id$
*/ */
"use strict";
/*egw:uses /*egw:uses
jquery.jquery; jquery.jquery;
et2_core_inputWidget; et2_core_inputWidget;
@ -24,7 +22,7 @@
* *
* @augments et2_inputWidget * @augments et2_inputWidget
*/ */
var et2_color = et2_inputWidget.extend( var et2_color = (function(){ "use strict"; return et2_inputWidget.extend(
{ {
attributes: { attributes: {
"alphaSupport": { "alphaSupport": {
@ -218,14 +216,14 @@ var et2_color = et2_inputWidget.extend(
} }
} }
} }
}); });}).call(this);
et2_register_widget(et2_color, ["colorpicker"]); et2_register_widget(et2_color, ["colorpicker"]);
/** /**
* et2_textbox_ro is the dummy readonly implementation of the textbox. * et2_textbox_ro is the dummy readonly implementation of the textbox.
* @augments et2_valueWidget * @augments et2_valueWidget
*/ */
var et2_color_ro = et2_valueWidget.extend([et2_IDetachedDOM], var et2_color_ro = (function(){ "use strict"; return et2_valueWidget.extend([et2_IDetachedDOM],
{ {
/** /**
* Constructor * Constructor
@ -271,7 +269,7 @@ var et2_color_ro = et2_valueWidget.extend([et2_IDetachedDOM],
this.set_value(_values["value"]); this.set_value(_values["value"]);
} }
} }
}); });}).call(this);
et2_register_widget(et2_color_ro, ["colorpicker_ro"]); et2_register_widget(et2_color_ro, ["colorpicker_ro"]);

View File

@ -10,8 +10,6 @@
* @version $Id$ * @version $Id$
*/ */
"use strict";
/*egw:uses /*egw:uses
jquery.jquery; jquery.jquery;
jquery.jquery-ui; jquery.jquery-ui;
@ -31,7 +29,7 @@
* *
* @augments et2_inputWidget * @augments et2_inputWidget
*/ */
var et2_date = et2_inputWidget.extend( var et2_date = (function(){ "use strict"; return et2_inputWidget.extend(
{ {
attributes: { attributes: {
"value": { "value": {
@ -367,6 +365,8 @@ String: A string in the user\'s date format, or a relative date. Relative dates
/** /**
* Convert non html5 min or max attributes described above to timestamps * Convert non html5 min or max attributes described above to timestamps
*
* @param {string|Date} _value
*/ */
_relativeDate: function(_value) _relativeDate: function(_value)
{ {
@ -594,13 +594,13 @@ String: A string in the user\'s date format, or a relative date. Relative dates
this.date.setSeconds(0,0); this.date.setSeconds(0,0);
return (this.date && typeof this.date.toJSON != 'undefined' && this.date.toJSON())?this.date.toJSON().replace(/\.\d{3}Z$/, 'Z'):this.date; return (this.date && typeof this.date.toJSON != 'undefined' && this.date.toJSON())?this.date.toJSON().replace(/\.\d{3}Z$/, 'Z'):this.date;
} }
}); });}).call(this);
et2_register_widget(et2_date, ["date", "date-time", "date-timeonly"]); et2_register_widget(et2_date, ["date", "date-time", "date-timeonly"]);
/** /**
* @augments et2_date * @augments et2_date
*/ */
var et2_date_duration = et2_date.extend( var et2_date_duration = (function(){ "use strict"; return et2_date.extend(
{ {
attributes: { attributes: {
"data_format": { "data_format": {
@ -853,13 +853,13 @@ var et2_date_duration = et2_date.extend(
} }
return value; return value;
} }
}); });}).call(this);
et2_register_widget(et2_date_duration, ["date-duration"]); et2_register_widget(et2_date_duration, ["date-duration"]);
/** /**
* @augments et2_date_duration * @augments et2_date_duration
*/ */
var et2_date_duration_ro = et2_date_duration.extend([et2_IDetachedDOM], var et2_date_duration_ro = (function(){ "use strict"; return et2_date_duration.extend([et2_IDetachedDOM],
{ {
/** /**
* @memberOf et2_date_duration_ro * @memberOf et2_date_duration_ro
@ -926,14 +926,14 @@ var et2_date_duration_ro = et2_date_duration.extend([et2_IDetachedDOM],
} }
} }
}); });}).call(this);
et2_register_widget(et2_date_duration_ro, ["date-duration_ro"]); et2_register_widget(et2_date_duration_ro, ["date-duration_ro"]);
/** /**
* et2_date_ro is the readonly implementation of some date widget. * et2_date_ro is the readonly implementation of some date widget.
* @augments et2_valueWidget * @augments et2_valueWidget
*/ */
var et2_date_ro = et2_valueWidget.extend([et2_IDetachedDOM], var et2_date_ro = (function(){ "use strict"; return et2_valueWidget.extend([et2_IDetachedDOM],
{ {
/** /**
* Ignore all more advanced attributes. * Ignore all more advanced attributes.
@ -1146,7 +1146,7 @@ var et2_date_ro = et2_valueWidget.extend([et2_IDetachedDOM],
this.span.addClass(_values["class"]); this.span.addClass(_values["class"]);
} }
} }
}); });}).call(this);
et2_register_widget(et2_date_ro, ["date_ro", "date-time_ro", "date-since", "date-time_today", "time_or_date", "date-timeonly_ro"]); et2_register_widget(et2_date_ro, ["date_ro", "date-time_ro", "date-since", "date-time_today", "time_or_date", "date-timeonly_ro"]);
@ -1155,7 +1155,7 @@ et2_register_widget(et2_date_ro, ["date_ro", "date-time_ro", "date-since", "date
* *
* @augments et2_inputWidget * @augments et2_inputWidget
*/ */
var et2_date_range = et2_inputWidget.extend({ var et2_date_range = (function(){ "use strict"; return et2_inputWidget.extend({
attributes: { attributes: {
value: { value: {
"type": "any", "type": "any",
@ -1189,7 +1189,7 @@ var et2_date_range = et2_inputWidget.extend({
this.setDOMNode(this.div[0]); this.setDOMNode(this.div[0]);
this._createWidget(); this._createWidget();
this.set_relative(this.options.relative || false) this.set_relative(this.options.relative || false);
}, },
_createWidget: function createInputWidget() { _createWidget: function createInputWidget() {
@ -1273,7 +1273,7 @@ var et2_date_range = et2_inputWidget.extend({
value = { value = {
from: value[0], from: value[0],
to: value[1] || new Date().valueOf()/1000 to: value[1] || new Date().valueOf()/1000
} };
} }
else if (value && value.from && value.to) else if (value && value.from && value.to)
{ {
@ -1286,7 +1286,7 @@ var et2_date_range = et2_inputWidget.extend({
{ {
return this.options.relative ? return this.options.relative ?
this.select.getValue() : this.select.getValue() :
{ from: this.from.getValue(), to: this.to.getValue() } { from: this.from.getValue(), to: this.to.getValue() };
}, },
_set_relative_value: function(_value) _set_relative_value: function(_value)
@ -1319,14 +1319,14 @@ var et2_date_range = et2_inputWidget.extend({
} }
if(relative) if(relative)
{ {
var dates = ["from","to"] var dates = ["from","to"];
var value = now.toJSON(); var value = now.toJSON();
for(var i = 0; i < dates.length; i++) for(var i = 0; i < dates.length; i++)
{ {
var date = dates[i]; var date = dates[i];
if(typeof relative[date] == "function") if(typeof relative[date] == "function")
{ {
value = relative[date](new Date(value)) value = relative[date](new Date(value));
} }
else else
{ {
@ -1336,7 +1336,7 @@ var et2_date_range = et2_inputWidget.extend({
} }
} }
} }
}); });}).call(this);
et2_register_widget(et2_date_range, ["date-range"]); et2_register_widget(et2_date_range, ["date-range"]);
// Static part of the date range class // Static part of the date range class
jQuery.extend(et2_date_range, jQuery.extend(et2_date_range,
@ -1412,7 +1412,7 @@ jQuery.extend(et2_date_range,
to: function(d) { to: function(d) {
d.setUTCMonth(11); d.setUTCMonth(11);
d.setUTCDate(31); d.setUTCDate(31);
return d return d;
} }
}, },
{ {
@ -1421,16 +1421,16 @@ jQuery.extend(et2_date_range,
from: function(d) { from: function(d) {
d.setUTCMonth(0); d.setUTCMonth(0);
d.setUTCDate(1); d.setUTCDate(1);
d.setUTCYear(d.getUTCYear() - 1) d.setUTCYear(d.getUTCYear() - 1);
return d; return d;
}, },
to: function(d) { to: function(d) {
d.setUTCMonth(11); d.setUTCMonth(11);
d.setUTCDate(31); d.setUTCDate(31);
d.setUTCYear(d.getUTCYear() - 1) d.setUTCYear(d.getUTCYear() - 1);
return d return d;
}
} }
},
/* Still needed? /* Still needed?
'2 years ago' => array(-2,0,0,0, -1,0,0,0), '2 years ago' => array(-2,0,0,0, -1,0,0,0),
'3 years ago' => array(-3,0,0,0, -2,0,0,0), '3 years ago' => array(-3,0,0,0, -2,0,0,0),

View File

@ -10,8 +10,6 @@
* @version $Id$ * @version $Id$
*/ */
"use strict";
/*egw:uses /*egw:uses
jquery.jquery; jquery.jquery;
et2_core_baseWidget; et2_core_baseWidget;
@ -23,7 +21,7 @@
* *
* @augments et2_baseWidget * @augments et2_baseWidget
*/ */
var et2_description = expose(et2_baseWidget.extend([et2_IDetachedDOM], var et2_description = (function(){ "use strict"; return expose(et2_baseWidget.extend([et2_IDetachedDOM],
{ {
attributes: { attributes: {
"label": { "label": {
@ -326,6 +324,6 @@ var et2_description = expose(et2_baseWidget.extend([et2_IDetachedDOM],
_nodes[0].setAttribute("class", _values["class"]); _nodes[0].setAttribute("class", _values["class"]);
} }
} }
})); }));}).call(this);
et2_register_widget(et2_description, ["description", "label"]); et2_register_widget(et2_description, ["description", "label"]);

View File

@ -9,8 +9,6 @@
* @version $Id$ * @version $Id$
*/ */
"use strict";
/*egw:uses /*egw:uses
et2_core_widget; et2_core_widget;
jquery.jquery-ui; jquery.jquery-ui;
@ -89,9 +87,8 @@
* @augments et2_widget * @augments et2_widget
* @see http://api.jqueryui.com/dialog/ * @see http://api.jqueryui.com/dialog/
*/ */
var et2_dialog = et2_widget.extend({ var et2_dialog = (function(){ "use strict"; return et2_widget.extend(
{
attributes: { attributes: {
callback: { callback: {
name: "Callback", name: "Callback",
@ -457,11 +454,11 @@ var et2_dialog = et2_widget.extend({
close: jQuery.proxy(function() {this.destroy();},this) close: jQuery.proxy(function() {this.destroy();},this)
}); });
} }
}); });}).call(this);
et2_register_widget(et2_dialog, ["dialog"]); et2_register_widget(et2_dialog, ["dialog"]);
// Static class stuff // Static class stuff
jQuery.extend(et2_dialog, jQuery.extend(et2_dialog, //(function(){ "use strict"; return
/** @lends et2_dialog */ /** @lends et2_dialog */
{ {
// Some class constants // // Some class constants //
@ -752,4 +749,5 @@ jQuery.extend(et2_dialog,
return dialog; return dialog;
} }
}); }//;}).call(this)
);

View File

@ -10,8 +10,6 @@
* @version $Id$ * @version $Id$
*/ */
"use strict";
/*egw:uses /*egw:uses
jquery.jquery; jquery.jquery;
jquery.jquery-ui; jquery.jquery-ui;
@ -25,7 +23,7 @@
* *
* @augments et2_valueWidget * @augments et2_valueWidget
*/ */
var et2_diff = et2_valueWidget.extend([et2_IDetachedDOM], var et2_diff = (function(){ "use strict"; return et2_valueWidget.extend([et2_IDetachedDOM],
{ {
attributes: { attributes: {
"value": { "value": {
@ -169,5 +167,5 @@ var et2_diff = et2_valueWidget.extend([et2_IDetachedDOM],
this.set_value(_values['value']); this.set_value(_values['value']);
} }
} }
}); });}).call(this);
et2_register_widget(et2_diff, ["diff"]); et2_register_widget(et2_diff, ["diff"]);

View File

@ -10,8 +10,6 @@
* @version $Id$ * @version $Id$
*/ */
"use strict";
/*egw:uses /*egw:uses
jquery.jquery; jquery.jquery;
jquery.jquery-ui; jquery.jquery-ui;
@ -32,7 +30,7 @@
* *
* @augments et2_inputWidget * @augments et2_inputWidget
*/ */
var et2_dropdown_button = et2_inputWidget.extend( var et2_dropdown_button = (function(){ "use strict"; return et2_inputWidget.extend(
{ {
attributes: { attributes: {
"label": { "label": {
@ -398,6 +396,6 @@ var et2_dropdown_button = et2_inputWidget.extend(
getValue: function() { getValue: function() {
return this.value; return this.value;
} }
}); });}).call(this);
et2_register_widget(et2_dropdown_button, ["dropdown_button"]); et2_register_widget(et2_dropdown_button, ["dropdown_button"]);

View File

@ -9,8 +9,6 @@
*/ */
"use strict";
/*egw:uses /*egw:uses
et2_core_valueWidget; et2_core_valueWidget;
*/ */
@ -29,7 +27,7 @@
* *
* @augments et2_valueWidget * @augments et2_valueWidget
*/ */
var et2_entry = et2_valueWidget.extend( var et2_entry = (function(){ "use strict"; return et2_valueWidget.extend(
{ {
attributes: { attributes: {
field: { field: {
@ -157,6 +155,6 @@ var et2_entry = et2_valueWidget.extend(
} }
} }
}); });}).call(this);
et2_register_widget(et2_entry, ["entry", 'contact-value', 'contact-account', 'contact-template', 'infolog-value','tracker-value','records-value']); et2_register_widget(et2_entry, ["entry", 'contact-value', 'contact-account', 'contact-template', 'infolog-value','tracker-value','records-value']);

View File

@ -10,8 +10,6 @@
* @version $Id$ * @version $Id$
*/ */
"use strict";
/*egw:uses /*egw:uses
et2_dropdown_button; et2_dropdown_button;
et2_extension_nextmatch; et2_extension_nextmatch;
@ -44,7 +42,7 @@
* *
* @augments et2_dropdown_button * @augments et2_dropdown_button
*/ */
var et2_favorites = et2_dropdown_button.extend([et2_INextmatchHeader], var et2_favorites = (function(){ "use strict"; return et2_dropdown_button.extend([et2_INextmatchHeader],
{ {
attributes: { attributes: {
"default_pref": { "default_pref": {
@ -403,5 +401,5 @@ var et2_favorites = et2_dropdown_button.extend([et2_INextmatchHeader],
// Re-generate filter list so we can add 'Add current' // Re-generate filter list so we can add 'Add current'
this.init_filters(this); this.init_filters(this);
} }
}); });}).call(this);
et2_register_widget(et2_favorites, ["favorites"]); et2_register_widget(et2_favorites, ["favorites"]);

View File

@ -10,8 +10,6 @@
* @version $Id$ * @version $Id$
*/ */
"use strict";
/*egw:uses /*egw:uses
et2_core_inputWidget; et2_core_inputWidget;
phpgwapi.Resumable.resumable; phpgwapi.Resumable.resumable;
@ -22,7 +20,7 @@
* *
* @augments et2_inputWidget * @augments et2_inputWidget
*/ */
var et2_file = et2_inputWidget.extend( var et2_file = (function(){ "use strict"; return et2_inputWidget.extend(
{ {
attributes: { attributes: {
"multiple": { "multiple": {
@ -649,7 +647,7 @@ var et2_file = et2_inputWidget.extend(
target.remove(); target.remove();
$j(e.target).remove(); $j(e.target).remove();
} }
}); });}).call(this);
et2_register_widget(et2_file, ["file"]); et2_register_widget(et2_file, ["file"]);

View File

@ -10,8 +10,6 @@
* @version $Id$ * @version $Id$
*/ */
"use strict";
/*egw:uses /*egw:uses
jsapi.jsapi; jsapi.jsapi;
jquery.jquery; jquery.jquery;
@ -33,7 +31,7 @@
* @see http://docs.dhtmlx.com/gantt/index.html * @see http://docs.dhtmlx.com/gantt/index.html
* @augments et2_valueWidget * @augments et2_valueWidget
*/ */
var et2_gantt = et2_inputWidget.extend([et2_IResizeable,et2_IInput], var et2_gantt = (function(){ "use strict"; return et2_inputWidget.extend([et2_IResizeable,et2_IInput],
{ {
// Filters are inside gantt namespace // Filters are inside gantt namespace
createNamespace: true, createNamespace: true,
@ -98,7 +96,7 @@ var et2_gantt = et2_inputWidget.extend([et2_IResizeable,et2_IInput],
scale_unit: 'day', scale_unit: 'day',
date_scale: '%d', date_scale: '%d',
subscales: [ subscales: [
{unit:"month", step:1, date:"%F, %Y"}, {unit:"month", step:1, date:"%F, %Y"}
//{unit:"hour", step:1, date:"%G"} //{unit:"hour", step:1, date:"%G"}
], ],
columns: [ columns: [
@ -261,9 +259,9 @@ var et2_gantt = et2_inputWidget.extend([et2_IResizeable,et2_IInput],
* Set the columns for the grid (left) portion * Set the columns for the grid (left) portion
* *
* @param {Object[]} columns - A list of columns * @param {Object[]} columns - A list of columns
* @param {string} columns[].name The column's ID * columns[].name The column's ID
* @param {string} columns[].label The title for the column header * columns[].label The title for the column header
* @param {string} columns[].width Width of the column * columns[].width Width of the column
* *
* @see http://docs.dhtmlx.com/gantt/api__gantt_columns_config.html for full options * @see http://docs.dhtmlx.com/gantt/api__gantt_columns_config.html for full options
*/ */
@ -356,6 +354,8 @@ var et2_gantt = et2_inputWidget.extend([et2_IResizeable,et2_IInput],
* required data. * required data.
* *
* @see http://docs.dhtmlx.com/gantt/desktop__loading.html * @see http://docs.dhtmlx.com/gantt/desktop__loading.html
*
* @param {type} value
*/ */
set_value: function(value) { set_value: function(value) {
if(this.gantt == null) return false; if(this.gantt == null) return false;
@ -520,8 +520,8 @@ var et2_gantt = et2_inputWidget.extend([et2_IResizeable,et2_IInput],
this.gantt.deleteTask(_task_ids[i]); this.gantt.deleteTask(_task_ids[i]);
break; break;
case "add": case "add":
var data = null; var data = this.egw().dataGetUIDdata(_task_ids[i]) && data.data;
if(data = this.egw().dataGetUIDdata(_task_ids[i]) && data.data) if(data)
{ {
this.gantt.parse(data.data); this.gantt.parse(data.data);
this._apply_sort(); this._apply_sort();
@ -572,12 +572,14 @@ var et2_gantt = et2_inputWidget.extend([et2_IResizeable,et2_IInput],
* *
* @return {boolean} True if the value is valid (enough), false to fail * @return {boolean} True if the value is valid (enough), false to fail
*/ */
isValid: function(messages) {return true}, isValid: function(messages) {return true;},
/** /**
* Set a URL to fetch the data from the server. * Set a URL to fetch the data from the server.
* Data must be in the specified format. * Data must be in the specified format.
* @see http://docs.dhtmlx.com/gantt/desktop__loading.html * @see http://docs.dhtmlx.com/gantt/desktop__loading.html
*
* @param {string} url
*/ */
set_autoload: function(url) { set_autoload: function(url) {
if(this.gantt == null) return false; if(this.gantt == null) return false;
@ -735,7 +737,7 @@ var et2_gantt = et2_inputWidget.extend([et2_IResizeable,et2_IInput],
var options = { var options = {
name: (w.gantt.getTask(w.gantt._order[0]).text||'gantt').replace(/ /g,'_')+'.'+to.toLowerCase(), name: (w.gantt.getTask(w.gantt._order[0]).text||'gantt').replace(/ /g,'_')+'.'+to.toLowerCase(),
header: css + egw.config('site_title','phpgwapi'), header: css + egw.config('site_title','phpgwapi'),
footer: $j('#egw_fw_footer',w.opener).html(), footer: $j('#egw_fw_footer',w.opener).html()
// Doesn't work, export never happens: // Doesn't work, export never happens:
// callback: function() {w.setTimeout(function() {w.close();}, 5000);} // callback: function() {w.setTimeout(function() {w.close();}, 5000);}
}; };
@ -831,11 +833,11 @@ var et2_gantt = et2_inputWidget.extend([et2_IResizeable,et2_IInput],
} }
else if (linkId) else if (linkId)
{ {
this._delete_link_handler(linkId,e) this._delete_link_handler(linkId,e);
e.stopPropagation(); e.stopPropagation();
} }
return false; return false;
}) });
// Double click // Double click
this.gantt.attachEvent("onBeforeLightbox", function(id) { this.gantt.attachEvent("onBeforeLightbox", function(id) {
gantt_widget._link_task(id); gantt_widget._link_task(id);
@ -1006,6 +1008,8 @@ var et2_gantt = et2_inputWidget.extend([et2_IResizeable,et2_IInput],
/** /**
* Start UI for selecting among defined columns * Start UI for selecting among defined columns
*
* @param {type} e
*/ */
_column_selection: function(e) _column_selection: function(e)
{ {
@ -1018,7 +1022,7 @@ var et2_gantt = et2_inputWidget.extend([et2_IResizeable,et2_IInput],
columns.push({ columns.push({
value: col.name, value: col.name,
label: col.label label: col.label
}) });
if(!col.hide) if(!col.hide)
{ {
columns_selected.push(col.name); columns_selected.push(col.name);
@ -1146,15 +1150,19 @@ var et2_gantt = et2_inputWidget.extend([et2_IResizeable,et2_IInput],
{ {
obj = objectManager.addObject(taskId, this.dhtmlxGanttItemAOI(this.gantt,taskId)); obj = objectManager.addObject(taskId, this.dhtmlxGanttItemAOI(this.gantt,taskId));
obj.data = this.gantt.getTask(taskId); obj.data = this.gantt.getTask(taskId);
obj.updateActionLinks(objectManager.actionLinks) obj.updateActionLinks(objectManager.actionLinks);
} }
objectManager.setAllSelected(false); objectManager.setAllSelected(false);
obj.setSelected(true); obj.setSelected(true);
objectManager.updateSelectedChildren(obj,true) objectManager.updateSelectedChildren(obj,true);
}, },
/** /**
* ActionObjectInterface for gantt chart * ActionObjectInterface for gantt chart
*
* @param {type} gantt
* @param {type} task_id
* @returns {egwActionObjectInterface|et2_widget_gantt_L34.et2_widget_ganttAnonym$1.dhtmlxGanttItemAOI.aoi}
*/ */
dhtmlxGanttItemAOI: function(gantt, task_id) dhtmlxGanttItemAOI: function(gantt, task_id)
{ {
@ -1165,7 +1173,7 @@ var et2_gantt = et2_inputWidget.extend([et2_IResizeable,et2_IInput],
aoi.id = task_id; aoi.id = task_id;
aoi.doGetDOMNode = function() { aoi.doGetDOMNode = function() {
return aoi.node; return aoi.node;
} };
aoi.doTriggerEvent = function(_event) { aoi.doTriggerEvent = function(_event) {
if (_event == EGW_AI_DRAG_OVER) if (_event == EGW_AI_DRAG_OVER)
@ -1176,7 +1184,7 @@ var et2_gantt = et2_inputWidget.extend([et2_IResizeable,et2_IInput],
{ {
$j(this.node).removeClass("draggedOver"); $j(this.node).removeClass("draggedOver");
} }
} };
aoi.doSetState = function(_state) { aoi.doSetState = function(_state) {
if(!gantt || !gantt.isTaskExists(this.id)) return; if(!gantt || !gantt.isTaskExists(this.id)) return;
@ -1189,12 +1197,12 @@ var et2_gantt = et2_inputWidget.extend([et2_IResizeable,et2_IInput],
{ {
gantt.unselectTask(this.id); gantt.unselectTask(this.id);
} }
} };
return aoi; return aoi;
} }
}); });}).call(this);
et2_register_widget(et2_gantt, ["gantt"]); et2_register_widget(et2_gantt, ["gantt"]);
/** /**
@ -1203,12 +1211,15 @@ et2_register_widget(et2_gantt, ["gantt"]);
// Localize to user's language - breaks if file is not there // Localize to user's language - breaks if file is not there
//egw.includeJS("/phpgwapi/js/dhtmlxGantt/codebase/locale/locale_" + egw.preference('lang') + ".js"); //egw.includeJS("/phpgwapi/js/dhtmlxGantt/codebase/locale/locale_" + egw.preference('lang') + ".js");
$j(function() { $j(function()
{
"use strict";
// Set icon to match application // Set icon to match application
gantt.templates.grid_file = function(item) { gantt.templates.grid_file = function(item) {
if(!item.pe_icon || !egw.image(item.pe_icon)) return "<div class='gantt_tree_icon gantt_file'></div>"; if(!item.pe_icon || !egw.image(item.pe_icon)) return "<div class='gantt_tree_icon gantt_file'></div>";
return "<div class='gantt_tree_icon' style='background-image: url(\"" + egw.image(item.pe_icon) + "\");'/></div>"; return "<div class='gantt_tree_icon' style='background-image: url(\"" + egw.image(item.pe_icon) + "\");'/></div>";
} };
// CSS for scale row, turns on clickable // CSS for scale row, turns on clickable
gantt.templates.scale_row_class = function(scale) { gantt.templates.scale_row_class = function(scale) {
@ -1217,7 +1228,7 @@ $j(function() {
return scale.class || 'et2_clickable'; return scale.class || 'et2_clickable';
} }
return scale.class; return scale.class;
} };
// Include progress text in the bar // Include progress text in the bar
gantt.templates.progress_text = function(start, end, task) { gantt.templates.progress_text = function(start, end, task) {
@ -1232,7 +1243,7 @@ $j(function() {
}; };
gantt.templates.task_cell_class = function(item,date){ gantt.templates.task_cell_class = function(item,date){
if(date.getDay()==0||date.getDay()==6){ if(date.getDay()==0||date.getDay()==6){
return "weekend" return "weekend";
} }
}; };
@ -1272,7 +1283,7 @@ $j(function() {
switch (link.type) switch (link.type)
{ {
case types.finish_to_start: case types.finish_to_start:
valid = (source.end_date <= target.start_date) valid = (source.end_date <= target.start_date);
break; break;
case types.start_to_start: case types.start_to_start:
valid = (source.start_date <= target.start_date); valid = (source.start_date <= target.start_date);
@ -1281,12 +1292,12 @@ $j(function() {
valid = (source.end_date >= target.end_date); valid = (source.end_date >= target.end_date);
break; break;
case types.start_to_finish: case types.start_to_finish:
valid = (source.start_date >= target.end_date) valid = (source.start_date >= target.end_date);
break; break;
} }
link_class += valid ? '' : 'invalid_constraint'; link_class += valid ? '' : 'invalid_constraint';
return link_class; return link_class;
} };
}); });

View File

@ -10,8 +10,6 @@
* @version $Id$ * @version $Id$
*/ */
"use strict";
/*egw:uses /*egw:uses
jquery.jquery; jquery.jquery;
et2_core_DOMWidget; et2_core_DOMWidget;
@ -26,7 +24,7 @@
* *
* @augments et2_DOMWidget * @augments et2_DOMWidget
*/ */
var et2_grid = et2_DOMWidget.extend([et2_IDetachedDOM, et2_IAligned, et2_IResizeable], var et2_grid = (function(){ "use strict"; return et2_DOMWidget.extend([et2_IDetachedDOM, et2_IAligned, et2_IResizeable],
{ {
createNamespace: true, createNamespace: true,
@ -1070,5 +1068,5 @@ var et2_grid = et2_DOMWidget.extend([et2_IDetachedDOM, et2_IAligned, et2_IResize
} }
} }
} }
}); });}).call(this);
et2_register_widget(et2_grid, ["grid"]); et2_register_widget(et2_grid, ["grid"]);

View File

@ -10,8 +10,6 @@
* @version $Id$ * @version $Id$
*/ */
"use strict";
/*egw:uses /*egw:uses
et2_core_baseWidget; et2_core_baseWidget;
*/ */
@ -21,7 +19,7 @@
* *
* @augments et2_baseWidget * @augments et2_baseWidget
*/ */
var et2_groupbox = et2_baseWidget.extend( var et2_groupbox = (function(){ "use strict"; return et2_baseWidget.extend(
{ {
/** /**
* Constructor * Constructor
@ -33,13 +31,13 @@ var et2_groupbox = et2_baseWidget.extend(
this.setDOMNode(document.createElement("fieldset")); this.setDOMNode(document.createElement("fieldset"));
} }
}); });}).call(this);
et2_register_widget(et2_groupbox, ["groupbox"]); et2_register_widget(et2_groupbox, ["groupbox"]);
/** /**
* @augments et2_baseWidget * @augments et2_baseWidget
*/ */
var et2_groupbox_legend = et2_baseWidget.extend( var et2_groupbox_legend = (function(){ "use strict"; return et2_baseWidget.extend(
{ {
attributes: { attributes: {
"label": { "label": {
@ -62,5 +60,5 @@ var et2_groupbox_legend = et2_baseWidget.extend(
var legend = jQuery(document.createElement("legend")).text(this.options.label); var legend = jQuery(document.createElement("legend")).text(this.options.label);
this.setDOMNode(legend[0]); this.setDOMNode(legend[0]);
} }
}); });}).call(this);
et2_register_widget(et2_groupbox_legend, ["caption"]); et2_register_widget(et2_groupbox_legend, ["caption"]);

View File

@ -10,8 +10,6 @@
* @version $Id: et2_box.js 36147 2011-08-16 13:12:39Z igel457 $ * @version $Id: et2_box.js 36147 2011-08-16 13:12:39Z igel457 $
*/ */
"use strict";
/*egw:uses /*egw:uses
jquery.jquery; jquery.jquery;
et2_core_baseWidget; et2_core_baseWidget;
@ -22,7 +20,7 @@
* *
* @augments et2_baseWidget * @augments et2_baseWidget
*/ */
var et2_hbox = et2_baseWidget.extend( var et2_hbox = (function(){ "use strict"; return et2_baseWidget.extend(
{ {
createNamespace: true, createNamespace: true,
@ -184,6 +182,6 @@ var et2_hbox = et2_baseWidget.extend(
jQuery(child.getDOMNode(child)).css("display", "inline-table"); jQuery(child.getDOMNode(child)).css("display", "inline-table");
} }
} }
}); });}).call(this);
et2_register_widget(et2_hbox, ["hbox"]); et2_register_widget(et2_hbox, ["hbox"]);

View File

@ -10,8 +10,6 @@
* @version $Id$ * @version $Id$
*/ */
"use strict";
/*egw:uses /*egw:uses
jquery.jquery; jquery.jquery;
jquery.jquery-ui; jquery.jquery-ui;
@ -31,7 +29,7 @@
* *
* @augments et2_valueWidget * @augments et2_valueWidget
*/ */
var et2_historylog = et2_valueWidget.extend([et2_IDataProvider,et2_IResizeable], var et2_historylog = (function(){ "use strict"; return et2_valueWidget.extend([et2_IDataProvider,et2_IResizeable],
{ {
createNamespace: true, createNamespace: true,
attributes: { attributes: {
@ -449,6 +447,11 @@ var et2_historylog = et2_valueWidget.extend([et2_IDataProvider,et2_IResizeable],
* The row callback gets called by the gridview controller whenever * The row callback gets called by the gridview controller whenever
* the actual DOM-Nodes for a node with the given data have to be * the actual DOM-Nodes for a node with the given data have to be
* created. * created.
*
* @param {type} _data
* @param {type} _row
* @param {type} _idx
* @param {type} _entry
*/ */
rowCallback: function(_data, _row, _idx, _entry) { rowCallback: function(_data, _row, _idx, _entry) {
var tr = _row.getDOMNode(); var tr = _row.getDOMNode();
@ -546,6 +549,10 @@ var et2_historylog = et2_valueWidget.extend([et2_IDataProvider,et2_IResizeable],
/** /**
* How to tell if the row needs a diff widget or not * How to tell if the row needs a diff widget or not
*
* @param {string} columnName
* @param {string} value
* @returns {Boolean}
*/ */
_needsDiffWidget: function(columnName, value) { _needsDiffWidget: function(columnName, value) {
if(typeof value !== "string") if(typeof value !== "string")
@ -577,5 +584,5 @@ var et2_historylog = et2_valueWidget.extend([et2_IDataProvider,et2_IResizeable],
} }
} }
} }
}); });}).call(this);
et2_register_widget(et2_historylog, ['historylog']); et2_register_widget(et2_historylog, ['historylog']);

View File

@ -10,8 +10,6 @@
* @version $Id$ * @version $Id$
*/ */
"use strict";
/*egw:uses /*egw:uses
et2_core_baseWidget; et2_core_baseWidget;
*/ */
@ -21,7 +19,7 @@
* *
* @augments et2_baseWidget * @augments et2_baseWidget
*/ */
var et2_hrule = et2_baseWidget.extend( var et2_hrule = (function(){ "use strict"; return et2_baseWidget.extend(
{ {
/** /**
* Constructor * Constructor
@ -33,6 +31,6 @@ var et2_hrule = et2_baseWidget.extend(
this.setDOMNode(document.createElement("hr")); this.setDOMNode(document.createElement("hr"));
} }
}); });}).call(this);
et2_register_widget(et2_hrule, ["hrule"]); et2_register_widget(et2_hrule, ["hrule"]);

View File

@ -10,8 +10,6 @@
* @version $Id$ * @version $Id$
*/ */
"use strict";
/*egw:uses /*egw:uses
jsapi.jsapi; // Needed for egw_seperateJavaScript jsapi.jsapi; // Needed for egw_seperateJavaScript
jquery.jquery; jquery.jquery;
@ -21,7 +19,7 @@
/** /**
* @augments et2_valueWidget * @augments et2_valueWidget
*/ */
var et2_html = et2_valueWidget.extend([et2_IDetachedDOM], var et2_html = (function(){ "use strict"; return et2_valueWidget.extend([et2_IDetachedDOM],
{ {
attributes: { attributes: {
'label': { 'label': {
@ -112,6 +110,6 @@ var et2_html = et2_valueWidget.extend([et2_IDetachedDOM],
} }
} }
}); });}).call(this);
et2_register_widget(et2_html, ["html","htmlarea_ro"]); et2_register_widget(et2_html, ["html","htmlarea_ro"]);

View File

@ -10,8 +10,6 @@
* @version $Id$ * @version $Id$
*/ */
"use strict";
/*egw:uses /*egw:uses
jsapi.jsapi; // Needed for egw_seperateJavaScript jsapi.jsapi; // Needed for egw_seperateJavaScript
jquery.jquery; jquery.jquery;
@ -24,7 +22,7 @@
/** /**
* @augments et2_inputWidget * @augments et2_inputWidget
*/ */
var et2_htmlarea = et2_inputWidget.extend([et2_IResizeable], var et2_htmlarea = (function(){ "use strict"; return et2_inputWidget.extend([et2_IResizeable],
{ {
modes: ['ascii','simple','extended','advanced'], modes: ['ascii','simple','extended','advanced'],
@ -311,6 +309,6 @@ var et2_htmlarea = et2_inputWidget.extend([et2_IResizeable],
} }
} }
} }
}); });}).call(this);
et2_register_widget(et2_htmlarea, ["htmlarea"]); et2_register_widget(et2_htmlarea, ["htmlarea"]);

View File

@ -10,8 +10,6 @@
* @version $Id$ * @version $Id$
*/ */
"use strict";
/*egw:uses /*egw:uses
et2_core_valueWidget; et2_core_valueWidget;
*/ */
@ -19,7 +17,7 @@
/** /**
* @augments et2_valueWidget * @augments et2_valueWidget
*/ */
var et2_iframe = et2_valueWidget.extend( var et2_iframe = (function(){ "use strict"; return et2_valueWidget.extend(
{ {
attributes: { attributes: {
'label': { 'label': {
@ -152,5 +150,5 @@ var et2_iframe = et2_valueWidget.extend(
set_srcdoc: function(_value) { set_srcdoc: function(_value) {
this.htmlNode.attr("srcdoc", _value); this.htmlNode.attr("srcdoc", _value);
} }
}); });}).call(this);
et2_register_widget(et2_iframe, ["iframe"]); et2_register_widget(et2_iframe, ["iframe"]);

View File

@ -10,8 +10,6 @@
* @version $Id$ * @version $Id$
*/ */
"use strict";
/*egw:uses /*egw:uses
jquery.jquery; jquery.jquery;
et2_core_interfaces; et2_core_interfaces;
@ -24,7 +22,7 @@
* *
* @augments et2_baseWidget * @augments et2_baseWidget
*/ */
var et2_image = expose(et2_baseWidget.extend([et2_IDetachedDOM], var et2_image = (function(){ "use strict"; return expose(et2_baseWidget.extend([et2_IDetachedDOM],
{ {
attributes: { attributes: {
"src": { "src": {
@ -272,14 +270,14 @@ var et2_image = expose(et2_baseWidget.extend([et2_IDetachedDOM],
this.set_href(_values["href"]); this.set_href(_values["href"]);
} }
} }
})); }));}).call(this);
et2_register_widget(et2_image, ["image"]); et2_register_widget(et2_image, ["image"]);
/** /**
* Widget displaying an application icon * Widget displaying an application icon
*/ */
var et2_appicon = et2_image.extend( var et2_appicon = (function(){ "use strict"; return et2_image.extend(
{ {
attributes: { attributes: {
default_src: { default_src: {
@ -297,5 +295,5 @@ var et2_appicon = et2_image.extend(
this._super.call(this, _app == 'sitemgr-link' ? 'sitemgr/sitemgr-link' : // got removed from jdots this._super.call(this, _app == 'sitemgr-link' ? 'sitemgr/sitemgr-link' : // got removed from jdots
(this.egw().app(_app, 'icon_app') || _app)+'/'+(this.egw().app(_app, 'icon') || 'navbar')); (this.egw().app(_app, 'icon_app') || _app)+'/'+(this.egw().app(_app, 'icon') || 'navbar'));
} }
}); });}).call(this);
et2_register_widget(et2_appicon, ["appicon"]); et2_register_widget(et2_appicon, ["appicon"]);

View File

@ -13,8 +13,6 @@
* @version $Id: et2_widget_itempicker.js 38623 2012-03-26 23:27:53Z jaytraxx $ * @version $Id: et2_widget_itempicker.js 38623 2012-03-26 23:27:53Z jaytraxx $
*/ */
"use strict";
/*egw:uses /*egw:uses
jquery.jquery; jquery.jquery;
et2_core_inputWidget; et2_core_inputWidget;
@ -28,7 +26,7 @@
* *
* @augments et2_inputWidget * @augments et2_inputWidget
*/ */
var et2_itempicker = et2_inputWidget.extend( var et2_itempicker = (function(){ "use strict"; return et2_inputWidget.extend(
{ {
attributes: { attributes: {
"action": { "action": {
@ -66,7 +64,7 @@ var et2_itempicker = et2_inputWidget.extend(
"type": "any", "type": "any",
"default": false, "default": false,
"description": "Callback before query to server. Must return true, or false to abort query." "description": "Callback before query to server. Must return true, or false to abort query."
}, }
}, },
legacyOptions: ["application"], legacyOptions: ["application"],
@ -140,7 +138,7 @@ var et2_itempicker = et2_inputWidget.extend(
} }
var img = $j(document.createElement("img")); var img = $j(document.createElement("img"));
img.attr("src", img_icon); img.attr("src", img_icon);
var item = $j(document.createElement("li")) var item = $j(document.createElement("li"));
item.attr("id", key) item.attr("id", key)
.click(function() { .click(function() {
_self.selectApplication($j(this)); _self.selectApplication($j(this));
@ -305,7 +303,7 @@ var et2_itempicker = et2_inputWidget.extend(
if (_attrs["select_options"] == null) if (_attrs["select_options"] == null)
{ {
_attrs["select_options"] = this.getArrayMgr('content') _attrs["select_options"] = this.getArrayMgr('content')
.getEntry("options-" + this.id) .getEntry("options-" + this.id);
} }
// Default to an empty object // Default to an empty object
@ -363,7 +361,7 @@ var et2_itempicker = et2_inputWidget.extend(
this.itemlist.html(list); this.itemlist.html(list);
} }
}); });}).call(this);
et2_register_widget(et2_itempicker, ["itempicker"]); et2_register_widget(et2_itempicker, ["itempicker"]);

View File

@ -10,8 +10,6 @@
* @version $Id$ * @version $Id$
*/ */
"use strict";
/*egw:uses /*egw:uses
jquery.jquery; jquery.jquery;
jquery.jquery-ui; jquery.jquery-ui;
@ -27,7 +25,7 @@
* *
* @augments et2_inputWidget * @augments et2_inputWidget
*/ */
var et2_link_to = et2_inputWidget.extend( var et2_link_to = (function(){ "use strict"; return et2_inputWidget.extend(
{ {
attributes: { attributes: {
"only_app": { "only_app": {
@ -422,13 +420,13 @@ var et2_link_to = et2_inputWidget.extend(
} }
this.options.no_files = no_files; this.options.no_files = no_files;
} }
}); });}).call(this);
et2_register_widget(et2_link_to, ["link-to"]); et2_register_widget(et2_link_to, ["link-to"]);
/** /**
* @augments et2_selectbox * @augments et2_selectbox
*/ */
var et2_link_apps = et2_selectbox.extend( var et2_link_apps = (function(){ "use strict"; return et2_selectbox.extend(
{ {
attributes: { attributes: {
"only_app": { "only_app": {
@ -492,13 +490,13 @@ var et2_link_apps = et2_selectbox.extend(
_attrs.select_options = select_options; _attrs.select_options = select_options;
this._super.apply(this, arguments); this._super.apply(this, arguments);
} }
}); });}).call(this);
et2_register_widget(et2_link_apps, ["link-apps"]); et2_register_widget(et2_link_apps, ["link-apps"]);
/** /**
* @augments et2_inputWidget * @augments et2_inputWidget
*/ */
var et2_link_entry = et2_inputWidget.extend( var et2_link_entry = (function(){ "use strict"; return et2_inputWidget.extend(
{ {
attributes: { attributes: {
"value": { "value": {
@ -890,7 +888,7 @@ var et2_link_entry = et2_inputWidget.extend(
/** /**
* Set the query callback * Set the query callback
* *
* @param {function} query * @param {function} f
*/ */
set_query: function(f) set_query: function(f)
{ {
@ -900,7 +898,7 @@ var et2_link_entry = et2_inputWidget.extend(
/** /**
* Set the select callback * Set the select callback
* *
* @param {function} query * @param {function} f
*/ */
set_select: function(f) set_select: function(f)
{ {
@ -1030,7 +1028,7 @@ var et2_link_entry = et2_inputWidget.extend(
if(values.id) { if(values.id) {
links.push({ links.push({
app: values.app, app: values.app,
id: values.id, id: values.id
}); });
self.search.val(""); self.search.val("");
} }
@ -1062,7 +1060,7 @@ var et2_link_entry = et2_inputWidget.extend(
delete this.options.value.id; delete this.options.value.id;
} }
} }
}); });}).call(this);
et2_register_widget(et2_link_entry, ["link-entry"]); et2_register_widget(et2_link_entry, ["link-entry"]);
/** /**
@ -1070,7 +1068,7 @@ et2_register_widget(et2_link_entry, ["link-entry"]);
* *
* @augments et2_valueWidget * @augments et2_valueWidget
*/ */
var et2_link = et2_valueWidget.extend([et2_IDetachedDOM], var et2_link = (function(){ "use strict"; return et2_valueWidget.extend([et2_IDetachedDOM],
{ {
attributes: { attributes: {
"only_app": { "only_app": {
@ -1235,7 +1233,7 @@ var et2_link = et2_valueWidget.extend([et2_IDetachedDOM],
if(typeof _values["value"] !== "undefined") this.set_value(_values["value"]); if(typeof _values["value"] !== "undefined") this.set_value(_values["value"]);
} }
}); });}).call(this);
et2_register_widget(et2_link, ["link", "link-entry_ro"]); et2_register_widget(et2_link, ["link", "link-entry_ro"]);
/** /**
@ -1243,7 +1241,7 @@ et2_register_widget(et2_link, ["link", "link-entry_ro"]);
* *
* @augments et2_valueWidget * @augments et2_valueWidget
*/ */
var et2_link_string = expose(et2_valueWidget.extend([et2_IDetachedDOM], var et2_link_string = (function(){ "use strict"; return expose(et2_valueWidget.extend([et2_IDetachedDOM],
{ {
attributes: { attributes: {
"application": { "application": {
@ -1273,7 +1271,7 @@ var et2_link_string = expose(et2_valueWidget.extend([et2_IDetachedDOM],
type: "boolean", type: "boolean",
default: true, default: true,
description: "Clicking on description with href value would popup an expose view, and will show content referenced by href." description: "Clicking on description with href value would popup an expose view, and will show content referenced by href."
}, }
}, },
/** /**
@ -1367,7 +1365,7 @@ var et2_link_string = expose(et2_valueWidget.extend([et2_IDetachedDOM],
type: _value.type, type: _value.type,
poster:'', // TODO: Should be changed by correct video thumbnail later poster:'', // TODO: Should be changed by correct video thumbnail later
href: base_url + egw().mime_open(_value), href: base_url + egw().mime_open(_value),
download_href: base_url + egw().mime_open(_value) + '?download', download_href: base_url + egw().mime_open(_value) + '?download'
}]; }];
} }
else if(_value) else if(_value)
@ -1376,7 +1374,7 @@ var et2_link_string = expose(et2_valueWidget.extend([et2_IDetachedDOM],
title: _value.id, title: _value.id,
href: base_url + egw().mime_open(_value).url, href: base_url + egw().mime_open(_value).url,
download_href: base_url + egw().mime_open(_value).url + '?download', download_href: base_url + egw().mime_open(_value).url + '?download',
type: _value.type, type: _value.type
}]; }];
} }
if (mediaContent[0].href && mediaContent[0].href.match(/\/webdav.php/,'ig')) mediaContent[0]["download_href"] = mediaContent[0].href + '?download'; if (mediaContent[0].href && mediaContent[0].href.match(/\/webdav.php/,'ig')) mediaContent[0]["download_href"] = mediaContent[0].href + '?download';
@ -1473,7 +1471,7 @@ var et2_link_string = expose(et2_valueWidget.extend([et2_IDetachedDOM],
this._labelContainer.contents().not(this.list).remove(); this._labelContainer.contents().not(this.list).remove();
} }
} }
})); }));}).call(this);
et2_register_widget(et2_link_string, ["link-string"]); et2_register_widget(et2_link_string, ["link-string"]);
/** /**
@ -1481,7 +1479,7 @@ et2_register_widget(et2_link_string, ["link-string"]);
* *
* @augments et2_link_string * @augments et2_link_string
*/ */
var et2_link_list = et2_link_string.extend( var et2_link_list = (function(){ "use strict"; return et2_link_string.extend(
{ {
attributes: { attributes: {
"show_deleted": { "show_deleted": {
@ -1899,7 +1897,7 @@ var et2_link_list = et2_link_string.extend(
self.list.append(div); self.list.append(div);
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(); $j('#drag_helper',self.list).remove();
@ -2007,7 +2005,7 @@ var et2_link_list = et2_link_string.extend(
$td.html('<span style="display: inline-block; width:'+span_size+'ex;">'+dirs.join('/')+':</span> - ' + filename); $td.html('<span style="display: inline-block; width:'+span_size+'ex;">'+dirs.join('/')+':</span> - ' + filename);
} }
} }
}); });}).call(this);
et2_register_widget(et2_link_list, ["link-list"]); et2_register_widget(et2_link_list, ["link-list"]);
@ -2016,7 +2014,7 @@ et2_register_widget(et2_link_list, ["link-list"]);
* *
* @augments et2_inputWidget * @augments et2_inputWidget
*/ */
var et2_link_add = et2_inputWidget.extend( var et2_link_add = (function(){ "use strict"; return et2_inputWidget.extend(
{ {
attributes: { attributes: {
"value": { "value": {
@ -2074,5 +2072,5 @@ var et2_link_add = et2_inputWidget.extend(
getValue: function() { getValue: function() {
return null; return null;
} }
}); });}).call(this);
et2_register_widget(et2_link_add, ["link-add"]); et2_register_widget(et2_link_add, ["link-add"]);

View File

@ -10,8 +10,6 @@
* @version $Id$ * @version $Id$
*/ */
"use strict";
/*egw:uses /*egw:uses
et2_widget_textbox; et2_widget_textbox;
*/ */
@ -21,7 +19,7 @@
* *
* @augments et2_textbox * @augments et2_textbox
*/ */
var et2_number = et2_textbox.extend( var et2_number = (function(){ "use strict"; return et2_textbox.extend(
{ {
attributes: { attributes: {
"value": { "value": {
@ -142,7 +140,7 @@ var et2_number = et2_textbox.extend(
this.input.attr("max",this.max); this.input.attr("max",this.max);
} }
} }
}); });}).call(this);
et2_register_widget(et2_number, ["int", "integer", "float"]); et2_register_widget(et2_number, ["int", "integer", "float"]);
/** /**
@ -151,7 +149,7 @@ et2_register_widget(et2_number, ["int", "integer", "float"]);
* @augments et2_textbox_ro * @augments et2_textbox_ro
* @class * @class
*/ */
var et2_number_ro = et2_textbox_ro.extend( var et2_number_ro = (function(){ "use strict"; return et2_textbox_ro.extend(
{ {
attributes: { attributes: {
min: { ignore: true}, min: { ignore: true},
@ -173,5 +171,5 @@ var et2_number_ro = et2_textbox_ro.extend(
} }
this._super.call(this, _value); this._super.call(this, _value);
} }
}); });}).call(this);
et2_register_widget(et2_number_ro, ["int_ro", "integer_ro", "float_ro"]); et2_register_widget(et2_number_ro, ["int_ro", "integer_ro", "float_ro"]);

View File

@ -10,8 +10,6 @@
* @version $Id$ * @version $Id$
*/ */
"use strict";
/*egw:uses /*egw:uses
jquery.jquery; jquery.jquery;
et2_core_baseWidget; et2_core_baseWidget;
@ -28,7 +26,7 @@
* @link http://docs.oasis-open.org/wsrp/v2/wsrp-2.0-spec-os-01.html * @link http://docs.oasis-open.org/wsrp/v2/wsrp-2.0-spec-os-01.html
* @augments et2_baseWidget * @augments et2_baseWidget
*/ */
var et2_portlet = et2_valueWidget.extend( var et2_portlet = (function(){ "use strict"; return et2_valueWidget.extend(
{ {
attributes: { attributes: {
"title": { "title": {
@ -396,5 +394,5 @@ var et2_portlet = et2_valueWidget.extend(
this.div.css('height',''); this.div.css('height','');
} }
}); });}).call(this);
et2_register_widget(et2_portlet, ["portlet"]); et2_register_widget(et2_portlet, ["portlet"]);

View File

@ -9,8 +9,6 @@
* @version $Id$ * @version $Id$
*/ */
"use strict";
/*egw:uses /*egw:uses
jquery.jquery; jquery.jquery;
et2_core_interfaces; et2_core_interfaces;
@ -22,7 +20,7 @@
* *
* @augments et2_valueWidget * @augments et2_valueWidget
*/ */
var et2_progress = et2_valueWidget.extend([et2_IDetachedDOM], var et2_progress = (function(){ "use strict"; return et2_valueWidget.extend([et2_IDetachedDOM],
{ {
attributes: { attributes: {
"href": { "href": {
@ -181,5 +179,5 @@ var et2_progress = et2_valueWidget.extend([et2_IDetachedDOM],
this.set_href(_values["href"]); this.set_href(_values["href"]);
} }
} }
}); });}).call(this);
et2_register_widget(et2_progress, ["progress"]); et2_register_widget(et2_progress, ["progress"]);

View File

@ -10,8 +10,6 @@
* @version $Id$ * @version $Id$
*/ */
"use strict";
/*egw:uses /*egw:uses
jquery.jquery; jquery.jquery;
et2_core_inputWidget; et2_core_inputWidget;
@ -26,7 +24,7 @@
* *
* @augments et2_inputWidget * @augments et2_inputWidget
*/ */
var et2_radiobox = et2_inputWidget.extend( var et2_radiobox = (function(){ "use strict"; return et2_inputWidget.extend(
{ {
attributes: { attributes: {
"set_value": { "set_value": {
@ -138,6 +136,9 @@ var et2_radiobox = et2_inputWidget.extend(
/** /**
* Overridden from parent so if it's required, only 1 in a group needs a value * Overridden from parent so if it's required, only 1 in a group needs a value
*
* @param {array} messages
* @returns {Boolean}
*/ */
isValid: function(messages) { isValid: function(messages) {
var ok = true; var ok = true;
@ -153,14 +154,14 @@ var et2_radiobox = et2_inputWidget.extend(
} }
} }
return ok; return ok;
}, }
}); });}).call(this);
et2_register_widget(et2_radiobox, ["radio"]); et2_register_widget(et2_radiobox, ["radio"]);
/** /**
* @augments et2_valueWidget * @augments et2_valueWidget
*/ */
var et2_radiobox_ro = et2_valueWidget.extend([et2_IDetachedDOM], var et2_radiobox_ro = (function(){ "use strict"; return et2_valueWidget.extend([et2_IDetachedDOM],
{ {
attributes: { attributes: {
"set_value": { "set_value": {
@ -245,7 +246,7 @@ var et2_radiobox_ro = et2_valueWidget.extend([et2_IDetachedDOM],
this.span = jQuery(_nodes[0]); this.span = jQuery(_nodes[0]);
this.set_value(_values["value"]); this.set_value(_values["value"]);
} }
}); });}).call(this);
et2_register_widget(et2_radiobox_ro, ["radio_ro"]); et2_register_widget(et2_radiobox_ro, ["radio_ro"]);
@ -254,7 +255,7 @@ et2_register_widget(et2_radiobox_ro, ["radio_ro"]);
* *
* @augments et2_valueWidget * @augments et2_valueWidget
*/ */
var et2_radioGroup = et2_valueWidget.extend([et2_IDetachedDOM], var et2_radioGroup = (function(){ "use strict"; return et2_valueWidget.extend([et2_IDetachedDOM],
{ {
attributes: { attributes: {
"label": { "label": {
@ -432,6 +433,6 @@ var et2_radioGroup = et2_valueWidget.extend([et2_IDetachedDOM],
{ {
} }
}); });}).call(this);
// No such tag as 'radiogroup', but it needs something // No such tag as 'radiogroup', but it needs something
et2_register_widget(et2_radioGroup, ["radiogroup"]); et2_register_widget(et2_radioGroup, ["radiogroup"]);

View File

@ -10,8 +10,6 @@
* @version $Id$ * @version $Id$
*/ */
"use strict";
/*egw:uses /*egw:uses
et2_core_widget; et2_core_widget;
*/ */
@ -33,7 +31,7 @@
* *
* @augments et2_widget * @augments et2_widget
*/ */
var et2_script = et2_widget.extend( var et2_script = (function(){ "use strict"; return et2_widget.extend(
{ {
/** /**
* Constructor * Constructor
@ -65,5 +63,5 @@ var et2_script = et2_widget.extend(
this.egw.debug('error', 'Error while executing script: ',_content,e); this.egw.debug('error', 'Error while executing script: ',_content,e);
} }
} }
}); });}).call(this);
et2_register_widget(et2_script, ["script"]); et2_register_widget(et2_script, ["script"]);

View File

@ -13,8 +13,6 @@
* @version $Id$ * @version $Id$
*/ */
"use strict";
/*egw:uses /*egw:uses
et2_widget_link; et2_widget_link;
*/ */
@ -31,7 +29,7 @@
* *
* @augments et2_selectbox * @augments et2_selectbox
*/ */
var et2_selectAccount = et2_selectbox.extend( var et2_selectAccount = (function(){ "use strict"; return et2_selectbox.extend(
{ {
attributes: { attributes: {
'account_type': { 'account_type': {
@ -738,7 +736,7 @@ var et2_selectAccount = et2_selectbox.extend(
this.set_tags(this.options.tags, this.options.width); this.set_tags(this.options.tags, this.options.width);
} }
} }
}); });}).call(this);
et2_register_widget(et2_selectAccount, ["select-account"]); et2_register_widget(et2_selectAccount, ["select-account"]);
/** /**
@ -748,7 +746,7 @@ et2_register_widget(et2_selectAccount, ["select-account"]);
* *
* @augments et2_link_string * @augments et2_link_string
*/ */
var et2_selectAccount_ro = et2_link_string.extend([et2_IDetachedDOM], var et2_selectAccount_ro = (function(){ "use strict"; return et2_link_string.extend([et2_IDetachedDOM],
{ {
attributes: { attributes: {
"empty_label": { "empty_label": {
@ -882,5 +880,5 @@ var et2_selectAccount_ro = et2_link_string.extend([et2_IDetachedDOM],
} }
} }
} }
}); });}).call(this);
et2_register_widget(et2_selectAccount_ro, ["select-account_ro"]); et2_register_widget(et2_selectAccount_ro, ["select-account_ro"]);

View File

@ -11,8 +11,6 @@
* @version $Id$ * @version $Id$
*/ */
"use strict";
/*egw:uses /*egw:uses
jquery.jquery; jquery.jquery;
/phpgwapi/js/jquery/chosen/chosen.jquery.js; /phpgwapi/js/jquery/chosen/chosen.jquery.js;
@ -24,7 +22,7 @@
/** /**
* @augments et2_inputWidget * @augments et2_inputWidget
*/ */
var et2_selectbox = et2_inputWidget.extend( var et2_selectbox = (function(){ "use strict"; return et2_inputWidget.extend(
{ {
attributes: { attributes: {
"multiple": { "multiple": {
@ -770,7 +768,7 @@ var et2_selectbox = et2_inputWidget.extend(
return this._super.apply(this, arguments); return this._super.apply(this, arguments);
} }
} }
}); });}).call(this);
et2_register_widget(et2_selectbox, ["menupopup", "listbox", "select", "select-cat", et2_register_widget(et2_selectbox, ["menupopup", "listbox", "select", "select-cat",
"select-percent", 'select-priority', "select-percent", 'select-priority',
'select-country', 'select-state', 'select-year', 'select-month', 'select-country', 'select-state', 'select-year', 'select-month',
@ -778,7 +776,7 @@ et2_register_widget(et2_selectbox, ["menupopup", "listbox", "select", "select-ca
'select-lang', 'select-bool', 'select-timezone' ]); 'select-lang', 'select-bool', 'select-timezone' ]);
// Static class stuff // Static class stuff
jQuery.extend(et2_selectbox, jQuery.extend(et2_selectbox, //(function(){ "use strict"; return
{ {
type_cache: {}, type_cache: {},
@ -949,6 +947,8 @@ jQuery.extend(et2_selectbox,
* We still need the same thing on the server side to validate, so they * We still need the same thing on the server side to validate, so they
* have to match. See etemplate_widget_menupopup::typeOptions() * have to match. See etemplate_widget_menupopup::typeOptions()
* The type specific legacy options wind up in attrs.other. * The type specific legacy options wind up in attrs.other.
*
* @param {type} widget
*/ */
priority_options: function(widget) { priority_options: function(widget) {
return [ return [
@ -1165,14 +1165,15 @@ jQuery.extend(et2_selectbox,
return cache; return cache;
} }
} }
}); }//;}).call(this)
);
/** /**
* et2_selectbox_ro is the readonly implementation of the selectbox. * et2_selectbox_ro is the readonly implementation of the selectbox.
* *
* @augments et2_selectbox * @augments et2_selectbox
*/ */
var et2_selectbox_ro = et2_selectbox.extend([et2_IDetachedDOM], var et2_selectbox_ro = (function(){ "use strict"; return et2_selectbox.extend([et2_IDetachedDOM],
{ {
/** /**
* Constructor * Constructor
@ -1329,7 +1330,7 @@ var et2_selectbox_ro = et2_selectbox.extend([et2_IDetachedDOM],
this.span = jQuery(_nodes[0]); this.span = jQuery(_nodes[0]);
this.set_value(_values["value"]); this.set_value(_values["value"]);
} }
}); });}).call(this);
et2_register_widget(et2_selectbox_ro, ["menupopup_ro", "listbox_ro", "select_ro", "select-cat_ro", et2_register_widget(et2_selectbox_ro, ["menupopup_ro", "listbox_ro", "select_ro", "select-cat_ro",
"select-percent_ro", 'select-priority_ro', 'select-access_ro', "select-percent_ro", 'select-priority_ro', 'select-access_ro',
'select-country_ro', 'select-state_ro', 'select-year_ro', 'select-month_ro', 'select-country_ro', 'select-state_ro', 'select-year_ro', 'select-month_ro',
@ -1408,7 +1409,7 @@ et2_register_widget(et2_selectbox_ro, ["menupopup_ro", "listbox_ro", "select_ro"
* *
* @augments et2_DOMWidget * @augments et2_DOMWidget
*/ */
var et2_menulist = et2_DOMWidget.extend( var et2_menulist = (function(){ "use strict"; return et2_DOMWidget.extend(
{ {
/** /**
* Construtor * Construtor
@ -1436,6 +1437,6 @@ var et2_menulist = et2_DOMWidget.extend(
return this._parent.getChildren(); return this._parent.getChildren();
} }
}); });}).call(this);
et2_register_widget(et2_menulist, ["menulist"]); et2_register_widget(et2_menulist, ["menulist"]);

View File

@ -10,8 +10,6 @@
* @version $Id$ * @version $Id$
*/ */
"use strict";
/*egw:uses /*egw:uses
jquery.jquery; jquery.jquery;
jquery.splitter; jquery.splitter;
@ -28,7 +26,7 @@
* @see http://methvin.com/splitter/ Uses Splitter * @see http://methvin.com/splitter/ Uses Splitter
* @augments et2_DOMWidget * @augments et2_DOMWidget
*/ */
var et2_split = et2_DOMWidget.extend([et2_IResizeable,et2_IPrint], var et2_split = (function(){ "use strict"; return et2_DOMWidget.extend([et2_IResizeable,et2_IPrint],
{ {
attributes: { attributes: {
"orientation": { "orientation": {
@ -198,7 +196,7 @@ var et2_split = et2_DOMWidget.extend([et2_IResizeable,et2_IPrint],
pix = size * widget.dynheight.outerNode.height() / 100; pix = size * widget.dynheight.outerNode.height() / 100;
} }
return pix.toFixed(2); return pix.toFixed(2);
} };
//Convert pixel size to percent //Convert pixel size to percent
var pix2per = function (_size) var pix2per = function (_size)
@ -213,7 +211,7 @@ var et2_split = et2_DOMWidget.extend([et2_IResizeable,et2_IPrint],
per = _size * 100 / widget.dynheight.outerNode.height(); per = _size * 100 / widget.dynheight.outerNode.height();
} }
return per.toFixed(2) + "%"; return per.toFixed(2) + "%";
} };
// Check for position preference, load it in // Check for position preference, load it in
if(this.id) if(this.id)
@ -451,6 +449,6 @@ var et2_split = et2_DOMWidget.extend([et2_IResizeable,et2_IPrint],
this.div.removeClass('print'); this.div.removeClass('print');
this.stop_resize = false; this.stop_resize = false;
} }
}); });}).call(this);
et2_register_widget(et2_split, ["split"]); et2_register_widget(et2_split, ["split"]);

View File

@ -10,8 +10,6 @@
* @version $Id$ * @version $Id$
*/ */
"use strict";
/*egw:uses /*egw:uses
et2_core_widget; et2_core_widget;
*/ */
@ -26,7 +24,7 @@
* *
* @augments et2_widget * @augments et2_widget
*/ */
var et2_styles = et2_widget.extend( var et2_styles = (function(){ "use strict"; return et2_widget.extend(
{ {
/** /**
* Constructor * Constructor
@ -90,6 +88,6 @@ var et2_styles = et2_widget.extend(
} }
} }
} }
}); });}).call(this);
et2_register_widget(et2_styles, ["styles"]); et2_register_widget(et2_styles, ["styles"]);

View File

@ -10,8 +10,6 @@
* @version $Id$ * @version $Id$
*/ */
"use strict";
/*egw:uses /*egw:uses
jsapi.egw; jsapi.egw;
jquery.jquery; jquery.jquery;
@ -23,7 +21,7 @@
* *
* @augments et2_valueWidget * @augments et2_valueWidget
*/ */
var et2_tabbox = et2_valueWidget.extend([et2_IInput,et2_IResizeable], var et2_tabbox = (function(){ "use strict"; return et2_valueWidget.extend([et2_IInput,et2_IResizeable],
{ {
attributes: { attributes: {
'tabs': { 'tabs': {
@ -505,5 +503,5 @@ var et2_tabbox = et2_valueWidget.extend([et2_IInput,et2_IResizeable],
this.set_height(this.tabContainer.height()); this.set_height(this.tabContainer.height());
} }
} }
}); });}).call(this);
et2_register_widget(et2_tabbox, ["tabbox"]); et2_register_widget(et2_tabbox, ["tabbox"]);

View File

@ -10,8 +10,6 @@
* @version $Id$ * @version $Id$
*/ */
"use strict";
/*egw:uses /*egw:uses
et2_core_inputWidget; et2_core_inputWidget;
/phpgwapi/js/jquery/magicsuggest/magicsuggest.js; /phpgwapi/js/jquery/magicsuggest/magicsuggest.js;
@ -26,7 +24,7 @@
* @see http://nicolasbize.github.io/magicsuggest/ * @see http://nicolasbize.github.io/magicsuggest/
* @augments et2_selectbox * @augments et2_selectbox
*/ */
var et2_taglist = et2_selectbox.extend( var et2_taglist = (function(){ "use strict"; return et2_selectbox.extend(
{ {
attributes: { attributes: {
"empty_label": { "empty_label": {
@ -492,7 +490,7 @@ var et2_taglist = et2_selectbox.extend(
jQuery(this.taglist.container).trigger('blur'); jQuery(this.taglist.container).trigger('blur');
return this.taglist.getValue(); return this.taglist.getValue();
} }
}); });}).call(this);
et2_register_widget(et2_taglist, ["taglist"]); et2_register_widget(et2_taglist, ["taglist"]);
/** /**
@ -500,7 +498,7 @@ et2_register_widget(et2_taglist, ["taglist"]);
* free entries are allowed * free entries are allowed
* *
*/ */
var et2_taglist_account = et2_taglist.extend( var et2_taglist_account = (function(){ "use strict"; return et2_taglist.extend(
{ {
attributes: { attributes: {
"autocomplete_url": { "autocomplete_url": {
@ -660,7 +658,7 @@ var et2_taglist_account = et2_taglist.extend(
this._super.call(this, values); this._super.call(this, values);
} }
} }
}); });}).call(this);
et2_register_widget(et2_taglist_account, ["taglist-account"]); et2_register_widget(et2_taglist_account, ["taglist-account"]);
/** /**
@ -670,7 +668,7 @@ et2_register_widget(et2_taglist_account, ["taglist-account"]);
* *
* @augments et2_taglist * @augments et2_taglist
*/ */
var et2_taglist_email = et2_taglist.extend( var et2_taglist_email = (function(){ "use strict"; return et2_taglist.extend(
{ {
attributes: { attributes: {
"autocomplete_url": { "autocomplete_url": {
@ -788,7 +786,7 @@ var et2_taglist_email = et2_taglist.extend(
return label; return label;
} }
}); });}).call(this);
et2_register_widget(et2_taglist_email, ["taglist-email"]); et2_register_widget(et2_taglist_email, ["taglist-email"]);
@ -799,7 +797,7 @@ et2_register_widget(et2_taglist_email, ["taglist-email"]);
* *
* @augments et2_taglist * @augments et2_taglist
*/ */
var et2_taglist_category = et2_taglist.extend( var et2_taglist_category = (function(){ "use strict"; return et2_taglist.extend(
{ {
attributes: { attributes: {
"autocomplete_url": { "autocomplete_url": {
@ -872,7 +870,7 @@ var et2_taglist_category = et2_taglist.extend(
return label; return label;
} }
}); });}).call(this);
et2_register_widget(et2_taglist_category, ["taglist-cat"]); et2_register_widget(et2_taglist_category, ["taglist-cat"]);
@ -881,7 +879,7 @@ et2_register_widget(et2_taglist_category, ["taglist-cat"]);
* *
* @augments et2_selectbox * @augments et2_selectbox
*/ */
var et2_taglist_ro = et2_selectbox_ro.extend( var et2_taglist_ro = (function(){ "use strict"; return et2_selectbox_ro.extend(
{ {
/** /**
* Constructor * Constructor
@ -901,7 +899,7 @@ var et2_taglist_ro = et2_selectbox_ro.extend(
this._super.apply(this, arguments); this._super.apply(this, arguments);
$j('li',this.span).addClass('ms-sel-item'); $j('li',this.span).addClass('ms-sel-item');
} }
}); });}).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" ]);
// Require css // Require css

View File

@ -10,8 +10,6 @@
* @version $Id$ * @version $Id$
*/ */
"use strict";
/*egw:uses /*egw:uses
et2_core_xml; et2_core_xml;
et2_core_DOMWidget; et2_core_DOMWidget;
@ -25,7 +23,7 @@
* *
* @augments et2_DOMWidget * @augments et2_DOMWidget
*/ */
var et2_template = et2_DOMWidget.extend( var et2_template = (function(){ "use strict"; return et2_DOMWidget.extend(
{ {
attributes: { attributes: {
"template": { "template": {
@ -194,6 +192,6 @@ var et2_template = et2_DOMWidget.extend(
// 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();
} }
}); });}).call(this);
et2_register_widget(et2_template, ["template"]); et2_register_widget(et2_template, ["template"]);

View File

@ -10,8 +10,6 @@
* @version $Id$ * @version $Id$
*/ */
"use strict";
/*egw:uses /*egw:uses
jquery.jquery; jquery.jquery;
et2_core_inputWidget; et2_core_inputWidget;
@ -23,7 +21,7 @@
* *
* @augments et2_inputWidget * @augments et2_inputWidget
*/ */
var et2_textbox = et2_inputWidget.extend([et2_IResizeable], var et2_textbox = (function(){ "use strict"; return et2_inputWidget.extend([et2_IResizeable],
{ {
attributes: { attributes: {
"multiline": { "multiline": {
@ -291,7 +289,7 @@ var et2_textbox = et2_inputWidget.extend([et2_IResizeable],
} }
} }
} }
}); });}).call(this);
et2_register_widget(et2_textbox, ["textbox", "passwd", "hidden"]); et2_register_widget(et2_textbox, ["textbox", "passwd", "hidden"]);
/** /**
@ -299,7 +297,7 @@ et2_register_widget(et2_textbox, ["textbox", "passwd", "hidden"]);
* *
* @augments et2_valueWidget * @augments et2_valueWidget
*/ */
var et2_textbox_ro = et2_valueWidget.extend([et2_IDetachedDOM], var et2_textbox_ro = (function(){ "use strict"; return et2_valueWidget.extend([et2_IDetachedDOM],
{ {
/** /**
* Ignore all more advanced attributes. * Ignore all more advanced attributes.
@ -403,7 +401,7 @@ var et2_textbox_ro = et2_valueWidget.extend([et2_IDetachedDOM],
this.set_value(_values["value"]); this.set_value(_values["value"]);
} }
} }
}); });}).call(this);
et2_register_widget(et2_textbox_ro, ["textbox_ro"]); et2_register_widget(et2_textbox_ro, ["textbox_ro"]);
/** /**
@ -412,7 +410,7 @@ et2_register_widget(et2_textbox_ro, ["textbox_ro"]);
* *
* @type type * @type type
*/ */
var et2_searchbox = et2_textbox.extend( var et2_searchbox = (function(){ "use strict"; return et2_textbox.extend(
{ {
/** /**
* Advanced attributes * Advanced attributes
@ -608,5 +606,5 @@ var et2_searchbox = et2_textbox.extend(
$j(node).off('.et2_inputWidget'); $j(node).off('.et2_inputWidget');
} }
}, },
}); });}).call(this);
et2_register_widget(et2_searchbox, ["searchbox"]); et2_register_widget(et2_searchbox, ["searchbox"]);

View File

@ -10,8 +10,6 @@
* @version $Id$ * @version $Id$
*/ */
"use strict";
/*egw:uses /*egw:uses
jquery.jquery; jquery.jquery;
jquery.jquery-ui; jquery.jquery-ui;
@ -23,7 +21,7 @@
* *
* @augments et2_valueWidget * @augments et2_valueWidget
*/ */
var et2_toolbar = et2_DOMWidget.extend([et2_IInput], var et2_toolbar = (function(){ "use strict"; return et2_DOMWidget.extend([et2_IInput],
{ {
attributes: { attributes: {
"view_range": { "view_range": {
@ -396,7 +394,7 @@ var et2_toolbar = et2_DOMWidget.extend([et2_IInput],
stop: function() stop: function()
{ {
jQuery(that.actionlist).removeClass('et2_toolbarDropArea'); jQuery(that.actionlist).removeClass('et2_toolbarDropArea');
}, }
}); });
toolbox.children().droppable({ toolbox.children().droppable({
accept:toolbar, accept:toolbar,
@ -650,5 +648,5 @@ var et2_toolbar = et2_DOMWidget.extend([et2_IInput],
this._super.apply(this, arguments); this._super.apply(this, arguments);
return false; return false;
} }
}); });}).call(this);
et2_register_widget(et2_toolbar, ["toolbar"]); et2_register_widget(et2_toolbar, ["toolbar"]);

View File

@ -12,8 +12,6 @@
* @version $Id$ * @version $Id$
*/ */
"use strict";
/*egw:uses /*egw:uses
et2_core_inputWidget; et2_core_inputWidget;
/phpgwapi/js/egw_action/egw_dragdrop_dhtmlx_tree.js; /phpgwapi/js/egw_action/egw_dragdrop_dhtmlx_tree.js;
@ -31,7 +29,7 @@
* *
* @augments et2_inputWidget * @augments et2_inputWidget
*/ */
var et2_tree = et2_inputWidget.extend( var et2_tree = (function(){ "use strict"; return et2_inputWidget.extend(
{ {
attributes: { attributes: {
"multiple": { "multiple": {
@ -930,6 +928,6 @@ var et2_tree = et2_inputWidget.extend(
} }
return url_parts.join('/'); return url_parts.join('/');
} }
}); });}).call(this);
et2_register_widget(et2_tree, ["tree","tree-cat"]); et2_register_widget(et2_tree, ["tree","tree-cat"]);

View File

@ -10,8 +10,6 @@
* @version $Id$ * @version $Id$
*/ */
"use strict";
/*egw:uses /*egw:uses
et2_textbox; et2_textbox;
et2_valueWidget; et2_valueWidget;
@ -23,7 +21,7 @@
* *
* @augments et2_textbox * @augments et2_textbox
*/ */
var et2_url = et2_textbox.extend( var et2_url = (function(){ "use strict"; return et2_textbox.extend(
{ {
attributes: { attributes: {
"multiline": { "multiline": {
@ -229,7 +227,7 @@ var et2_url = et2_textbox.extend(
if (this.input[0].parentNode) jQuery(this.input[0].parentNode).addClass('et2_url_span'); if (this.input[0].parentNode) jQuery(this.input[0].parentNode).addClass('et2_url_span');
} }
}); });}).call(this);
et2_register_widget(et2_url, ["url", "url-email", "url-phone"]); et2_register_widget(et2_url, ["url", "url-email", "url-phone"]);
/** /**
@ -238,7 +236,7 @@ et2_register_widget(et2_url, ["url", "url-email", "url-phone"]);
* *
* @augments et2_valueWidget * @augments et2_valueWidget
*/ */
var et2_url_ro = et2_valueWidget.extend([et2_IDetachedDOM], var et2_url_ro = (function(){ "use strict"; return et2_valueWidget.extend([et2_IDetachedDOM],
{ {
attributes: { attributes: {
"contact_plus": { "contact_plus": {
@ -403,5 +401,5 @@ var et2_url_ro = et2_valueWidget.extend([et2_IDetachedDOM],
} }
} }
}); });}).call(this);
et2_register_widget(et2_url_ro, ["url_ro", "url-email_ro", "url-phone_ro"]); et2_register_widget(et2_url_ro, ["url_ro", "url-email_ro", "url-phone_ro"]);

View File

@ -10,8 +10,6 @@
* @version $Id$ * @version $Id$
*/ */
"use strict";
/*egw:uses /*egw:uses
jquery.jquery; jquery.jquery;
et2_core_inputWidget; et2_core_inputWidget;
@ -26,7 +24,7 @@
* *
* @augments et2_valueWidget * @augments et2_valueWidget
*/ */
var et2_vfs = et2_valueWidget.extend([et2_IDetachedDOM], var et2_vfs = (function(){ "use strict"; return et2_valueWidget.extend([et2_IDetachedDOM],
{ {
attributes: { attributes: {
"value": { "value": {
@ -170,7 +168,7 @@ var et2_vfs = et2_valueWidget.extend([et2_IDetachedDOM],
} }
}); });}).call(this);
et2_register_widget(et2_vfs, ["vfs"]); et2_register_widget(et2_vfs, ["vfs"]);
/** /**
@ -179,7 +177,7 @@ et2_register_widget(et2_vfs, ["vfs"]);
* *
* @augments et2_textbox * @augments et2_textbox
*/ */
var et2_vfsName = et2_textbox.extend( var et2_vfsName = (function(){ "use strict"; return et2_textbox.extend(
{ {
/** /**
* Constructor * Constructor
@ -201,7 +199,7 @@ var et2_vfsName = et2_textbox.extend(
getValue: function() { getValue: function() {
return egw.encodePath(this._super.apply(this)||''); return egw.encodePath(this._super.apply(this)||'');
} }
}); });}).call(this);
et2_register_widget(et2_vfsName, ["vfs-name"]); et2_register_widget(et2_vfsName, ["vfs-name"]);
/** /**
@ -210,7 +208,7 @@ et2_register_widget(et2_vfsName, ["vfs-name"]);
* *
* @augments et2_textbox_ro * @augments et2_textbox_ro
*/ */
var et2_vfsName_ro = et2_textbox_ro.extend( var et2_vfsName_ro = (function(){ "use strict"; return et2_textbox_ro.extend(
{ {
/** /**
* Constructor * Constructor
@ -231,7 +229,7 @@ var et2_vfsName_ro = et2_textbox_ro.extend(
getValue: function() { getValue: function() {
return egw.encodePath(this._super.apply(this)); return egw.encodePath(this._super.apply(this));
} }
}); });}).call(this);
et2_register_widget(et2_vfsName_ro, ["vfs-name_ro"]); et2_register_widget(et2_vfsName_ro, ["vfs-name_ro"]);
/** /**
@ -250,7 +248,7 @@ et2_register_widget(et2_vfsName_ro, ["vfs-name_ro"]);
* *
* @augments et2_valueWidget * @augments et2_valueWidget
*/ */
var et2_vfsMime = expose(et2_valueWidget.extend([et2_IDetachedDOM], var et2_vfsMime = (function(){ "use strict"; return expose(et2_valueWidget.extend([et2_IDetachedDOM],
{ {
attributes: { attributes: {
"value": { "value": {
@ -431,7 +429,7 @@ var et2_vfsMime = expose(et2_valueWidget.extend([et2_IDetachedDOM],
this.set_value(_values['value']); this.set_value(_values['value']);
} }
} }
})); }));}).call(this);
et2_register_widget(et2_vfsMime, ["vfs-mime"]); et2_register_widget(et2_vfsMime, ["vfs-mime"]);
/** /**
@ -440,7 +438,7 @@ et2_register_widget(et2_vfsMime, ["vfs-mime"]);
* *
* @augments et2_description * @augments et2_description
*/ */
var et2_vfsSize = et2_description.extend({ var et2_vfsSize = (function(){ "use strict"; return et2_description.extend({
attributes: { attributes: {
"value": { "value": {
"type": "integer" "type": "integer"
@ -489,7 +487,7 @@ var et2_vfsSize = et2_description.extend({
} }
this._super.apply(this, arguments); this._super.apply(this, arguments);
} }
}); });}).call(this);
et2_register_widget(et2_vfsSize, ["vfs-size"]); et2_register_widget(et2_vfsSize, ["vfs-size"]);
@ -498,7 +496,7 @@ et2_register_widget(et2_vfsSize, ["vfs-size"]);
* *
* @augments et2_description * @augments et2_description
*/ */
var et2_vfsMode = et2_description.extend({ var et2_vfsMode = (function(){ "use strict"; return et2_description.extend({
// Masks for file types // Masks for file types
types: { types: {
'l': 0xA000, // link 'l': 0xA000, // link
@ -603,7 +601,7 @@ var et2_vfsMode = et2_description.extend({
} }
this._super.apply(this, arguments); this._super.apply(this, arguments);
} }
}); });}).call(this);
et2_register_widget(et2_vfsMode, ["vfs-mode"]); et2_register_widget(et2_vfsMode, ["vfs-mode"]);
@ -613,7 +611,7 @@ et2_register_widget(et2_vfsMode, ["vfs-mode"]);
* *
* @augments et2_selectAccount_ro * @augments et2_selectAccount_ro
*/ */
var et2_vfsUid = et2_selectAccount_ro.extend( var et2_vfsUid = (function(){ "use strict"; return et2_selectAccount_ro.extend(
{ {
/** /**
* @memberOf et2_vfsUid * @memberOf et2_vfsUid
@ -627,7 +625,7 @@ var et2_vfsUid = et2_selectAccount_ro.extend(
} }
this._super.apply(this, arguments); this._super.apply(this, arguments);
} }
}); });}).call(this);
et2_register_widget(et2_vfsUid, ["vfs-uid","vfs-gid"]); et2_register_widget(et2_vfsUid, ["vfs-uid","vfs-gid"]);
@ -640,11 +638,11 @@ et2_register_widget(et2_vfsUid, ["vfs-uid","vfs-gid"]);
* *
* @augments et2_file * @augments et2_file
*/ */
var et2_vfsUpload = et2_file.extend( var et2_vfsUpload = (function(){ "use strict"; return et2_file.extend(
{ {
attributes: { attributes: {
"value": { "value": {
"type": "any", // Either nothing, or an object with file info "type": "any" // Either nothing, or an object with file info
}, },
"path": { "path": {
"name": "Path", "name": "Path",
@ -740,6 +738,8 @@ var et2_vfsUpload = et2_file.extend(
/** /**
* Add in the request id * Add in the request id
*
* @param {type} form
*/ */
beforeSend: function(form) beforeSend: function(form)
{ {
@ -799,11 +799,11 @@ var et2_vfsUpload = et2_file.extend(
}); });
} }
} }
}); });}).call(this);
et2_register_widget(et2_vfsUpload, ["vfs-upload"]); et2_register_widget(et2_vfsUpload, ["vfs-upload"]);
var et2_vfsSelect = et2_inputWidget.extend( var et2_vfsSelect = (function(){ "use strict"; return et2_inputWidget.extend(
{ {
// Allowed mode options // Allowed mode options
modes: ['open','open-multiple','saveas','select-dir'], modes: ['open','open-multiple','saveas','select-dir'],
@ -985,5 +985,5 @@ var et2_vfsSelect = et2_inputWidget.extend(
getValue: function() { getValue: function() {
return this.value; return this.value;
} }
}); });}).call(this);
et2_register_widget(et2_vfsSelect, ["vfs-select"]); et2_register_widget(et2_vfsSelect, ["vfs-select"]);

View File

@ -7,11 +7,9 @@
* @link http://www.egroupware.org * @link http://www.egroupware.org
* @author Hadi Nategh <hn[at]stylite.de> * @author Hadi Nategh <hn[at]stylite.de>
* @copyright Stylite AG * @copyright Stylite AG
* @version $Id:$ * @version $Id$
*/ */
"use strict";
/*egw:uses /*egw:uses
jquery.jquery; jquery.jquery;
et2_core_interfaces; et2_core_interfaces;
@ -46,7 +44,7 @@
* *
* @augments et2_baseWidget * @augments et2_baseWidget
*/ */
var et2_video = et2_baseWidget.extend(et2_IDOMNode, var et2_video = (function(){ "use strict"; return et2_baseWidget.extend(et2_IDOMNode,
{ {
attributes: { attributes: {
"video_src": { "video_src": {
@ -186,6 +184,6 @@ var et2_video = et2_baseWidget.extend(et2_IDOMNode,
} }
} }
}); });}).call(this);
et2_register_widget(et2_video, ["video"]); et2_register_widget(et2_video, ["video"]);

View File

@ -35,6 +35,8 @@ var et2_IExposable = new Interface(
*/ */
function expose (widget) function expose (widget)
{ {
"use strict";
// Common expose functions // Common expose functions
var THUMBNAIL_MAX = 100; var THUMBNAIL_MAX = 100;