From a62f57cf6beee332ff60a48f5e26d0084b4a5432 Mon Sep 17 00:00:00 2001 From: Eric Guzman Date: Mon, 7 May 2012 10:38:29 -0700 Subject: Style sheets - Add sheet action --- js/panels/css-panel/style-sheet.reel/style-sheet.html | 14 +++----------- .../css-panel/style-sheets-view.reel/style-sheets-view.js | 10 ++-------- 2 files changed, 5 insertions(+), 19 deletions(-) (limited to 'js/panels') diff --git a/js/panels/css-panel/style-sheet.reel/style-sheet.html b/js/panels/css-panel/style-sheet.reel/style-sheet.html index 1820f780..6a9dee65 100644 --- a/js/panels/css-panel/style-sheet.reel/style-sheet.html +++ b/js/panels/css-panel/style-sheet.reel/style-sheet.html @@ -24,14 +24,6 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot "deleteButton": {"@": "deleteButton"} } }, - "disableCheckbox": { - "module": "js/components/checkbox.reel", - "name": "Checkbox", - "properties": { - "element": { "#": "disable-checkbox" }, - "checked": true - } - }, "name": { "module": "montage/ui/dynamic-text.reel", "name": "DynamicText", @@ -114,12 +106,12 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot -
+
- + -
+
diff --git a/js/panels/css-panel/style-sheets-view.reel/style-sheets-view.js b/js/panels/css-panel/style-sheets-view.reel/style-sheets-view.js index 26b996ec..2d6e18ed 100644 --- a/js/panels/css-panel/style-sheets-view.reel/style-sheets-view.js +++ b/js/panels/css-panel/style-sheets-view.reel/style-sheets-view.js @@ -35,7 +35,7 @@ exports.StyleSheetsView = Montage.create(Component, { ///// Add rule button action handleAddAction : { value: function(e) { - debugger; + this.stylesController.createStylesheet(); } }, @@ -45,6 +45,7 @@ exports.StyleSheetsView = Montage.create(Component, { handleStyleSheetsReady : { value: function(e) { this.documentName = this.stylesController.activeDocument.name; + this.styleSheets = this.stylesController.userStyleSheets; this._initView = this.needsDraw = true; } }, @@ -60,7 +61,6 @@ exports.StyleSheetsView = Montage.create(Component, { prepareForDraw : { value: function() { this.eventManager.addEventListener("styleSheetsReady", this, false); - this.eventManager.addEventListener("newStyleSheet", this, false); } }, draw : { @@ -68,7 +68,6 @@ exports.StyleSheetsView = Montage.create(Component, { if(this._initView) { this.noDocumentCondition = false; this.showToolbar = true; - this.styleSheets = this.stylesController.userStyleSheets; this._initView = false; } @@ -110,11 +109,6 @@ exports.StyleSheetsView = Montage.create(Component, { } } }, - handleNewStyleSheet : { - value: function(e) { - this.styleSheets.push(e._event.detail); - } - }, handleResizeStart: { value:function(e) { this.isResizing = true; -- cgit v1.2.3