diff options
| author | Jules Laplace <jules@okfoc.us> | 2015-08-26 18:30:33 -0400 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2015-08-26 18:30:33 -0400 |
| commit | c781911322c84eb0c2aa4a00860016437d7b7cba (patch) | |
| tree | 6c2531c9832a18b86ee87f01f47b7aa16afb8932 /public/assets/javascripts/ui/blueprint/BlueprintUploader.js | |
| parent | a95cd473c3d6a3f98effcba03519d36a64ccac0f (diff) | |
surface blueprints on new project modal
Diffstat (limited to 'public/assets/javascripts/ui/blueprint/BlueprintUploader.js')
| -rw-r--r-- | public/assets/javascripts/ui/blueprint/BlueprintUploader.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/public/assets/javascripts/ui/blueprint/BlueprintUploader.js b/public/assets/javascripts/ui/blueprint/BlueprintUploader.js index fbb71d5..fe1073a 100644 --- a/public/assets/javascripts/ui/blueprint/BlueprintUploader.js +++ b/public/assets/javascripts/ui/blueprint/BlueprintUploader.js @@ -37,8 +37,12 @@ var BlueprintUploader = UploadView.extend({ if (data && data.length) { this.$blueprints.show() data.forEach(this.append.bind(this)) - this.hide() - if (this.nameToShow && this.nameToShow !== "new") { + if (this.nameToShow === "new") { + // don't pick anything.. + this.show() + } + else if (! this.nameToShow) { + this.hide() data.some(function(el){ if (el.slug == this.nameToShow) { this.parent.scaler.pick(el) @@ -47,6 +51,7 @@ var BlueprintUploader = UploadView.extend({ }.bind(this)) } else { + this.hide() this.parent.scaler.pick(data[0]) } } |
