Skip to content

Commit

Permalink
ENYO-1020: DirectorySelectorPopup is now FileChooser
Browse files Browse the repository at this point in the history
- `DirectorySelectorPopup` is now `Ares.FileChooser` defined by
  `utilities/source/FileChooser`
- Move manual `style:`  into `Ares.css` as `.ares-filechooser*`

Enyo-DCO-1.1-Signed-off-by: Francois-Xavier KOWALSKI <francois-xavier.kowalski@hp.com>
  • Loading branch information
Francois-Xavier KOWALSKI committed Mar 20, 2013
1 parent 70c27b5 commit 339007f
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 8 deletions.
13 changes: 13 additions & 0 deletions ares/Ares.css
Expand Up @@ -28,6 +28,19 @@ body {
}

/**/

.ares-filechooser {
height: 400px;
width: 600px;
}

.ares-filechooser-header {
padding: 0 4px;
vertical-align: middle;
}

/**/

.ares-groupbox-item-key {
padding: 0.5em;
}
Expand Down
4 changes: 2 additions & 2 deletions project-view/source/ProjectWizard.js
Expand Up @@ -21,7 +21,7 @@ enyo.kind({

components: [
{kind: "ProjectProperties", name: "propertiesWidget"},
{kind: "SelectDirectoryPopup", canGenerate: false, name: "selectDirectoryPopup"},
{kind: "Ares.FileChooser", canGenerate: false, name: "selectDirectoryPopup"},
{kind: "Ares.ErrorPopup", name: "errorPopup", msg: "unknown error"}
],
debug: false,
Expand Down Expand Up @@ -345,7 +345,7 @@ enyo.kind({
*/
enyo.kind({
name: "ProjectWizardScan",
kind: "SelectDirectoryPopup",
kind: "Ares.FileChooser",
modal: true,
centered: true,
floating: true,
Expand Down
1 change: 0 additions & 1 deletion project-view/source/package.js
@@ -1,6 +1,5 @@
enyo.depends(
"ProjectList.js",
"DirectorySelector.js",
"ProjectWizard.js",
"ProjectView.js",
"ProjectConfig.js",
Expand Down
2 changes: 1 addition & 1 deletion test/testrunner/tests/ProjectViewTest.js
Expand Up @@ -67,7 +67,7 @@ enyo.kind({
if (this.debug) enyo.log("testHandleSelectProvider: handleSelectProvider called") ;
dirPopup.handleSelectProvider(this, {service: myService, callBack: userSelectDir});
} else {
this.finish("SelectDirectoryPopup: "+this.aresObj.$.projectView.$.projectWizardCreate.$.SelectDirectoryPopup+ " is not available!");
this.finish("Ares.FileChooser: "+this.aresObj.$.projectView.$.projectWizardCreate.$.selectDirectoryPopup+ " is not available!");
}
},
statics: {
Expand Down
@@ -1,5 +1,5 @@
enyo.kind({
name: "SelectDirectoryPopup",
name: "Ares.FileChooser",
kind: "onyx.Popup",
modal: true,
centered: true,
Expand All @@ -13,8 +13,8 @@ enyo.kind({
this.$.header.setContent(this.headerText);
},
components: [
{kind: "FittableRows", style: "height: 400px; width: 600px", components: [
{kind: "Control", tag: "span", style: "padding: 0 4px; vertical-align: middle;", content: "Select a directory", name: "header"},
{kind: "FittableRows", classes: "ares-filechooser", components: [
{kind: "Control", tag: "span", classes: "ares-filechooser-header", content: "Select a directory", name: "header"},
{kind: "FittableColumns", content: "fittableColumns", fit: true, components: [
{kind: "ProviderList", type: "filesystem", name: "providerList", header: "Sources", onSelectProvider: "handleSelectProvider"},
{kind: "HermesFileTree", fit: true, name: "hermesFileTree", onFileClick: "selectFile", onFolderClick: "selectFolder", onNewFolderConfirm: "createFolder"}
Expand Down
3 changes: 2 additions & 1 deletion utilities/source/package.js
Expand Up @@ -5,5 +5,6 @@ enyo.depends(
"ErrorPopup.js",
"AsyncError.js",
"IFrame.js",
"LocalStorage.js"
"LocalStorage.js",
"FileChooser.js"
);

0 comments on commit 339007f

Please sign in to comment.