aboutsummaryrefslogtreecommitdiff
path: root/js/io
diff options
context:
space:
mode:
authorAnanya Sen2012-02-10 15:50:14 -0800
committerAnanya Sen2012-02-10 15:50:14 -0800
commitc627ebb5735d55218813b073c655dae6cded6040 (patch)
treef716757dab75d7626297893c7f4aca3596d606de /js/io
parent8c40940f030adb74f534c3c5ad8d845e41f09b30 (diff)
downloadninja-c627ebb5735d55218813b073c655dae6cded6040.tar.gz
show iframeContainer if all documents are closed
Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
Diffstat (limited to 'js/io')
-rwxr-xr-xjs/io/document/document-controller.js3
-rw-r--r--js/io/system/chromeapi.js2
-rw-r--r--js/io/ui/new-file-dialog/new-file-options-navigator.reel/new-file-options-navigator.js5
-rw-r--r--js/io/ui/save-as-dialog.reel/save-as-dialog.js4
4 files changed, 8 insertions, 6 deletions
diff --git a/js/io/document/document-controller.js b/js/io/document/document-controller.js
index c2a2dab6..6dc7e670 100755
--- a/js/io/document/document-controller.js
+++ b/js/io/document/document-controller.js
@@ -293,6 +293,9 @@ var DocumentController = exports.DocumentController = Montage.create(Component,
293 nextDocumentIndex = closeDocumentIndex - 1; 293 nextDocumentIndex = closeDocumentIndex - 1;
294 } 294 }
295 this.application.ninja.stage.stageView.switchDocument(this._documents[nextDocumentIndex]); 295 this.application.ninja.stage.stageView.switchDocument(this._documents[nextDocumentIndex]);
296 }else{
297 //if there are no documents to switch to then just show the iframeContainer
298 document.getElementById("iframeContainer").style.display="block";
296 } 299 }
297 } 300 }
298 }, 301 },
diff --git a/js/io/system/chromeapi.js b/js/io/system/chromeapi.js
index eee7409d..e53d4841 100644
--- a/js/io/system/chromeapi.js
+++ b/js/io/system/chromeapi.js
@@ -180,7 +180,7 @@ exports.ChromeApi = Montage.create(Object.prototype, {
180 //Checking for directory not to already exist 180 //Checking for directory not to already exist
181 this.fileSystem.root.getDirectory(directoryPath, {}, function(dir) { 181 this.fileSystem.root.getDirectory(directoryPath, {}, function(dir) {
182 if (callback) callback(false); 182 if (callback) callback(false);
183 return; //Directory already exists 183 return false; //Directory already exists
184 }); 184 });
185 //Creating new directory 185 //Creating new directory
186 this.fileSystem.root.getDirectory(directoryPath, {create: true}, function(dir) { 186 this.fileSystem.root.getDirectory(directoryPath, {create: true}, function(dir) {
diff --git a/js/io/ui/new-file-dialog/new-file-options-navigator.reel/new-file-options-navigator.js b/js/io/ui/new-file-dialog/new-file-options-navigator.reel/new-file-options-navigator.js
index f514b81a..848e0cb8 100644
--- a/js/io/ui/new-file-dialog/new-file-options-navigator.reel/new-file-options-navigator.js
+++ b/js/io/ui/new-file-dialog/new-file-options-navigator.reel/new-file-options-navigator.js
@@ -226,7 +226,7 @@ var NewFileOptionsNavigator = exports.NewFileOptionsNavigator = Montage.create(C
226 226
227 if(!!this.selectedProjectType && !!this.selectedTemplate 227 if(!!this.selectedProjectType && !!this.selectedTemplate
228 && this.isValidFileName(projectName) && this.isValidUri(projectDirectory) 228 && this.isValidFileName(projectName) && this.isValidUri(projectDirectory)
229 && !this.checkFileExists(projectName, projectDirectory, this.selectedProjectType) 229 && !this.checkFileExists(projectName, projectDirectory, fileExtension)
230 ){ 230 ){
231 this.error.innerHTML=""; 231 this.error.innerHTML="";
232 //console.log("$$$ new file selections: \n" + selectionlog); 232 //console.log("$$$ new file selections: \n" + selectionlog);
@@ -258,7 +258,7 @@ var NewFileOptionsNavigator = exports.NewFileOptionsNavigator = Montage.create(C
258 this.popup.hide(); 258 this.popup.hide();
259 } 259 }
260 }else{ 260 }else{
261 if(this.error.innerHTML !== ""){ 261 if(this.error.innerHTML === ""){
262 this.showError("! Project Template, Name and Directory should be valid."); 262 this.showError("! Project Template, Name and Directory should be valid.");
263 } 263 }
264 //disable ok 264 //disable ok
@@ -328,7 +328,6 @@ var NewFileOptionsNavigator = exports.NewFileOptionsNavigator = Montage.create(C
328 328
329 if(!!this.selectedProjectType && !!this.selectedTemplate 329 if(!!this.selectedProjectType && !!this.selectedTemplate
330 && this.isValidFileName(this.newFileName) && this.isValidUri(this.newFileDirectory) 330 && this.isValidFileName(this.newFileName) && this.isValidUri(this.newFileDirectory)
331 && !this.checkFileExists(this.newFileName, this.newFileDirectory, this.newFileModel.projectTypeData[this.selectedProjectType.uri].fileExtension)
332 ){ 331 ){
333 status = true; 332 status = true;
334 this.okButton.removeAttribute("disabled"); 333 this.okButton.removeAttribute("disabled");
diff --git a/js/io/ui/save-as-dialog.reel/save-as-dialog.js b/js/io/ui/save-as-dialog.reel/save-as-dialog.js
index 4546e124..786ef5c9 100644
--- a/js/io/ui/save-as-dialog.reel/save-as-dialog.js
+++ b/js/io/ui/save-as-dialog.reel/save-as-dialog.js
@@ -89,7 +89,7 @@ var SaveAsDialog = exports.SaveAsDialog = Montage.create(Component, {
89 89
90 enableOk:{ 90 enableOk:{
91 value: function(){ 91 value: function(){
92 if(this.isValidFileName(this.fileName) && this.isValidUri(this.folderUri) && !this.checkFileExists(this.fileName, this.folderUri)){ 92 if(this.isValidFileName(this.fileName) && this.isValidUri(this.folderUri)){
93 this.okButton.removeAttribute("disabled"); 93 this.okButton.removeAttribute("disabled");
94 this.error.innerHTML=""; 94 this.error.innerHTML="";
95 } 95 }
@@ -141,7 +141,7 @@ var SaveAsDialog = exports.SaveAsDialog = Montage.create(Component, {
141 } 141 }
142 } 142 }
143 }else{ 143 }else{
144 if(this.error.innerHTML !== ""){ 144 if(this.error.innerHTML === ""){
145 this.showError("! Name and Location should be valid."); 145 this.showError("! Name and Location should be valid.");
146 } 146 }
147 //disable ok 147 //disable ok