diff options
author | Ananya Sen | 2012-02-13 19:55:46 -0800 |
---|---|---|
committer | Ananya Sen | 2012-02-13 19:55:46 -0800 |
commit | 50a40c4e21b9a4d53d6d1fb739d838c0319ab09b (patch) | |
tree | 1aa918165317a4bf08876560c0704a02866a436d /js/components/ui | |
parent | a6948e635389768fc316f1fb86df2524b482b47c (diff) | |
download | ninja-50a40c4e21b9a4d53d6d1fb739d838c0319ab09b.tar.gz |
new file dialog - preselect default template
Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
Diffstat (limited to 'js/components/ui')
3 files changed, 26 insertions, 1 deletions
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 d934e7f1..b0279207 100755 --- a/js/components/ui/icon-list-basic/icon.reel/icon.js +++ b/js/components/ui/icon-list-basic/icon.reel/icon.js | |||
@@ -22,6 +22,13 @@ var Icon = exports.Icon = Montage.create(Component, { | |||
22 | this.needsDraw = true; | 22 | this.needsDraw = true; |
23 | } | 23 | } |
24 | }, | 24 | }, |
25 | |||
26 | selectedUri:{ | ||
27 | writable:true, | ||
28 | enumerable:true, | ||
29 | value:null | ||
30 | }, | ||
31 | |||
25 | metadata:{ | 32 | metadata:{ |
26 | enumerable:true, | 33 | enumerable:true, |
27 | writable:true, | 34 | writable:true, |
@@ -83,6 +90,13 @@ var Icon = exports.Icon = Montage.create(Component, { | |||
83 | if(this.icondata.creationDate){this.metadata = this.metadata + "<br />" + "Creation date: "+ this.formatTimestamp(this.icondata.creationDate);} | 90 | if(this.icondata.creationDate){this.metadata = this.metadata + "<br />" + "Creation date: "+ this.formatTimestamp(this.icondata.creationDate);} |
84 | if(this.icondata.modifiedDate){this.metadata = this.metadata + "<br />" + "Modified date: "+ this.formatTimestamp(this.icondata.modifiedDate);} | 91 | if(this.icondata.modifiedDate){this.metadata = this.metadata + "<br />" + "Modified date: "+ this.formatTimestamp(this.icondata.modifiedDate);} |
85 | 92 | ||
93 | //show default selection | ||
94 | if(this.icondata.uri === this.selectedUri){ | ||
95 | var selectedItemEvent = document.createEvent("Events"); | ||
96 | selectedItemEvent.initEvent("selectedItem", false, false); | ||
97 | selectedItemEvent.uri = this.icondata.uri; | ||
98 | this.element.dispatchEvent(selectedItemEvent); | ||
99 | } | ||
86 | } | 100 | } |
87 | }, | 101 | }, |
88 | 102 | ||
diff --git a/js/components/ui/icon-list-basic/iconsList.reel/iconsList.html b/js/components/ui/icon-list-basic/iconsList.reel/iconsList.html index 50a1d61d..0bb79873 100755 --- a/js/components/ui/icon-list-basic/iconsList.reel/iconsList.html +++ b/js/components/ui/icon-list-basic/iconsList.reel/iconsList.html | |||
@@ -21,6 +21,11 @@ | |||
21 | "boundObject": {"@": "repetition1"}, | 21 | "boundObject": {"@": "repetition1"}, |
22 | "boundObjectPropertyPath": "objectAtCurrentIteration", | 22 | "boundObjectPropertyPath": "objectAtCurrentIteration", |
23 | "oneway": true | 23 | "oneway": true |
24 | }, | ||
25 | "selectedUri": { | ||
26 | "boundObject": {"@": "owner"}, | ||
27 | "boundObjectPropertyPath": "selected", | ||
28 | "oneway": true | ||
24 | } | 29 | } |
25 | } | 30 | } |
26 | }, | 31 | }, |
diff --git a/js/components/ui/icon-list-basic/iconsList.reel/iconsList.js b/js/components/ui/icon-list-basic/iconsList.reel/iconsList.js index 56eb57c3..d36aa40f 100755 --- a/js/components/ui/icon-list-basic/iconsList.reel/iconsList.js +++ b/js/components/ui/icon-list-basic/iconsList.reel/iconsList.js | |||
@@ -15,11 +15,17 @@ var IconsList = exports.IconsList = Montage.create(Component, { | |||
15 | }, | 15 | }, |
16 | 16 | ||
17 | iconsViewDataObject:{ | 17 | iconsViewDataObject:{ |
18 | writable:true, | 18 | writable:true, |
19 | enumerable:true, | 19 | enumerable:true, |
20 | value:[] | 20 | value:[] |
21 | }, | 21 | }, |
22 | 22 | ||
23 | selected:{ | ||
24 | writable:true, | ||
25 | enumerable:true, | ||
26 | value:null | ||
27 | }, | ||
28 | |||
23 | willDraw: { | 29 | willDraw: { |
24 | enumerable: false, | 30 | enumerable: false, |
25 | value: function() { | 31 | value: function() { |