diff options
Diffstat (limited to 'js/components/ui')
-rwxr-xr-x | js/components/ui/color-chip.reel/color-chip.js | 15 | ||||
-rwxr-xr-x | js/components/ui/icon-list-basic/icon.reel/icon.js | 5 | ||||
-rwxr-xr-x | js/components/ui/tree-basic/treeItem.reel/treeItem.js | 5 |
3 files changed, 25 insertions, 0 deletions
diff --git a/js/components/ui/color-chip.reel/color-chip.js b/js/components/ui/color-chip.reel/color-chip.js index ed1ac27a..7a7411da 100755 --- a/js/components/ui/color-chip.reel/color-chip.js +++ b/js/components/ui/color-chip.reel/color-chip.js | |||
@@ -92,6 +92,21 @@ var ColorChip = exports.ColorChip = Montage.create(Component, { | |||
92 | this.changeDelegate(evt); | 92 | this.changeDelegate(evt); |
93 | } | 93 | } |
94 | } | 94 | } |
95 | }, | ||
96 | |||
97 | destroy: { | ||
98 | value: function() { | ||
99 | this.application.ninja.colorController.removeButton(this.mode, this.chipBtn); | ||
100 | var mode = this.mode; | ||
101 | if(this.iconType) { | ||
102 | if(this.iconType === "fillIcon") { | ||
103 | mode = "fill"; | ||
104 | } else if(this.iconType === "strokeIcon") { | ||
105 | mode = "stroke"; | ||
106 | } | ||
107 | } | ||
108 | this.application.ninja.colorController.removeButton(mode, this.icon); | ||
109 | } | ||
95 | } | 110 | } |
96 | 111 | ||
97 | }); | 112 | }); |
diff --git a/js/components/ui/icon-list-basic/icon.reel/icon.js b/js/components/ui/icon-list-basic/icon.reel/icon.js index b0279207..72adbfa1 100755 --- a/js/components/ui/icon-list-basic/icon.reel/icon.js +++ b/js/components/ui/icon-list-basic/icon.reel/icon.js | |||
@@ -131,6 +131,11 @@ var Icon = exports.Icon = Montage.create(Component, { | |||
131 | openFolderEvent.initEvent("openFolder", false, false); | 131 | openFolderEvent.initEvent("openFolder", false, false); |
132 | openFolderEvent.folderUri = this.icondata.uri; | 132 | openFolderEvent.folderUri = this.icondata.uri; |
133 | this.element.dispatchEvent(openFolderEvent); | 133 | this.element.dispatchEvent(openFolderEvent); |
134 | }else{ | ||
135 | var openFolderEvent = document.createEvent("Events"); | ||
136 | openFolderEvent.initEvent("selectFile", false, false); | ||
137 | openFolderEvent.fileUri = this.icondata.uri; | ||
138 | this.element.dispatchEvent(openFolderEvent); | ||
134 | } | 139 | } |
135 | if(evt.bubbles){ | 140 | if(evt.bubbles){ |
136 | evt.stopPropagation(); | 141 | evt.stopPropagation(); |
diff --git a/js/components/ui/tree-basic/treeItem.reel/treeItem.js b/js/components/ui/tree-basic/treeItem.reel/treeItem.js index 755eab8c..4c71cb6b 100755 --- a/js/components/ui/tree-basic/treeItem.reel/treeItem.js +++ b/js/components/ui/tree-basic/treeItem.reel/treeItem.js | |||
@@ -225,6 +225,11 @@ exports.TreeItem = Montage.create(Component, { | |||
225 | openFolderEvent.initEvent("openFolder", false, false); | 225 | openFolderEvent.initEvent("openFolder", false, false); |
226 | openFolderEvent.folderUri = this.treeItemData.uri; | 226 | openFolderEvent.folderUri = this.treeItemData.uri; |
227 | this.element.dispatchEvent(openFolderEvent); | 227 | this.element.dispatchEvent(openFolderEvent); |
228 | }else{ | ||
229 | var openFolderEvent = document.createEvent("Events"); | ||
230 | openFolderEvent.initEvent("selectFile", false, false); | ||
231 | openFolderEvent.fileUri = this.treeItemData.uri; | ||
232 | this.element.dispatchEvent(openFolderEvent); | ||
228 | } | 233 | } |
229 | if(evt.bubbles){ | 234 | if(evt.bubbles){ |
230 | evt.stopPropagation(); | 235 | evt.stopPropagation(); |