aboutsummaryrefslogtreecommitdiff
path: root/js/panels/css-panel/style-sheet.reel/style-sheet.js
diff options
context:
space:
mode:
authorEric Guzman2012-07-20 11:39:51 -0700
committerEric Guzman2012-07-20 11:39:51 -0700
commitc85a4fc8001b50bebc60d05277df0264c61879c2 (patch)
tree2faaf3d49337437e4a84818fe24dc64a60f8c611 /js/panels/css-panel/style-sheet.reel/style-sheet.js
parent2f0c50a13258e8abb9325573ed7e0ebe11655fec (diff)
parent3cc29231852440508bdeec1964e40ce59f979f99 (diff)
downloadninja-c85a4fc8001b50bebc60d05277df0264c61879c2.tar.gz
Merge branch 'refs/heads/fixes_7.1' into minorFixes_7.1
Diffstat (limited to 'js/panels/css-panel/style-sheet.reel/style-sheet.js')
-rw-r--r--js/panels/css-panel/style-sheet.reel/style-sheet.js20
1 files changed, 18 insertions, 2 deletions
diff --git a/js/panels/css-panel/style-sheet.reel/style-sheet.js b/js/panels/css-panel/style-sheet.reel/style-sheet.js
index b7df05a7..3a0060b2 100644
--- a/js/panels/css-panel/style-sheet.reel/style-sheet.js
+++ b/js/panels/css-panel/style-sheet.reel/style-sheet.js
@@ -71,6 +71,9 @@ exports.StyleSheet = Montage.create(Component, {
71 prepareForDraw : { 71 prepareForDraw : {
72 value: function() { 72 value: function() {
73 this.nameText.element.addEventListener('click', this, false); 73 this.nameText.element.addEventListener('click', this, false);
74
75 //// Set the initial media text value
76 this.mediaText = this._source.media.mediaText;
74 } 77 }
75 }, 78 },
76 79
@@ -89,8 +92,6 @@ exports.StyleSheet = Montage.create(Component, {
89 value: function() { 92 value: function() {
90 var transStr = '-webkit-transform'; 93 var transStr = '-webkit-transform';
91 94
92 this.mediaInput.value = this._source.media.mediaText;
93
94 if(this.editing) { 95 if(this.editing) {
95 this.editView.classList.add('expanded'); 96 this.editView.classList.add('expanded');
96 this.editView.style.setProperty(transStr, 'translate3d(-'+ this._translateDistance + 'px,0,0)'); 97 this.editView.style.setProperty(transStr, 'translate3d(-'+ this._translateDistance + 'px,0,0)');
@@ -194,6 +195,21 @@ exports.StyleSheet = Montage.create(Component, {
194 this._name = text; 195 this._name = text;
195 } 196 }
196 }, 197 },
198
199 _mediaText : { value: null },
200 mediaText : {
201 get : function() { return this._mediaText; },
202 set : function(value) {
203 if(value === this._mediaText) { return; }
204
205 this.application.ninja.stylesController.setMediaAttribute(this._source, value);
206
207 this._mediaText = value;
208
209 this.needsDraw = true;
210 }
211 },
212
197 _dirty : { 213 _dirty : {
198 value: null 214 value: null
199 }, 215 },