aboutsummaryrefslogtreecommitdiff
path: root/js/document
diff options
context:
space:
mode:
authorValerio Virgillito2012-02-17 15:27:26 -0800
committerValerio Virgillito2012-02-17 15:27:26 -0800
commitde4e42ce73ac12f63d95db2fdce87e57db5593fb (patch)
tree4329cfb5653f8be117de13567f46ed5d32c6c2d2 /js/document
parent7789a48fab2b1541ef7ac1b94e14b3f8dccbb4ff (diff)
parent33b27df9b1e64eda709612902c690be35e040079 (diff)
downloadninja-de4e42ce73ac12f63d95db2fdce87e57db5593fb.tar.gz
Merge pull request #54 from joseeight/TabPreview
Tab preview
Diffstat (limited to 'js/document')
-rwxr-xr-xjs/document/html-document.js45
1 files changed, 45 insertions, 0 deletions
diff --git a/js/document/html-document.js b/js/document/html-document.js
index ae2b4600..77cc711d 100755
--- a/js/document/html-document.js
+++ b/js/document/html-document.js
@@ -363,6 +363,9 @@ exports.HTMLDocument = Montage.create(TextDocument, {
363 // 363 //
364 handleEvent: { 364 handleEvent: {
365 value: function(event){ 365 value: function(event){
366 //TODO: Remove
367 window.hackPreview = this.livePreview.bind(this);
368
366 this.application.ninja.documentController._hackRootFlag = true; 369 this.application.ninja.documentController._hackRootFlag = true;
367 //console.log(this._userDocument.root, this); 370 //console.log(this._userDocument.root, this);
368 //TODO: Clean up, using for prototyping save 371 //TODO: Clean up, using for prototyping save
@@ -471,6 +474,48 @@ exports.HTMLDocument = Montage.create(TextDocument, {
471 } 474 }
472 }, 475 },
473 476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499 ////////////////////////////////////////////////////////////////////
500 //
501 livePreview: {
502 enumerable: false,
503 value: function () {
504 //this.application.ninja.documentController
505 //console.log(this.application.ninja.coreIoApi.rootUrl+this.application.ninja.documentController._activeDocument.uri.split(this.application.ninja.coreIoApi.cloudData.root)[1]);
506 chrome.tabs.create({url: this.application.ninja.coreIoApi.rootUrl+this.application.ninja.documentController._activeDocument.uri.split(this.application.ninja.coreIoApi.cloudData.root)[1]});
507 }
508 },
509 ////////////////////////////////////////////////////////////////////
510
511
512
513
514
515
516
517
518
474 //////////////////////////////////////////////////////////////////// 519 ////////////////////////////////////////////////////////////////////
475 // 520 //
476 save: { 521 save: {