Author: ralfbecker
New Revision: 55196
URL: http://svn.stylite.de/viewvc/egroupware?rev=55196&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/egroupware/home/js/app.js
— trunk/egroupware/home/js/app.js (original)
+++ trunk/egroupware/home/js/app.js Mon Feb 29 17:40:33 2016
@@ -9,8 +9,6 @@
-“use strict”;
/*egw:uses
jquery.jquery;
jquery.jquery-ui;
@@ -27,7 +25,7 @@
-
@see http://gridster.net
-
@augments AppJS
/
-app.classes.home = AppJS.extend(
+app.classes.home = (function(){ “use strict”; return AppJS.extend(
{
/*
- AppJS requires overwriting this with the actual application name
@@ -98,7 +96,7 @@
{
// call parent
this._super.apply(this, arguments);
@@ -350,10 +348,10 @@
/**
* Set the current selection as default for other users
-
-
- Only works (and available) for admins, this shows a dialog to select
- the group, and then sets the default for that group.
-
-
-
@param {egwAction} action
-
@param {egwActionObject[]} selected
*/
@@ -387,7 +385,7 @@
{
// Disable action for feedback
action.set_enabled(false);
-
// Pass them to server
egw.json('home_ui::ajax_set_default', ['delete', portlet_ids, group]).sendRequest(true);
return;
@@ -409,7 +407,7 @@
/**
* Allow a refresh from anywhere by triggering an update with no changes
-
-
-
@param {string} id
*/
refresh: function(id) {
@@ -515,7 +513,7 @@
// Reset changed, or they keep accumulating
this.$changed = $j([]);
@@ -715,12 +713,12 @@
var portlet_dom = $j(’[id$=’+id+’][data-sizex]’,this.portlet_container.getDOMNode());
var width = portlet_dom.attr(‘data-sizex’) * this.GRID;
var height = portlet_dom.attr(‘data-sizey’) * this.GRID;
-
// CKEditor is impossible to use below a certain size
// Add 35px for the toolbar, 35px for the buttons
var window_width = Math.max(580, width+20);
var window_height = Math.max(350, height+70);
-
// Open popup, but add 70 to the height for the toolbar
egw.open_link(egw.link('/index.php',{
menuaction: 'home.home_note_portlet.edit',
@@ -749,11 +747,11 @@
nm.set_hide_header(nm.div.hasClass(‘header_hidden’));
nm.resize();
},
- /**
- Function to set video iframe base on selected tutorial from
- tutorials box
-
-
-
@param {type} url
*/
tutorial_videoOnClick: function (_url)
@@ -764,11 +762,11 @@
frame.set_value(_url);
}
},
- /**
- Function calls on discard checkbox and will set
- the egw_tutorial_noautoload preference
-
-
-
@param {type} egw
-
@param {type} widget
*/
@@ -787,7 +785,7 @@
- Base class for portlet specific javascript
-
- Should this maybe extend et2_portlet? It would complicate instantiation.
-
-
-
@type @exp;Class@call;extend
*/
app.classes.home.home_portlet = Class.extend({
@@ -924,13 +922,13 @@
this.portlet.getWidgetById(‘nm’).refresh(_id,_type);
}
}
-});
+});}).call(this);
/**
- An example illustrating extending the base code for a application specific code.
- See also the calendar app, which needs custom handlers
-
-
-
@type @exp;app@pro;classes@pro;home@pro;home_favorite_portlet@call;extend
- Note we put it in home, but this code should go in addressbook/js/addressbook_favorite_portlet.js
-
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
eGroupWare-cvs mailing list
eGroupWare-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-cvs