From dd5519dc15f56d44abe38b6454a5034db4800585 Mon Sep 17 00:00:00 2001 From: Ananya Sen Date: Fri, 16 Mar 2012 17:27:42 -0700 Subject: fix for IKNINJA-1357 - Cannot create other file types such as css, json from the New file dialog box. Signed-off-by: Ananya Sen --- .../ui/tree-basic/treeItem.reel/treeItem.js | 35 ++++++++++++++++++++-- 1 file changed, 32 insertions(+), 3 deletions(-) (limited to 'js/components/ui') diff --git a/js/components/ui/tree-basic/treeItem.reel/treeItem.js b/js/components/ui/tree-basic/treeItem.reel/treeItem.js index a67dad43..13e278e9 100755 --- a/js/components/ui/tree-basic/treeItem.reel/treeItem.js +++ b/js/components/ui/tree-basic/treeItem.reel/treeItem.js @@ -107,8 +107,8 @@ exports.TreeItem = Montage.create(Component, { //icon or text click sends selection event var contentEls = this.element.querySelectorAll(".atreeItemContent"); for(var i=0;i" + "Modified date: "+ this.formatTimestamp(this.treeItemData.modifiedDate);} if((this.treeItemData.type === "directory") && (this.expandAfterDraw === true)){ - this.toggleContent(this.treeArrow); + this.expand(this.treeArrow); } if(this.treeItemData.uri === this.highlightedUri){ this.itemName.classList.add("selected"); @@ -171,6 +171,35 @@ exports.TreeItem = Montage.create(Component, { } }, + expand:{ + writable:false, + enumerable:true, + value:function(el){ + //if children already drawn then just hide/show + if(this.element.getElementsByTagName("ul").length > 0){ + var theParent = this.element.getElementsByTagName("ul")[0].parentNode; + if(theParent.classList.contains("hideTree")){//collapsed + theParent.classList.remove("hideTree");//expand + el.innerHTML = "▼"; + } + } + //else send event to draw the children + else{ + var treeClickEvent = document.createEvent("Events"); + treeClickEvent.initEvent("drawTree", false, false); + treeClickEvent.uri = this.treeItemData.uri; + treeClickEvent.uriType = this.treeItemData.type; + var divEl = document.createElement("div"); + this.element.appendChild(divEl); + treeClickEvent.subTreeContainer = divEl; + this.element.dispatchEvent(treeClickEvent); + + el.innerHTML = "▼"; + } + } + }, + + /** * Event Listeners */ -- cgit v1.2.3 From 50ee8428d398d2a5f21f4d642642ba85d7df3e5e Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Mon, 19 Mar 2012 13:51:31 -0700 Subject: Replacing old button component with montage button component in our UI. Signed-off-by: Nivesh Rajbhandari --- js/components/ui/property-control.reel/property-control.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/components/ui') diff --git a/js/components/ui/property-control.reel/property-control.js b/js/components/ui/property-control.reel/property-control.js index 58b1be9f..cd59c02c 100755 --- a/js/components/ui/property-control.reel/property-control.js +++ b/js/components/ui/property-control.reel/property-control.js @@ -9,7 +9,7 @@ var Montage = require("montage/core/core").Montage, HotText = require("js/components/hottext.reel").HotText, HotTextUnit = require("js/components/hottextunit.reel").HotTextUnit, Slider = require("js/components/slider.reel").Slider, - Button = require("js/components/button.reel").Button, + Button = require("montage/ui/button.reel").Button, Checkbox = require("js/components/checkbox.reel").Checkbox, Combobox = require("js/components/combobox.reel").Combobox, TextField = require("js/components/TextField.reel").TextField, -- cgit v1.2.3 From 85bf9f937fa2ec46e42f791fc6815f7c2f5446ea Mon Sep 17 00:00:00 2001 From: Ananya Sen Date: Thu, 22 Mar 2012 10:42:05 -0700 Subject: file picker - added size unit new file - don't disable OK is file exists Signed-off-by: Ananya Sen --- js/components/ui/icon-list-basic/icon.reel/icon.js | 2 +- js/components/ui/tree-basic/treeItem.reel/treeItem.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (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 1ef6e277..7d36bc59 100755 --- a/js/components/ui/icon-list-basic/icon.reel/icon.js +++ b/js/components/ui/icon-list-basic/icon.reel/icon.js @@ -86,7 +86,7 @@ var Icon = exports.Icon = Montage.create(Component, { this.metadata = "Name: "+this.icondata.name; } this.metadata = this.metadata + "
" + "Type: "+this.icondata.type; - if(this.icondata.size){this.metadata = this.metadata + "
" + "Size: "+this.icondata.size;} + if(this.icondata.size){this.metadata = this.metadata + "
" + "Size: "+this.icondata.size+ " bytes";} if(this.icondata.creationDate){this.metadata = this.metadata + "
" + "Creation date: "+ this.formatTimestamp(this.icondata.creationDate);} if(this.icondata.modifiedDate){this.metadata = this.metadata + "
" + "Modified date: "+ this.formatTimestamp(this.icondata.modifiedDate);} diff --git a/js/components/ui/tree-basic/treeItem.reel/treeItem.js b/js/components/ui/tree-basic/treeItem.reel/treeItem.js index 13e278e9..e9e5c1fb 100755 --- a/js/components/ui/tree-basic/treeItem.reel/treeItem.js +++ b/js/components/ui/tree-basic/treeItem.reel/treeItem.js @@ -118,7 +118,7 @@ exports.TreeItem = Montage.create(Component, { this.metadata = "Name: "+this.treeItemData.name; } this.metadata = this.metadata + "
" + "Type: "+this.treeItemData.type; - if(this.treeItemData.size){this.metadata = this.metadata + "
" + "Size: "+this.treeItemData.size;} + if(this.treeItemData.size){this.metadata = this.metadata + "
" + "Size: "+this.treeItemData.size+ " bytes";} if(this.treeItemData.creationDate){this.metadata = this.metadata + "
" + "Creation date: "+ this.formatTimestamp(this.treeItemData.creationDate);} if(this.treeItemData.modifiedDate){this.metadata = this.metadata + "
" + "Modified date: "+ this.formatTimestamp(this.treeItemData.modifiedDate);} -- cgit v1.2.3 From f639ae09013dfb6559891bbbe560bd5303a05f97 Mon Sep 17 00:00:00 2001 From: Ananya Sen Date: Thu, 22 Mar 2012 10:45:38 -0700 Subject: IKNINJA-1364 : fixed css so that white spaces are not collapsed while rendering Signed-off-by: Ananya Sen --- js/components/ui/icon-list-basic/icon.reel/icon.css | 2 +- js/components/ui/tree-basic/treeItem.reel/treeItem.css | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'js/components/ui') diff --git a/js/components/ui/icon-list-basic/icon.reel/icon.css b/js/components/ui/icon-list-basic/icon.reel/icon.css index 9fb180d2..203db65c 100644 --- a/js/components/ui/icon-list-basic/icon.reel/icon.css +++ b/js/components/ui/icon-list-basic/icon.reel/icon.css @@ -35,7 +35,7 @@ .icon .iconLabel{ margin-top:8px; - white-space: nowrap; + white-space: pre; text-overflow: ellipsis; line-height:15px; overflow: hidden; diff --git a/js/components/ui/tree-basic/treeItem.reel/treeItem.css b/js/components/ui/tree-basic/treeItem.reel/treeItem.css index f8e67541..d33404e7 100755 --- a/js/components/ui/tree-basic/treeItem.reel/treeItem.css +++ b/js/components/ui/tree-basic/treeItem.reel/treeItem.css @@ -29,7 +29,7 @@ } .atreeItem .name{ - white-space: nowrap; + white-space: pre; text-overflow:ellipsis; line-height:15px; overflow: hidden; -- cgit v1.2.3 From 1b7e627ae290dacec3a242445f3e6c5de302626a Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Fri, 23 Mar 2012 10:51:26 -0700 Subject: Tweaking some styles in the materials popup. Signed-off-by: Nivesh Rajbhandari --- js/components/ui/color-chip.reel/color-chip.js | 2 ++ js/components/ui/input-group.reel/input-group.css | 15 ++++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) (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 7a7411da..4e64b2e8 100755 --- a/js/components/ui/color-chip.reel/color-chip.js +++ b/js/components/ui/color-chip.reel/color-chip.js @@ -56,6 +56,8 @@ var ColorChip = exports.ColorChip = Montage.create(Component, { if(this.hasIcon) { var icon = this.iconType || this.mode + "Icon"; this.application.ninja.colorController.addButton(icon, this.icon); + } else { + this.icon.style.display = "none"; } this.chipBtn.props = {side: 'right', align: 'top', wheel: true, palette: true, gradient: true, image: true, offset: this.offset}; diff --git a/js/components/ui/input-group.reel/input-group.css b/js/components/ui/input-group.reel/input-group.css index 0b7cd1ef..5707b17e 100755 --- a/js/components/ui/input-group.reel/input-group.css +++ b/js/components/ui/input-group.reel/input-group.css @@ -23,11 +23,24 @@ .propControl .inputRow div .hottext, .propControl .inputRow div .hottextInput, -.prop-controller .nj-skinned +.prop-controller .nj-skinned, +.prop-controller .hottext, +.prop-controller .hottextInput { border: 1px solid black; width: 30px !important; float:left; margin: 2px 0; text-align: center; +} + +.prop-controller .file-path +{ + width: 170px !important; +} + +.propControl .inputRow div.propControl +{ + float:left; + margin: 2px 0; } \ No newline at end of file -- cgit v1.2.3