Skip to content

Commit

Permalink
Updates for the strict mode
Browse files Browse the repository at this point in the history
  • Loading branch information
artf committed May 31, 2017
1 parent 1acf158 commit 5e926b6
Show file tree
Hide file tree
Showing 129 changed files with 781 additions and 498 deletions.
2 changes: 2 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1146,6 +1146,8 @@ <h1 class="bdg-title">The team</h1>


});

editor.render();
</script>
</body>
</html>
9 changes: 5 additions & 4 deletions src/asset_manager/model/Asset.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
define(['backbone'],
function (Backbone) {
return Backbone.Model.extend({
define(function(require, exports, module){
'use strict';
var Backbone = require('backbone');
module.exports = Backbone.Model.extend({

idAttribute: 'src',

Expand Down Expand Up @@ -28,4 +29,4 @@ define(['backbone'],
},

});
});
});
10 changes: 6 additions & 4 deletions src/asset_manager/model/AssetImage.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
define(['backbone', './Asset'],
function (Backbone, Asset) {
return Asset.extend({
define(function(require, exports, module){
'use strict';
var Backbone = require('backbone');
var Asset = require('./Asset');
module.exports = Asset.extend({

defaults: _.extend({}, Asset.prototype.defaults, {
type: 'image',
Expand All @@ -10,4 +12,4 @@ define(['backbone', './Asset'],
}),

});
});
});
11 changes: 7 additions & 4 deletions src/asset_manager/model/Assets.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
define(['backbone', './Asset', './AssetImage'],
function (Backbone, Asset, AssetImage) {
return Backbone.Collection.extend({
define(function(require, exports, module){
'use strict';
var Backbone = require('backbone');
var Asset = require('./Asset');
var AssetImage = require('./AssetImage');
module.exports = Backbone.Collection.extend({

model: AssetImage,

Expand Down Expand Up @@ -64,4 +67,4 @@ define(['backbone', './Asset', './AssetImage'],


});
});
});
10 changes: 6 additions & 4 deletions src/asset_manager/view/AssetImageView.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
define(['./AssetView','text!./../template/assetImage.html'],
function (AssetView, assetTemplate) {
return AssetView.extend({
define(function(require, exports, module){
'use strict';
var AssetView = require('./AssetView');
var assetTemplate = require('text!./../template/assetImage.html');
module.exports = AssetView.extend({

events:{
'click': 'handleClick',
Expand Down Expand Up @@ -94,4 +96,4 @@ define(['./AssetView','text!./../template/assetImage.html'],
return this;
},
});
});
});
8 changes: 5 additions & 3 deletions src/asset_manager/view/AssetView.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
define(['backbone'], function (Backbone) {
define(function(require, exports, module){
'use strict';
var Backbone = require('backbone');

return Backbone.View.extend({
module.exports = Backbone.View.extend({
initialize: function(o) {
this.options = o;
this.config = o.config || {};
Expand All @@ -11,4 +13,4 @@ define(['backbone'], function (Backbone) {
},
});

});
});
13 changes: 9 additions & 4 deletions src/asset_manager/view/AssetsView.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
define(['backbone', './AssetView', './AssetImageView', './FileUploader', 'text!./../template/assets.html'],
function (Backbone, AssetView, AssetImageView, FileUploader, assetsTemplate) {
return Backbone.View.extend({
define(function(require, exports, module){
'use strict';
var Backbone = require('backbone');
var AssetView = require('./AssetView');
var AssetImageView = require('./AssetImageView');
var FileUploader = require('./FileUploader');
var assetsTemplate = require('text!./../template/assets.html');
module.exports = Backbone.View.extend({

template: _.template(assetsTemplate),

Expand Down Expand Up @@ -128,4 +133,4 @@ define(['backbone', './AssetView', './AssetImageView', './FileUploader', 'text!.
return this;
}
});
});
});
10 changes: 6 additions & 4 deletions src/asset_manager/view/FileUploader.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
define(['backbone', 'text!./../template/fileUploader.html'],
function (Backbone, fileUploaderTemplate) {
return Backbone.View.extend({
define(function(require, exports, module){
'use strict';
var Backbone = require('backbone');
var fileUploaderTemplate = require('text!./../template/fileUploader.html');
module.exports = Backbone.View.extend({

template: _.template(fileUploaderTemplate),

Expand Down Expand Up @@ -94,4 +96,4 @@ define(['backbone', 'text!./../template/fileUploader.html'],
},

});
});
});
9 changes: 5 additions & 4 deletions src/block_manager/model/Block.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
define(['backbone'],
function(Backbone){
define(function(require, exports, module){
'use strict';
var Backbone = require('backbone');

return Backbone.Model.extend({
module.exports = Backbone.Model.extend({

defaults :{
label: '',
Expand All @@ -10,4 +11,4 @@ define(['backbone'],
},

});
});
});
10 changes: 6 additions & 4 deletions src/block_manager/model/Blocks.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
define(['backbone','./Block'],
function (Backbone, Block) {
define(function(require, exports, module){
'use strict';
var Backbone = require('backbone');
var Block = require('./Block');

return Backbone.Collection.extend({
module.exports = Backbone.Collection.extend({

model: Block,

});
});
});
9 changes: 5 additions & 4 deletions src/block_manager/view/BlockView.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
define(['backbone'],
function(Backbone) {
define(function(require, exports, module){
'use strict';
var Backbone = require('backbone');

return Backbone.View.extend({
module.exports = Backbone.View.extend({

events: {
mousedown: 'onDrag'
Expand Down Expand Up @@ -47,4 +48,4 @@ function(Backbone) {
},

});
});
});
10 changes: 6 additions & 4 deletions src/block_manager/view/BlocksView.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
define(['backbone', './BlockView'],
function(Backbone, BlockView) {
define(function(require, exports, module){
'use strict';
var Backbone = require('backbone');
var BlockView = require('./BlockView');

return Backbone.View.extend({
module.exports = Backbone.View.extend({

initialize: function(opts, config) {
_.bindAll(this, 'getSorter', 'onDrag', 'onDrop');
Expand Down Expand Up @@ -118,4 +120,4 @@ function(Backbone, BlockView) {
},

});
});
});
10 changes: 6 additions & 4 deletions src/canvas/model/Canvas.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
define(['backbone', './Frame'],
function(Backbone, Frame){
define(function(require, exports, module){
'use strict';
var Backbone = require('backbone');
var Frame = require('./Frame');

return Backbone.Model.extend({
module.exports = Backbone.Model.extend({

defaults :{
frame: '',
Expand All @@ -15,4 +17,4 @@ define(['backbone', './Frame'],
},

});
});
});
9 changes: 5 additions & 4 deletions src/canvas/model/Frame.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
define(['backbone'],
function(Backbone){
define(function(require, exports, module){
'use strict';
var Backbone = require('backbone');

return Backbone.Model.extend({
module.exports = Backbone.Model.extend({

defaults :{
wrapper: '',
Expand All @@ -11,4 +12,4 @@ define(['backbone'],
},

});
});
});
10 changes: 6 additions & 4 deletions src/canvas/view/CanvasView.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
define(['backbone','./FrameView'],
function(Backbone, FrameView) {
define(function(require, exports, module){
'use strict';
var Backbone = require('backbone');
var FrameView = require('./FrameView');
/**
* @class CanvasView
* */
return Backbone.View.extend({
module.exports = Backbone.View.extend({

initialize: function(o) {
_.bindAll(this, 'renderBody', 'onFrameScroll', 'clearOff');
Expand Down Expand Up @@ -235,7 +237,7 @@ function(Backbone, FrameView) {
}
}
var ppfx = this.ppfx;
toolsEl = $('<div>', { id: ppfx + 'tools' }).get(0);
var toolsEl = $('<div>', { id: ppfx + 'tools' }).get(0);
this.hlEl = $('<div>', { class: ppfx + 'highlighter' }).get(0);
this.badgeEl = $('<div>', {class: ppfx + 'badge'}).get(0);
this.placerEl = $('<div>', {class: ppfx + 'placeholder'}).get(0);
Expand Down
9 changes: 5 additions & 4 deletions src/canvas/view/FrameView.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
define(['backbone'],
function(Backbone) {
define(function(require, exports, module){
'use strict';
var Backbone = require('backbone');
/**
* @class CanvasView
* */
return Backbone.View.extend({
module.exports = Backbone.View.extend({

tagName: 'iframe',

Expand Down Expand Up @@ -52,4 +53,4 @@ function(Backbone) {
},

});
});
});
18 changes: 9 additions & 9 deletions src/code_manager/model/CodeMirrorEditor.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
define(['backbone',
'codemirror/lib/codemirror',
'codemirror/mode/htmlmixed/htmlmixed',
'codemirror/mode/css/css',
'formatting'
],
function(Backbone, CodeMirror, htmlMode, cssMode, formatting) {
define(function(require, exports, module){
'use strict';
var Backbone = require('backbone');
var CodeMirror = require('codemirror/lib/codemirror');
var htmlMode = require('codemirror/mode/htmlmixed/htmlmixed');
var cssMode = require('codemirror/mode/css/css');
var formatting = require('formatting');
/**
* @class CodeViewer
* */
return Backbone.Model.extend({
module.exports = Backbone.Model.extend({

defaults: {
input : '',
Expand Down Expand Up @@ -48,4 +48,4 @@ define(['backbone',
},

});
});
});
9 changes: 5 additions & 4 deletions src/code_manager/model/CssGenerator.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
define(['backbone'],
function (Backbone) {
define(function(require, exports, module){
'use strict';
var Backbone = require('backbone');
/**
* @class CssGenerator
* */
return Backbone.Model.extend({
module.exports = Backbone.Model.extend({

initialize: function() {
this.compCls = [];
Expand Down Expand Up @@ -148,4 +149,4 @@ define(['backbone'],
},

});
});
});
9 changes: 5 additions & 4 deletions src/code_manager/model/HtmlGenerator.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
define(['backbone'],
function (Backbone) {
define(function(require, exports, module){
'use strict';
var Backbone = require('backbone');
/**
* @class HtmlGenerator
* */
return Backbone.Model.extend({
module.exports = Backbone.Model.extend({

/** @inheritdoc */
build: function(model, cssc){
Expand All @@ -20,4 +21,4 @@ define(['backbone'],
},

});
});
});
8 changes: 5 additions & 3 deletions src/code_manager/model/JsGenerator.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
define(['backbone'], function (Backbone) {
define(function(require, exports, module){
'use strict';
var Backbone = require('backbone');

return Backbone.Model.extend({
module.exports = Backbone.Model.extend({

mapModel: function (model) {
var code = '';
Expand Down Expand Up @@ -59,4 +61,4 @@ define(['backbone'], function (Backbone) {
},

});
});
});
Loading

0 comments on commit 5e926b6

Please sign in to comment.