diff options
Diffstat (limited to 'js/document')
-rwxr-xr-x | js/document/html-document.js | 45 |
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: { |