From 315f28edfae376c80d1f064bb65d7e8bb6d12045 Mon Sep 17 00:00:00 2001 From: Morgan McMillian Date: Sun, 11 Mar 2012 21:06:11 -0400 Subject: [PATCH] fixes for scrolling in the modaldialog kind --- app/source/TodoEdit.js | 11 +++++++---- app/source/TodoTxt.js | 4 ++-- app/source/styles.css | 1 + 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/app/source/TodoEdit.js b/app/source/TodoEdit.js index a208017..278dd90 100644 --- a/app/source/TodoEdit.js +++ b/app/source/TodoEdit.js @@ -22,14 +22,15 @@ enyo.kind({ "onSave": "" }, components: [ - {name: "insertPopup", kind: "Popup", dismissWithClick: false, + {name: "insertPopup", kind: "ModalDialog", dismissWithClick: true, layoutKind: "VFlexLayout", height: "60%", + contentHeight: "100%", onClose: "closePopup", components: [ - {flex: 1, kind: "Scroller", components: [ + {flex: 1, name: "iscroller", kind: "Scroller", + components: [ {name: "projects", kind: "RowGroup", caption: "Projects"}, {name: "contexts", kind: "RowGroup", caption: "Contexts"} - ]}, - {kind: "Button", caption: "Dismiss", onclick: "closePopup"} + ]} ]}, {name: "filterToolbar", kind: "Toolbar", pack: "justify", className: "enyo-toolbar-light", components: [ @@ -93,6 +94,7 @@ enyo.kind({ ); } this.$.contexts.render(); + this.$.iscroller.render(); }, closePopup: function() { @@ -106,6 +108,7 @@ enyo.kind({ eval("this.$."+name+".destroy()"); } this.$.contexts.render(); + this.$.tododetail.forceFocus(); this.$.insertPopup.close(); }, diff --git a/app/source/TodoTxt.js b/app/source/TodoTxt.js index ce58395..1680d77 100644 --- a/app/source/TodoTxt.js +++ b/app/source/TodoTxt.js @@ -26,9 +26,9 @@ enyo.kind({ {caption: "Preferences", onclick: "showPrefView"}, {caption: "About", onclick: "showAbout"} ]}, - {kind: "Popup", name: "about", layoutKind: "VFlexLayout", + {kind: "ModalDialog", name: "about", layoutKind: "VFlexLayout", contentHeight: "100%", height: "80%", width: "80%", - components: [ + dismissWithClick: true, components: [ {name: "aboutTitle", content: ""}, {content: "by Morgan McMillian"}, {kind: "Divider", caption: "Version History"}, diff --git a/app/source/styles.css b/app/source/styles.css index 1f17d3b..9b89907 100644 --- a/app/source/styles.css +++ b/app/source/styles.css @@ -33,3 +33,4 @@ } .ver-history { font-size: 16px; } .version { font-weight: bold;} +.enyo-modaldialog > * { height:100%; }