aboutsummaryrefslogtreecommitdiff
path: root/js/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'js/controllers')
-rwxr-xr-xjs/controllers/document-controller.js11
-rw-r--r--js/controllers/presets-controller.js9
2 files changed, 5 insertions, 15 deletions
diff --git a/js/controllers/document-controller.js b/js/controllers/document-controller.js
index a308f191..ddaeb061 100755
--- a/js/controllers/document-controller.js
+++ b/js/controllers/document-controller.js
@@ -32,9 +32,6 @@ var DocumentController = exports.DocumentController = Montage.create(Component,
32 _iframeHolder: { value: null, enumerable: false }, 32 _iframeHolder: { value: null, enumerable: false },
33 _textHolder: { value: null, enumerable: false }, 33 _textHolder: { value: null, enumerable: false },
34 _codeMirrorCounter: {value: 1, enumerable: false}, 34 _codeMirrorCounter: {value: 1, enumerable: false},
35
36 canSave:{value: false},//for Save menu state update
37 canSaveAll:{value: false},//for Save All menu state update
38 35
39 activeDocument: { 36 activeDocument: {
40 get: function() { 37 get: function() {
@@ -50,12 +47,6 @@ var DocumentController = exports.DocumentController = Montage.create(Component,
50 if(!!this._activeDocument.editor){ 47 if(!!this._activeDocument.editor){
51 this._activeDocument.editor.focus(); 48 this._activeDocument.editor.focus();
52 } 49 }
53
54 this.canSave = doc.needsSave;
55 this.canSaveAll = doc.needsSave;
56 }else{
57 this.canSave = false;
58 this.canSaveAll = false;
59 } 50 }
60 } 51 }
61 }, 52 },
@@ -80,7 +71,7 @@ var DocumentController = exports.DocumentController = Montage.create(Component,
80 handleAddComponentFirstDraw: { 71 handleAddComponentFirstDraw: {
81 value: function (e) { 72 value: function (e) {
82 //TODO: Add logic to reparse the document for dynamically added styles 73 //TODO: Add logic to reparse the document for dynamically added styles
83 console.log(e); 74 //console.log(e);
84 } 75 }
85 }, 76 },
86 77
diff --git a/js/controllers/presets-controller.js b/js/controllers/presets-controller.js
index 975f9f7a..4c177189 100644
--- a/js/controllers/presets-controller.js
+++ b/js/controllers/presets-controller.js
@@ -72,20 +72,19 @@ exports.PresetsController = Montage.create(Component, {
72 selectorBase = stylesController.generateClassName(selectorBase); 72 selectorBase = stylesController.generateClassName(selectorBase);
73 73
74 selection.forEach(function(element) { 74 selection.forEach(function(element) {
75 var el = element._element, 75 var animationName;
76 animationName;
77 76
78 if(useTransition) { 77 if(useTransition) {
79 this.addTransition(el); 78 this.addTransition(element);
80 } 79 }
81 80
82 ///// TODO: remove when we find out what to do with competing animations 81 ///// TODO: remove when we find out what to do with competing animations
83 animationName = stylesController.getElementStyle(el, '-webkit-animation-name'); 82 animationName = stylesController.getElementStyle(element, '-webkit-animation-name');
84 if(animationName) { 83 if(animationName) {
85 animationNames.push(animationName); 84 animationNames.push(animationName);
86 } 85 }
87 86
88 el.classList.add(selectorBase); 87 element.classList.add(selectorBase);
89 88
90 }, this); 89 }, this);
91 90