aboutsummaryrefslogtreecommitdiff
path: root/js/controllers/document-controller.js
diff options
context:
space:
mode:
authorAnanya Sen2012-03-07 14:26:37 -0800
committerAnanya Sen2012-03-07 14:26:37 -0800
commit250420d8c6154172b27fe53aff30e78c227e8a67 (patch)
treef4cad44f6145ad9f0fdba2667f04df166f9f1f37 /js/controllers/document-controller.js
parent8020dc6e99e3bf0aad605f66a175bc2245da534b (diff)
downloadninja-250420d8c6154172b27fe53aff30e78c227e8a67.tar.gz
minor fixes
Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
Diffstat (limited to 'js/controllers/document-controller.js')
-rwxr-xr-xjs/controllers/document-controller.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/js/controllers/document-controller.js b/js/controllers/document-controller.js
index ca3cd585..87e93465 100755
--- a/js/controllers/document-controller.js
+++ b/js/controllers/document-controller.js
@@ -166,7 +166,7 @@ var DocumentController = exports.DocumentController = Montage.create(Component,
166 //////////////////////////////////////////////////////////////////// 166 ////////////////////////////////////////////////////////////////////
167 handleExecuteFileClose:{ 167 handleExecuteFileClose:{
168 value: function(event) { 168 value: function(event) {
169 if((typeof this.activeDocument !== "undefined") && this.application.ninja.coreIoApi.cloudAvailable()){ 169 if(this.activeDocument && this.application.ninja.coreIoApi.cloudAvailable()){
170 this.closeDocument(this.activeDocument.uuid); 170 this.closeDocument(this.activeDocument.uuid);
171 } 171 }
172 } 172 }
@@ -372,11 +372,11 @@ var DocumentController = exports.DocumentController = Montage.create(Component,
372 nextDocumentIndex = closeDocumentIndex - 1; 372 nextDocumentIndex = closeDocumentIndex - 1;
373 } 373 }
374 this.application.ninja.stage.stageView.switchDocument(this._documents[nextDocumentIndex]); 374 this.application.ninja.stage.stageView.switchDocument(this._documents[nextDocumentIndex]);
375 doc.stopVideos(); 375 if(typeof this.activeDocument.stopVideos !== "undefined"){doc.stopVideos();}
376 this._removeDocumentView(doc.container); 376 this._removeDocumentView(doc.container);
377 }else if(this._documents.length === 0){ 377 }else if(this._documents.length === 0){
378 if(typeof this.activeDocument.pauseVideos !== "undefined"){ 378 if(typeof this.activeDocument.pauseAndStopVideos !== "undefined"){
379 this.activeDocument.pauseVideos(true); 379 this.activeDocument.pauseAndStopVideos();
380 } 380 }
381 this.activeDocument = null; 381 this.activeDocument = null;
382 this._removeDocumentView(doc.container); 382 this._removeDocumentView(doc.container);
@@ -385,8 +385,8 @@ var DocumentController = exports.DocumentController = Montage.create(Component,
385 385
386 this.application.ninja.stage.hideCanvas(true); 386 this.application.ninja.stage.hideCanvas(true);
387 }else{//closing inactive document tab - just clear DOM 387 }else{//closing inactive document tab - just clear DOM
388 if(typeof doc.pauseVideos !== "undefined"){ 388 if(typeof doc.pauseAndStopVideos !== "undefined"){
389 doc.pauseVideos(true); 389 doc.pauseAndStopVideos();
390 } 390 }
391 this._removeDocumentView(doc.container); 391 this._removeDocumentView(doc.container);
392 } 392 }