From: Aleksander Ɓukasz Date: Wed, 12 Jun 2013 14:55:34 +0000 (+0200) Subject: Missing strict declarations X-Git-Url: https://git.mdrn.pl/fnpeditor.git/commitdiff_plain/95f83648504b6552ff3cbf956f55c6bf5f542a9b?ds=inline;hp=6384a81fa481cb43fddca23742e37761592be66d Missing strict declarations --- diff --git a/entrypoint.js b/entrypoint.js index 42e7209..6f81c94 100644 --- a/entrypoint.js +++ b/entrypoint.js @@ -1,5 +1,6 @@ (function() { - + 'use strict'; + requirejs.config({ baseUrl: '/static/editor', diff --git a/modules.js b/modules.js index ebee292..9accc7d 100644 --- a/modules.js +++ b/modules.js @@ -3,6 +3,9 @@ define(function(require) { Each module must be required explicitly by apropriate 'require' function call in order for requirejs optimizer to work. */ + + 'use strict'; + return { data: require('modules/data'), rng: require('modules/rng/rng'), diff --git a/modules/data.js b/modules/data.js index 5a48572..2848454 100644 --- a/modules/data.js +++ b/modules/data.js @@ -1,5 +1,7 @@ define(function() { +'use strict'; + return function(sandbox) { var doc = sandbox.getBootstrappedData().document; diff --git a/modules/documentCanvas/documentCanvas.js b/modules/documentCanvas/documentCanvas.js index 6e1d07c..9d2e725 100644 --- a/modules/documentCanvas/documentCanvas.js +++ b/modules/documentCanvas/documentCanvas.js @@ -6,7 +6,7 @@ define([ './wlxmlNode', 'libs/text!./template.html'], function(_, transformations, wlxmlNode, template) { - +'use strict'; return function(sandbox) { @@ -57,7 +57,7 @@ return function(sandbox) { _.each(mutation.addedNodes, function(node) { node = $(node); node.parent().find('[wlxml-tag]').each(function() { - tag = $(this); + var tag = $(this); if(!tag.attr('id')) tag.attr('id', 'xxxxxxxx-xxxx-xxxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {var r = Math.random()*16|0,v=c=='x'?r:r&0x3|0x8;return v.toString(16);})); }); diff --git a/modules/documentCanvas/transformations.js b/modules/documentCanvas/transformations.js index de72efd..44ab78a 100644 --- a/modules/documentCanvas/transformations.js +++ b/modules/documentCanvas/transformations.js @@ -1,5 +1,7 @@ define(['libs/jquery-1.9.1.min'], function($) { + 'use strict'; + var transformations = {}; transformations.fromXML = { diff --git a/modules/metadataEditor/transformations.js b/modules/metadataEditor/transformations.js index a6fea3f..8202a9f 100644 --- a/modules/metadataEditor/transformations.js +++ b/modules/metadataEditor/transformations.js @@ -1,5 +1,7 @@ define(['libs/jquery-1.9.1.min'], function($) { + 'use strict'; + return { getMetadata: function(xml) { var toret = {}; diff --git a/modules/nodePane/nodePane.js b/modules/nodePane/nodePane.js index 037715f..a9ef9e4 100644 --- a/modules/nodePane/nodePane.js +++ b/modules/nodePane/nodePane.js @@ -5,9 +5,11 @@ define([ ], function(templateSrc, $, _) { +'use strict'; + return function(sandbox) { - view = $(_.template(templateSrc)()); + var view = $(_.template(templateSrc)()); view.on('change', 'select', function(e) { var target = $(e.target); diff --git a/modules/rng/rng.js b/modules/rng/rng.js index 8202346..deda771 100644 --- a/modules/rng/rng.js +++ b/modules/rng/rng.js @@ -6,8 +6,9 @@ define([ 'libs/text!./editingLayout.html', ], function(layout, vbox, tabs, mainLayoutTemplate, visualEditingLayoutTemplate) { +'use strict'; + return function(sandbox) { - 'use strict'; function addMainTab(title, slug, view) { views.mainTabs.addTab(title, slug, view); diff --git a/modules/sourceEditor/sourceEditor.js b/modules/sourceEditor/sourceEditor.js index bd56c43..431fcb8 100644 --- a/modules/sourceEditor/sourceEditor.js +++ b/modules/sourceEditor/sourceEditor.js @@ -1,5 +1,7 @@ define(function() { +'use strict'; + return function(sandbox) { var view = $(sandbox.getTemplate('main')()); diff --git a/rng.js b/rng.js index 7089031..04a8d4f 100644 --- a/rng.js +++ b/rng.js @@ -1,8 +1,14 @@ -define({ +define(function() { + +'use strict'; + +return { modules: {}, initModules: ['rng'], permissions: { 'skelton': ['getDOM'], 'rng': ['getModule', 'handleEvents', 'getDOM'] } +} + }); \ No newline at end of file