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') 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 db5db0a92c1fb67eac262c33d4fbf776ceabbb3c Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Mon, 27 Feb 2012 21:17:29 -0800 Subject: breadcrumb cleanup and moving the resized on top of the timeline panel Signed-off-by: Valerio Virgillito --- .../bread-crumb-button.reel/bread-crumb-button.js | 26 ++++++++++++++-------- .../layout/bread-crumb.reel/bread-crumb.css | 5 ++--- .../layout/bread-crumb.reel/bread-crumb.html | 8 +++---- .../layout/bread-crumb.reel/bread-crumb.js | 15 +------------ 4 files changed, 24 insertions(+), 30 deletions(-) (limited to 'js/components') diff --git a/js/components/layout/bread-crumb-button.reel/bread-crumb-button.js b/js/components/layout/bread-crumb-button.reel/bread-crumb-button.js index 3f5b87e1..c1ac99bd 100755 --- a/js/components/layout/bread-crumb-button.reel/bread-crumb-button.js +++ b/js/components/layout/bread-crumb-button.reel/bread-crumb-button.js @@ -17,6 +17,11 @@ exports.BreadcrumbButton = Montage.create(Component, { value: null }, + // Bound container for the button + container: { + value: null + }, + prepareForDraw: { value: function() { this.element.addEventListener("mousedown", this, false); @@ -25,27 +30,30 @@ exports.BreadcrumbButton = Montage.create(Component, { draw: { value: function() { + + // Temporary until we have the new template + /* + if(this.container.id === "UserContent") { + this.button.innerHTML = "Body"; + } else { + this.button.innerHTML = this.container.nodeName.toLowerCase(); + } + */ + // + if(this.data.element.id === "UserContent") { this.button.innerHTML = "Body"; } else { this.button.innerHTML = this.data.element.nodeName; } + } }, handleMousedown: { value: function(event) { - - //this.data.selected=true; NJevent('breadCrumbTrail',this.data); - //this.data.selected=false; - } } - - - - - }); \ No newline at end of file diff --git a/js/components/layout/bread-crumb.reel/bread-crumb.css b/js/components/layout/bread-crumb.reel/bread-crumb.css index cc984609..0ca8adec 100755 --- a/js/components/layout/bread-crumb.reel/bread-crumb.css +++ b/js/components/layout/bread-crumb.reel/bread-crumb.css @@ -4,12 +4,11 @@ (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. */ -.bread_crumb{ +.breadcrumbTrail{ background-color: #282828; border-style: double; height: 26px; -} -.breadcrumbtrail{ + -webkit-box-flex: 0; } .bread_crumb_button{ diff --git a/js/components/layout/bread-crumb.reel/bread-crumb.html b/js/components/layout/bread-crumb.reel/bread-crumb.html index c1b9ed61..234596a6 100755 --- a/js/components/layout/bread-crumb.reel/bread-crumb.html +++ b/js/components/layout/bread-crumb.reel/bread-crumb.html @@ -16,7 +16,7 @@ "module": "js/components/layout/bread-crumb.reel", "name": "Breadcrumb", "properties": { - "element": {"#": "breadcrumb_trail"}, + "element": {"#": "breadcrumbTrail"}, "button" : {"@":"breadCrumbButton"}, "stylerepetition" : {"@":"repetition1"} @@ -60,11 +60,11 @@ -