From adb90eff3323aa780f9a0879572e3cf3b9f0b969 Mon Sep 17 00:00:00 2001 From: Ananya Sen Date: Tue, 21 Feb 2012 13:04:58 -0800 Subject: - file picker - select file on double click - check cloud availability before IO operations [open file, new file, Save, Save As]. Canceling operation if cloud was unavailable, as per team's agreement. Signed-off-by: Ananya Sen --- js/components/ui/icon-list-basic/icon.reel/icon.js | 5 +++++ js/components/ui/tree-basic/treeItem.reel/treeItem.js | 5 +++++ 2 files changed, 10 insertions(+) (limited to 'js/components/ui') 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, { openFolderEvent.initEvent("openFolder", false, false); openFolderEvent.folderUri = this.icondata.uri; this.element.dispatchEvent(openFolderEvent); + }else{ + var openFolderEvent = document.createEvent("Events"); + openFolderEvent.initEvent("selectFile", false, false); + openFolderEvent.fileUri = this.icondata.uri; + this.element.dispatchEvent(openFolderEvent); } if(evt.bubbles){ 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, { openFolderEvent.initEvent("openFolder", false, false); openFolderEvent.folderUri = this.treeItemData.uri; this.element.dispatchEvent(openFolderEvent); + }else{ + var openFolderEvent = document.createEvent("Events"); + openFolderEvent.initEvent("selectFile", false, false); + openFolderEvent.fileUri = this.treeItemData.uri; + this.element.dispatchEvent(openFolderEvent); } if(evt.bubbles){ evt.stopPropagation(); -- cgit v1.2.3 From 209e0781e926212bbaaad9e8ca4b61a0c389b30f Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Tue, 28 Feb 2012 17:19:42 -0800 Subject: We need to remove color buttons from the color model when updating the PI for selection change. Signed-off-by: Nivesh Rajbhandari --- js/components/ui/color-chip.reel/color-chip.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'js/components/ui') 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, { this.changeDelegate(evt); } } + }, + + destroy: { + value: function() { + this.application.ninja.colorController.removeButton(this.mode, this.chipBtn); + var mode = this.mode; + if(this.iconType) { + if(this.iconType === "fillIcon") { + mode = "fill"; + } else if(this.iconType === "strokeIcon") { + mode = "stroke"; + } + } + this.application.ninja.colorController.removeButton(mode, this.icon); + } } }); -- cgit v1.2.3