diff options
Diffstat (limited to 'web-ui/app/js')
19 files changed, 23 insertions, 25 deletions
diff --git a/web-ui/app/js/features/features.js b/web-ui/app/js/features/features.js index 4d04df64..80ecc225 100644 --- a/web-ui/app/js/features/features.js +++ b/web-ui/app/js/features/features.js @@ -14,9 +14,9 @@ * You should have received a copy of the GNU Affero General Public License * along with Pixelated. If not, see <http://www.gnu.org/licenses/>. */ -'use strict'; define(['helpers/monitored_ajax'], function(monitoredAjax) { + 'use strict'; var cachedDisabledFeatures; var cachedDispatcherFeatures; diff --git a/web-ui/app/js/foundation/initialize_foundation.js b/web-ui/app/js/foundation/initialize_foundation.js index b382a168..42405dfe 100644 --- a/web-ui/app/js/foundation/initialize_foundation.js +++ b/web-ui/app/js/foundation/initialize_foundation.js @@ -1,3 +1,5 @@ -'use strict'; -$(document).foundation(); +(function() { + 'use strict'; + $(document).foundation(); +})(); diff --git a/web-ui/app/js/foundation/off_canvas.js b/web-ui/app/js/foundation/off_canvas.js index 805dfab8..66334470 100644 --- a/web-ui/app/js/foundation/off_canvas.js +++ b/web-ui/app/js/foundation/off_canvas.js @@ -14,9 +14,8 @@ * You should have received a copy of the GNU Affero General Public License * along with Pixelated. If not, see <http://www.gnu.org/licenses/>. */ -'use strict'; define(['flight/lib/component', 'page/events'], function (defineComponent, events) { - + 'use strict'; return defineComponent(function() { this.closeSlider = function (ev){ diff --git a/web-ui/app/js/helpers/contenttype.js b/web-ui/app/js/helpers/contenttype.js index 764b6032..92b456e9 100644 --- a/web-ui/app/js/helpers/contenttype.js +++ b/web-ui/app/js/helpers/contenttype.js @@ -14,8 +14,8 @@ * You should have received a copy of the GNU Affero General Public License * along with Pixelated. If not, see <http://www.gnu.org/licenses/>. */ -'use strict'; define([], function () { + 'use strict'; var exports = {}; // Licence: PUBLIC DOMAIN <http://unlicense.org/> diff --git a/web-ui/app/js/helpers/iterator.js b/web-ui/app/js/helpers/iterator.js index b5b44379..236c7a40 100644 --- a/web-ui/app/js/helpers/iterator.js +++ b/web-ui/app/js/helpers/iterator.js @@ -14,8 +14,8 @@ * You should have received a copy of the GNU Affero General Public License * along with Pixelated. If not, see <http://www.gnu.org/licenses/>. */ -'use strict'; define(function () { + 'use strict'; return Iterator; diff --git a/web-ui/app/js/mail_list/ui/mail_item_factory.js b/web-ui/app/js/mail_list/ui/mail_item_factory.js index ddfa4c62..7205d35c 100644 --- a/web-ui/app/js/mail_list/ui/mail_item_factory.js +++ b/web-ui/app/js/mail_list/ui/mail_item_factory.js @@ -14,7 +14,6 @@ * You should have received a copy of the GNU Affero General Public License * along with Pixelated. If not, see <http://www.gnu.org/licenses/>. */ -'use strict'; define( [ @@ -23,6 +22,7 @@ define( 'mail_list/ui/mail_items/sent_item' ], function (GenericMailItem, DraftItem, SentItem) { + 'use strict'; var MAIL_ITEM_TYPE = { 'drafts': DraftItem, diff --git a/web-ui/app/js/mail_list/ui/mail_items/mail_item.js b/web-ui/app/js/mail_list/ui/mail_items/mail_item.js index 266db926..c075b0b5 100644 --- a/web-ui/app/js/mail_list/ui/mail_items/mail_item.js +++ b/web-ui/app/js/mail_list/ui/mail_items/mail_item.js @@ -14,7 +14,6 @@ * You should have received a copy of the GNU Affero General Public License * along with Pixelated. If not, see <http://www.gnu.org/licenses/>. */ -'use strict'; define( [ @@ -24,6 +23,7 @@ define( ], function (viewHelper, templates, events) { + 'use strict'; function mailItem() { this.updateSelected = function (ev, data) { if (data.ident === this.attr.mail.ident) { this.doSelect(); } diff --git a/web-ui/app/js/mail_list_actions/ui/mail_list_actions.js b/web-ui/app/js/mail_list_actions/ui/mail_list_actions.js index f71ed07c..69e5fde4 100644 --- a/web-ui/app/js/mail_list_actions/ui/mail_list_actions.js +++ b/web-ui/app/js/mail_list_actions/ui/mail_list_actions.js @@ -14,7 +14,6 @@ * You should have received a copy of the GNU Affero General Public License * along with Pixelated. If not, see <http://www.gnu.org/licenses/>. */ -'use strict'; define( [ @@ -50,7 +49,7 @@ define( markManyAsReadTrigger, markAsUnreadTrigger ) { - + 'use strict'; return defineComponent(mailsActions); function mailsActions() { diff --git a/web-ui/app/js/mail_view/ui/mail_view.js b/web-ui/app/js/mail_view/ui/mail_view.js index 01db6c4f..76c5b7d9 100644 --- a/web-ui/app/js/mail_view/ui/mail_view.js +++ b/web-ui/app/js/mail_view/ui/mail_view.js @@ -15,7 +15,6 @@ * along with Pixelated. If not, see <http://www.gnu.org/licenses/>. */ -'use strict'; define( [ 'flight/lib/component', @@ -29,6 +28,7 @@ define( ], function (defineComponent, templates, mailActions, viewHelpers, withHideAndShow, withMailTagging, events, i18n) { + 'use strict'; return defineComponent(mailView, mailActions, withHideAndShow, withMailTagging); diff --git a/web-ui/app/js/mail_view/ui/recipients/recipient.js b/web-ui/app/js/mail_view/ui/recipients/recipient.js index abfbc8e4..c13a52b1 100644 --- a/web-ui/app/js/mail_view/ui/recipients/recipient.js +++ b/web-ui/app/js/mail_view/ui/recipients/recipient.js @@ -14,7 +14,6 @@ * You should have received a copy of the GNU Affero General Public License * along with Pixelated. If not, see <http://www.gnu.org/licenses/>. */ -'use strict'; define( [ @@ -24,6 +23,7 @@ define( ], function (defineComponent, templates, events) { + 'use strict'; return defineComponent(recipient); diff --git a/web-ui/app/js/mail_view/ui/recipients/recipients_input.js b/web-ui/app/js/mail_view/ui/recipients/recipients_input.js index db0b10f7..62bc9c4a 100644 --- a/web-ui/app/js/mail_view/ui/recipients/recipients_input.js +++ b/web-ui/app/js/mail_view/ui/recipients/recipients_input.js @@ -14,7 +14,6 @@ * You should have received a copy of the GNU Affero General Public License * along with Pixelated. If not, see <http://www.gnu.org/licenses/>. */ -'use strict'; define([ 'flight/lib/component', @@ -22,6 +21,7 @@ define([ 'features' ], function (defineComponent, events, features) { + 'use strict'; function recipientsInput() { var EXIT_KEY_CODE_MAP = { diff --git a/web-ui/app/js/mail_view/ui/recipients/recipients_iterator.js b/web-ui/app/js/mail_view/ui/recipients/recipients_iterator.js index 6c52c52e..624ac4f5 100644 --- a/web-ui/app/js/mail_view/ui/recipients/recipients_iterator.js +++ b/web-ui/app/js/mail_view/ui/recipients/recipients_iterator.js @@ -15,8 +15,8 @@ * along with Pixelated. If not, see <http://www.gnu.org/licenses/>. */ -'use strict'; define(['helpers/iterator'], function (Iterator) { + 'use strict'; return RecipientsIterator; diff --git a/web-ui/app/js/mail_view/ui/send_button.js b/web-ui/app/js/mail_view/ui/send_button.js index b16ea055..b1f35906 100644 --- a/web-ui/app/js/mail_view/ui/send_button.js +++ b/web-ui/app/js/mail_view/ui/send_button.js @@ -14,8 +14,6 @@ * You should have received a copy of the GNU Affero General Public License * along with Pixelated. If not, see <http://www.gnu.org/licenses/>. */ -'use strict'; - define([ 'flight/lib/component', 'flight/lib/utils', @@ -23,6 +21,7 @@ define([ 'helpers/view_helper' ], function (defineComponent, utils, events, viewHelper) { + 'use strict'; return defineComponent(sendButton); diff --git a/web-ui/app/js/main.js b/web-ui/app/js/main.js index ea68218d..5fb2e46f 100644 --- a/web-ui/app/js/main.js +++ b/web-ui/app/js/main.js @@ -14,7 +14,6 @@ * You should have received a copy of the GNU Affero General Public License * along with Pixelated. If not, see <http://www.gnu.org/licenses/>. */ -'use strict'; requirejs.config({ baseUrl: '../assets/', @@ -48,6 +47,7 @@ require([ 'flight/lib/compose', 'flight/lib/debug' ], function(compose, debug){ + 'use strict'; debug.enable(true); debug.events.logAll(); }); @@ -65,6 +65,7 @@ require( ], function(compose, registry, advice, withLogging, debug, events, initializeDefault, _monkeyPatched) { + 'use strict'; window.Pixelated = window.Pixelated || {}; window.Pixelated.events = events; diff --git a/web-ui/app/js/mixins/with_feature_toggle.js b/web-ui/app/js/mixins/with_feature_toggle.js index b286cc48..195b08bc 100644 --- a/web-ui/app/js/mixins/with_feature_toggle.js +++ b/web-ui/app/js/mixins/with_feature_toggle.js @@ -15,9 +15,9 @@ * along with Pixelated. If not, see <http://www.gnu.org/licenses/>. */ -'use strict'; define(['features'], function(features) { + 'use strict'; function withFeatureToggle(componentName, behaviorForFeatureOff) { return function() { diff --git a/web-ui/app/js/mixins/with_mail_tagging.js b/web-ui/app/js/mixins/with_mail_tagging.js index 8e27d672..1fc1c3bd 100644 --- a/web-ui/app/js/mixins/with_mail_tagging.js +++ b/web-ui/app/js/mixins/with_mail_tagging.js @@ -15,10 +15,10 @@ * along with Pixelated. If not, see <http://www.gnu.org/licenses/>. */ -'use strict'; define( ['page/events', 'features'], function (events, features) { + 'use strict'; function withMailTagging () { this.updateTags = function(mail, tags) { this.trigger(document, events.mail.tags.update, {ident: mail.ident, tags: tags}); diff --git a/web-ui/app/js/page/pane_contract_expand.js b/web-ui/app/js/page/pane_contract_expand.js index aee8c44f..9bb435c4 100644 --- a/web-ui/app/js/page/pane_contract_expand.js +++ b/web-ui/app/js/page/pane_contract_expand.js @@ -14,9 +14,9 @@ * You should have received a copy of the GNU Affero General Public License * along with Pixelated. If not, see <http://www.gnu.org/licenses/>. */ -'use strict'; define(['flight/lib/component', 'page/events'], function (describeComponent, events) { + 'use strict'; return describeComponent(paneContractExpand); diff --git a/web-ui/app/js/services/model/mail.js b/web-ui/app/js/services/model/mail.js index c41bcff9..64a10c1c 100644 --- a/web-ui/app/js/services/model/mail.js +++ b/web-ui/app/js/services/model/mail.js @@ -14,9 +14,8 @@ * You should have received a copy of the GNU Affero General Public License * along with Pixelated. If not, see <http://www.gnu.org/licenses/>. */ -'use strict'; - define(['helpers/contenttype'], function (contentType) { + 'use strict'; function isSentMail() { return _.has(this, 'mailbox') && this.mailbox.toUpperCase() === 'SENT'; } diff --git a/web-ui/app/js/style_guide/main.js b/web-ui/app/js/style_guide/main.js index 170d1187..32c213cf 100644 --- a/web-ui/app/js/style_guide/main.js +++ b/web-ui/app/js/style_guide/main.js @@ -14,9 +14,8 @@ * You should have received a copy of the GNU Affero General Public License * along with Pixelated. If not, see <http://www.gnu.org/licenses/>. */ -'use strict'; - $(document).ready(function(){ + 'use strict'; $('a[href*=#]').click(function() { if (location.pathname.replace(/^\//,'') === this.pathname.replace(/^\//,'') && location.hostname === this.hostname) { |