Author: ralfbecker
New Revision: 55193
URL: http://svn.stylite.de/viewvc/egroupware?rev=55193&view=rev
Log:
fixing scope of “use strict”, so we do not need to remove it when concatinating our scripts like we do now with minjs
Modified:
trunk/phpgwapi/js/framework/fw_base.js
trunk/phpgwapi/js/framework/fw_browser.js
trunk/phpgwapi/js/framework/fw_desktop.js
trunk/phpgwapi/js/framework/fw_ui.js
trunk/phpgwapi/js/jsapi/app_base.js
trunk/phpgwapi/js/jsapi/egw.js
trunk/phpgwapi/js/jsapi/egw_calendar.js
trunk/phpgwapi/js/jsapi/egw_config.js
trunk/phpgwapi/js/jsapi/egw_core.js
trunk/phpgwapi/js/jsapi/egw_css.js
trunk/phpgwapi/js/jsapi/egw_data.js
trunk/phpgwapi/js/jsapi/egw_debug.js
trunk/phpgwapi/js/jsapi/egw_files.js
trunk/phpgwapi/js/jsapi/egw_images.js
trunk/phpgwapi/js/jsapi/egw_inheritance.js
trunk/phpgwapi/js/jsapi/egw_jquery.js
trunk/phpgwapi/js/jsapi/egw_json.js
trunk/phpgwapi/js/jsapi/egw_jsonq.js
trunk/phpgwapi/js/jsapi/egw_lang.js
trunk/phpgwapi/js/jsapi/egw_message.js
trunk/phpgwapi/js/jsapi/egw_preferences.js
trunk/phpgwapi/js/jsapi/egw_ready.js
trunk/phpgwapi/js/jsapi/egw_store.js
trunk/phpgwapi/js/jsapi/egw_tail.js
trunk/phpgwapi/js/jsapi/egw_tooltip.js
trunk/phpgwapi/js/jsapi/egw_user.js
trunk/phpgwapi/js/jsapi/egw_utils.js
— trunk/phpgwapi/js/framework/fw_base.js (original)
+++ trunk/phpgwapi/js/framework/fw_base.js Mon Feb 29 16:50:24 2016
@@ -7,14 +7,13 @@
-
@description Framework base module which creates fw_base object and includes basic framework functionallity
*/
-“use strict”;
/*egw:uses
jquery.jquery;
egw_inheritance.js;
*/
-var fw_base = Class.extend({
+var fw_base = (function(){ “use strict”; return Class.extend(
+{
/**
* Framework base class constructor sets up basic initialization
* @param {type} _sidemenuId
@@ -398,7 +397,7 @@
this.storeTabsStatus();
}
},
- /**
- Store last status of tabs
- tab status being used in order to open all previous opened
@@ -419,7 +418,7 @@
egw.jsonq(“home.jdots_framework.ajax_tab_changed_state”, [data]);
}
},
- /**
-
@param {function} _opened
- Sends sidemenu entry category open/close information to the server using an AJAX request
@@ -1043,4 +1042,4 @@
}
}
}
-});
+});}).call(this);
— trunk/phpgwapi/js/framework/fw_browser.js (original)
+++ trunk/phpgwapi/js/framework/fw_browser.js Mon Feb 29 16:50:24 2016
@@ -17,11 +17,9 @@
EGW_BROWSER_TYPE_NONE = 0;
EGW_BROWSER_TYPE_IFRAME = 1;
EGW_BROWSER_TYPE_DIV = 2;
-“use strict”;
-var fw_browser = Class.extend({
+var fw_browser = (function(){ “use strict”; return Class.extend(
+{
/**
* @param {string} _app
* @param {function} _heightCallback
@@ -167,13 +165,13 @@
this.loadingDeferred.always(function() {
if(self.ajaxLoaderDiv)
{
@@ -323,7 +321,7 @@
if (this.app.sidemenuEntry)
this.app.sidemenuEntry.hideAjaxLoader();
// egw_widgetReplace(this.app.appName, this.contentDiv, this.data);
@@ -373,7 +371,4 @@
{
this.browse(‘about:blank’, this.type == EGW_BROWSER_TYPE_IFRAME);
}
-});
+});}).call(this);
— trunk/phpgwapi/js/framework/fw_desktop.js (original)
+++ trunk/phpgwapi/js/framework/fw_desktop.js Mon Feb 29 16:50:24 2016
@@ -8,7 +8,6 @@
-
@description Create jdots framework
*/
-“use strict”;
/egw:uses
jquery.jquery;
framework.fw_base;
@@ -17,7 +16,15 @@
egw_fw_classes;
egw_inheritance.js;
/
-(function(window){
+
+/
-
-
-
@param {DOMWindow} window
- */
+(function(window)
+{
- “use strict”;
- /**
*
-
@type @exp;fw_ui_sidemenu_entry@call;extend
@@ -84,12 +91,8 @@
-
-
@type @exp;fw_ui_sidemenu@call;extend
*/
- var desktop_ui_sidemenu = fw_ui_sidemenu.extend({
-
-
/**
-
*
-
* @returns {undefined}
-
*/
-
var desktop_ui_sidemenu = fw_ui_sidemenu.extend(
-
{
init: function(_baseDiv, _sortCallback)
{
this._super.apply(this,arguments);
@@ -211,7 +214,7 @@
/**
*
— trunk/phpgwapi/js/framework/fw_ui.js (original)
+++ trunk/phpgwapi/js/framework/fw_ui.js Mon Feb 29 16:50:24 2016
@@ -14,20 +14,13 @@
*/
/**
-“use strict”;
-/**
- ui siemenu entry class
- Basic sidebar menu implementation
-
-
@type @exp;Class@call;extend
*/
-var fw_ui_sidemenu_entry = Class.extend({
+var fw_ui_sidemenu_entry = (function(){ “use strict”; return Class.extend(
+{
/**
* Framework ui sidemenu entry class constructor
*
@@ -179,13 +172,14 @@
$j(this.headerDiv).remove();
$j(this.contentDiv).remove();
}
-});
+});}).call(this);
/**
*
-
@type @exp;Class@call;extend
/
-var fw_ui_sidemenu = Class.extend({
+var fw_ui_sidemenu = (function(){ “use strict”; return Class.extend(
+{
/*
- The constructor of the egw_fw_ui_sidemenu.
-
@@ -279,7 +273,7 @@
this.entries = new Array();
}
-});
+});}).call(this);
/**
- Class: egw_fw_ui_tab
@@ -850,12 +844,12 @@
var self = this;
$j(this.scrollDiv).on(‘mousewheel’,function(e, delta) {
var noscroll = false;
— trunk/phpgwapi/js/jsapi/app_base.js (original)
+++ trunk/phpgwapi/js/jsapi/app_base.js Mon Feb 29 16:50:24 2016
@@ -10,8 +10,6 @@
-
@author Nathan Gray
-
@version $Id$
*/
-“use strict”;
/*egw:uses
egw_inheritance;
@@ -65,7 +63,7 @@
-
@class AppJS
-
@augments Class
/
-var AppJS = Class.extend(
+var AppJS = (function(){ “use strict”; return Class.extend(
{
/*
- Internal application name - override this
@@ -83,7 +81,7 @@
-
- If you need a reference to a certain template you can either store a local
- reference or access it through etemplate2.
-
-
-
@example Store a local reference
-
// in et2_ready()
-
if(name == ‘index’) this.index_et2 = et2.widgetContainer;
@@ -383,14 +381,14 @@
return state;
},
- /**
- Function to load selected row from nm into a template view
-
- */
- viewEntry: function(_action, _senders)
-
- */
- viewEntry: function(_action, _senders)
{
// app id in nm
var id = _senders[0].id;
@@ -398,21 +396,21 @@
var id_app = ‘’;
var content = {};
var self = this;
@@ -430,13 +428,13 @@
“padding”:‘60px 0 10px 0’})
.attr(‘id’,‘popupMainDiv’)
.appendTo(‘body’);
@@ -445,18 +443,18 @@
})
.text(egw.lang(‘Edit’))
.appendTo(this.viewContainer);
-
var templateName = _action.data.mobileViewTemplate || 'edit.xet';
var etemplate = new etemplate2 (this.viewTemplate[0], false);
var template = egw.webserverUrl+ '/' + this.appname + '/templates/mobile/'+templateName+'?1';
var data = {content:content, readonlys:{'__ALL__':true,'link_to':false}, currentapp:id_app[0]};
@@ -466,9 +464,9 @@
{
// Just template name, it better be loaded already
etemplate.load(template,’’,data);
-
}
- },
- /**
- Initializes actions and handlers on sidebox (delete)
-
@@ -696,7 +694,7 @@
// still running under iframe and that gets into conflict with et2 object created for
// video tutorials in sidebox.
// TODO: this.appname != ‘calendar’ should be removed after we released new calendar
-
).appendTo(this.et2 && this.appname != 'calendar' ? this.et2.getDOMNode() : $j('body'));
$j(".ui-icon-circle-plus",this.favorite_popup).prev().andSelf().click(function() {
var details = $j("#"+self.appname+"_favorites_popup_state",self.favorite_popup)
@@ -719,7 +717,7 @@
// Ugly hack to exclude calendar from using this.et2 since calendar in 14.3
// still running under iframe and that gets into conflict with et2 object created for
// video tutorials in sidebox.
@@ -1091,7 +1089,7 @@
}).sendRequest(true);
}
},
- /**
- Get json data for videos from the given url
-
@@ -1187,7 +1185,7 @@
var url = egw.link(’/index.php’, ‘menuaction=home.home_tutorial_ui.popup&tuid=’+_tuid);
egw.open_link(url,’_blank’,‘960x580’);
},
- /**
- Check if Mailvelope is available, open (or create) “egroupware” keyring and call callback with it
-
@@ -1409,7 +1407,7 @@
var self = this;
var restorePassword = _restorePassword;
var selector = _selector || ‘body’;
@@ -1504,7 +1502,7 @@
this.mailvelopeInstallationOffer();
}
},
- /**
- Create a dialog and offers installation option for installing mailvelope plugin
- plus it offers a video tutorials to get the user morte familiar with mailvelope
@@ -1543,7 +1541,7 @@
{domain:this.egw.lang(‘Add your domain as “%1” in options to list of email providers and enable API.’,
’*.’+this._mailvelopeDomain()), video:“test”, control:“true”}
];
@@ -1552,7 +1550,7 @@
// ATM we are not able to trigger mailvelope installation directly
// since the installation should be triggered from the extension
// owner validate website (mailvelope.com), therefore, we just redirect
@@ -1783,4 +1781,4 @@
});
});
}
-});
+});}).call(this);
— trunk/phpgwapi/js/jsapi/egw.js (original)
+++ trunk/phpgwapi/js/jsapi/egw.js Mon Feb 29 16:50:24 2016
@@ -9,8 +9,6 @@
-“use strict”;
/*egw:uses
egw_core;
@@ -37,7 +35,10 @@
app_base;
*/
-(function(){
+(function()
+{
- “use strict”;
- var debug = false;
var egw_script = document.getElementById(‘egw_script_id’);
var start_time = (new Date).getTime();
— trunk/phpgwapi/js/jsapi/egw_calendar.js (original)
+++ trunk/phpgwapi/js/jsapi/egw_calendar.js Mon Feb 29 16:50:24 2016
@@ -10,8 +10,6 @@
-“use strict”;
/*egw:uses
jquery.jquery-ui;
jquery.jquery-ui-timepicker-addon;
@@ -31,6 +29,8 @@
*/
egw.extend(‘calendar’, egw.MODULE_WND_LOCAL, function(_app, _wnd)
{
- “use strict”;
- // translate only once
var calendar_translated = false,timepicker_translated = false;
@@ -272,9 +272,11 @@
{
return dateTimeFormat(_php_format);
},
-
/**
* Calculate the start of the week, according to user's preference
-
*
-
* @param {string} date
*/
week_start: function(date) {
var d = new Date(date);
— trunk/phpgwapi/js/jsapi/egw_config.js (original)
+++ trunk/phpgwapi/js/jsapi/egw_config.js Mon Feb 29 16:50:24 2016
@@ -10,13 +10,13 @@
-“use strict”;
/*egw:uses
egw_core;
*/
-egw.extend(‘config’, egw.MODULE_GLOBAL, function() {
+egw.extend(‘config’, egw.MODULE_GLOBAL, function()
+{
— trunk/phpgwapi/js/jsapi/egw_core.js (original)
+++ trunk/phpgwapi/js/jsapi/egw_core.js Mon Feb 29 16:50:24 2016
@@ -10,13 +10,13 @@
-“use strict”;
/**
- This code setups the egw namespace and adds the “extend” function, which is
- used by extension modules to inject their content into the egw object.
*/
-(function() {
+(function()
+{
-
“use strict”;
var instanceUid = 0;
— trunk/phpgwapi/js/jsapi/egw_css.js (original)
+++ trunk/phpgwapi/js/jsapi/egw_css.js Mon Feb 29 16:50:24 2016
@@ -10,8 +10,6 @@
-“use strict”;
/*egw:uses
egw_core;
*/
@@ -23,7 +21,9 @@
-
@param {string} _app application name object is instanciated for
-
@param {object} _wnd window object is instanciated for
*/
-egw.extend(‘css’, egw.MODULE_WND_LOCAL, function(_app, _wnd) {
+egw.extend(‘css’, egw.MODULE_WND_LOCAL, function(_app, _wnd)
+{
-
“use strict”;
/**
- Assoziative array which stores the current css rule for a given selector.
— trunk/phpgwapi/js/jsapi/egw_data.js (original)
+++ trunk/phpgwapi/js/jsapi/egw_data.js Mon Feb 29 16:50:24 2016
@@ -15,9 +15,15 @@
egw_debug;
*/
-“use strict”;
-egw.extend(“data”, egw.MODULE_APP_LOCAL, function (_app, _wnd) {
+/**
- /**
- Uids and timers used for querying data uids, hashed by the first few
- bytes of the _execId, stored as an object of the form
— trunk/phpgwapi/js/jsapi/egw_debug.js (original)
+++ trunk/phpgwapi/js/jsapi/egw_debug.js Mon Feb 29 16:50:24 2016
@@ -10,8 +10,6 @@
-“use strict”;
/*egw:uses
egw_core;
*/
@@ -25,7 +23,9 @@
-
@param {string} _app
-
@param {object} _wnd
*/
-egw.extend(‘debug’, egw.MODULE_GLOBAL, function(_app, _wnd) {
+egw.extend(‘debug’, egw.MODULE_GLOBAL, function(_app, _wnd)
+{
-
“use strict”;
/**
- DEBUGLEVEL specifies which messages are printed to the console.
— trunk/phpgwapi/js/jsapi/egw_files.js (original)
+++ trunk/phpgwapi/js/jsapi/egw_files.js Mon Feb 29 16:50:24 2016
@@ -10,8 +10,6 @@
-“use strict”;
/*egw:uses
egw_core;
egw_ready;
@@ -20,9 +18,13 @@
/**
-
* @param string|array _jsFiles (array of) urls to include
-
* @param function _callback called after JS files are loaded and executed
-
* @param object _context
-
* @param string _prefix prefix for _jsFiles
-
* @param {string|array} _jsFiles (array of) urls to include
-
* @param {function} _callback called after JS files are loaded and executed
-
* @param {object} _context
-
* @param {string} _prefix prefix for _jsFiles
*/
includeJS: function(_jsFiles, _callback, _context, _prefix)
{
— trunk/phpgwapi/js/jsapi/egw_images.js (original)
+++ trunk/phpgwapi/js/jsapi/egw_images.js Mon Feb 29 16:50:24 2016
@@ -10,13 +10,13 @@
-“use strict”;
/*egw:uses
egw_core;
*/
-egw.extend(‘images’, egw.MODULE_GLOBAL, function() {
+egw.extend(‘images’, egw.MODULE_GLOBAL, function()
+{
-
“use strict”;
/**
- Map to serverside available images for users template-set
— trunk/phpgwapi/js/jsapi/egw_inheritance.js (original)
+++ trunk/phpgwapi/js/jsapi/egw_inheritance.js Mon Feb 29 16:50:24 2016
@@ -9,8 +9,6 @@
-
@copyright Stylite 2011
-
@version $Id$
*/
-“use strict”;
/**
- Usage of the JS inheritance system
@@ -71,6 +69,8 @@
*/
(function()
{
— trunk/phpgwapi/js/jsapi/egw_jquery.js (original)
+++ trunk/phpgwapi/js/jsapi/egw_jquery.js Mon Feb 29 16:50:24 2016
@@ -9,15 +9,20 @@
-“use strict”
/*egw:uses
egw_core;
egw_files;
egw_ready;
*/
-egw.extend(‘jquery’, egw.MODULE_WND_LOCAL, function(_app, _wnd) {
+/**
-
-
-
@param {string} _app application name object is instanciated for
-
-
@param {object} _wnd window object is instanciated for
-
*/
+egw.extend(‘jquery’, egw.MODULE_WND_LOCAL, function(_app, _wnd)
+{
-
“use strict”;
// Get the reference to the “files” and the “ready” module for the current
// window
@@ -36,10 +41,6 @@
}, this);
return {
— trunk/phpgwapi/js/jsapi/egw_json.js (original)
+++ trunk/phpgwapi/js/jsapi/egw_json.js Mon Feb 29 16:50:24 2016
@@ -10,8 +10,6 @@
-“use strict”;
/*egw:uses
jquery.jquery;
@@ -21,7 +19,15 @@
egw_debug;
*/
-egw.extend(‘json’, egw.MODULE_WND_LOCAL, function(_app, _wnd) {
+/**
— trunk/phpgwapi/js/jsapi/egw_jsonq.js (original)
+++ trunk/phpgwapi/js/jsapi/egw_jsonq.js Mon Feb 29 16:50:24 2016
@@ -10,8 +10,6 @@
-“use strict”;
/*egw:uses
egw_core;
egw_debug;
@@ -19,6 +17,8 @@
egw.extend(‘jsonq’, egw.MODULE_GLOBAL, function()
{
- “use strict”;
- /**
- Queued json requests (objects with attributes menuaction, parameters, context, callback, sender and callbeforesend)
-
— trunk/phpgwapi/js/jsapi/egw_lang.js (original)
+++ trunk/phpgwapi/js/jsapi/egw_lang.js Mon Feb 29 16:50:24 2016
@@ -10,8 +10,6 @@
-“use strict”;
/egw:uses
egw_core;
egw_files;
@@ -21,7 +19,9 @@
/*
-
@augments Class
*/
-egw.extend(‘lang’, egw.MODULE_GLOBAL, function() {
+egw.extend(‘lang’, egw.MODULE_GLOBAL, function()
+{
— trunk/phpgwapi/js/jsapi/egw_message.js (original)
+++ trunk/phpgwapi/js/jsapi/egw_message.js Mon Feb 29 16:50:24 2016
@@ -9,8 +9,6 @@
-“use strict”;
/*egw:uses
egw_core;
*/
@@ -24,6 +22,8 @@
*/
egw.extend(‘message’, egw.MODULE_WND_LOCAL, function(_app, _wnd)
{
- “use strict”;
- _app; // not used, but required by function signature
var message_timer;
var error_reg_exp;
@@ -96,7 +96,7 @@
{
// replace p and br-tags with newlines
_msg = _msg.replace(new_line_reg, “\n”);
@@ -107,7 +107,7 @@
&& msg_chkbox && msg_chkbox.is(’:checked’))
{
var discarded = egw.getLocalStorageItem(egw.app_name(),‘discardedMsgs’);
@@ -124,7 +124,7 @@
$j(this).remove();
})
.css(‘position’, ‘absolute’);
@@ -132,7 +132,7 @@
var isDiscarded = function (_msg)
{
var discarded = JSON.parse(egw.getLocalStorageItem(egw.app_name(),‘discardedMsgs’));
@@ -142,14 +142,14 @@
}
return false;
};
@@ -157,13 +157,13 @@
.css({“font-weight”:“bold”})
.attr({for:‘msgChkbox’})
.appendTo(msg_discard);
@@ -239,20 +239,20 @@
_wnd.document.title = _wnd.document.title.replace(/[.*]$/, '['+_header+']');
},
-
* @param {string|jQuery node} _node DOM selector id or jquery DOM object, default is body
-
* @param {string} mode defines the animation mode, default mode is spinner
-
* animation modes:
-
* @param {string|jQuery _node} _node DOM selector id or jquery DOM object, default is body
-
* @param {string} _mode defines the animation mode, default mode is spinner
-
* animation modes:
* - spinner: a sphere with a spinning bar inside
* - horizental: a horizental bar
-
*
* @returns {jquery dom object|null} returns jQuery DOM object or null in case of hiding
*/
loading_prompt: function(_id,_stat,_msg,_node, _mode)
— trunk/phpgwapi/js/jsapi/egw_preferences.js (original)
+++ trunk/phpgwapi/js/jsapi/egw_preferences.js Mon Feb 29 16:50:24 2016
@@ -10,13 +10,13 @@
-“use strict”;
/*egw:uses
egw_core;
*/
-egw.extend(‘preferences’, egw.MODULE_GLOBAL, function() {
+egw.extend(‘preferences’, egw.MODULE_GLOBAL, function()
+{
-
“use strict”;
/**
- Object holding the prefences as 2-dim. associative array, use
— trunk/phpgwapi/js/jsapi/egw_ready.js (original)
+++ trunk/phpgwapi/js/jsapi/egw_ready.js Mon Feb 29 16:50:24 2016
@@ -9,8 +9,6 @@
-“use strict”
/*egw:uses
egw_core;
egw_utils;
@@ -19,8 +17,12 @@
/**
-
-
@param {string} _app application name object is instanciated for
-
-
@param {object} _wnd window object is instanciated for
*/
-egw.extend(‘ready’, egw.MODULE_WND_LOCAL, function(_app, _wnd) {
+egw.extend(‘ready’, egw.MODULE_WND_LOCAL, function(_app, _wnd)
+{
-
“use strict”;
var egw = this;
@@ -139,7 +141,7 @@
* to be marked as “done” before the ready function will call its
* registered callbacks. The function returns an id that has to be
* passed to the “readDone” function once
@@ -181,7 +183,7 @@
else
{
setTimeout(function() {
— trunk/phpgwapi/js/jsapi/egw_store.js (original)
+++ trunk/phpgwapi/js/jsapi/egw_store.js Mon Feb 29 16:50:24 2016
@@ -9,15 +9,11 @@
-“use strict”;
/*egw:uses
egw_core;
egw_ready;
egw_debug;
*/
/**
- Store is a wrapper around browser based, persistant storage.
@@ -28,7 +24,9 @@
-
@param {string} _app
-
@param {DOMWindow} _wnd
*/
-egw.extend(‘store’, egw.MODULE_GLOBAL, function(_app, _wnd) {
+egw.extend(‘store’, egw.MODULE_GLOBAL, function(_app, _wnd)
+{
-
“use strict”;
var egw = this;
@@ -81,12 +79,12 @@
key = uniqueKey(application, key);
return _wnd.sessionStorage.removeItem(key);
},
@@ -94,10 +92,10 @@
item = mapKey (application, item);
return localStorage.setItem(item,value);
},
-
* Get an item from localStorage
-
*
* @param {string} application an application name or prefix
* @param {stirng} item an item name stored in localStorage
* @return {string|null} reutrns requested item value otherwise null
@@ -106,13 +104,13 @@
item = mapKey(application, item);
return localStorage.getItem(item);
},
— trunk/phpgwapi/js/jsapi/egw_tail.js (original)
+++ trunk/phpgwapi/js/jsapi/egw_tail.js Mon Feb 29 16:50:24 2016
@@ -7,11 +7,14 @@
-$j(function(){
+jQuery(function()
+{
-
“use strict”;
-
var that = this;
var log_tail_start=0;
— trunk/phpgwapi/js/jsapi/egw_tooltip.js (original)
+++ trunk/phpgwapi/js/jsapi/egw_tooltip.js Mon Feb 29 16:50:24 2016
@@ -10,14 +10,19 @@
-“use strict”;
/*egw:uses
jquery.jquery;
egw_core;
*/
-egw.extend(‘tooltip’, egw.MODULE_WND_LOCAL, function(_app, _wnd) {
+/**
-
-
-
@param {string} _app application name object is instanciated for
-
-
@param {object} _wnd window object is instanciated for
- */
+egw.extend(‘tooltip’, egw.MODULE_WND_LOCAL, func