diff options
author | Valerio Virgillito | 2012-06-04 10:20:57 -0700 |
---|---|---|
committer | Valerio Virgillito | 2012-06-04 10:20:57 -0700 |
commit | c1ec69879028220b0c3f11ad6e24035bf527802c (patch) | |
tree | 043bfe4ec9e08f4f598a4845ae5fbcddacc7c8fb /js/document/models | |
parent | 3abba04025dbc0daadb08184833a2558c442b8e1 (diff) | |
parent | 266460e52831c5b3a3473be420756fd88bb8aced (diff) | |
download | ninja-c1ec69879028220b0c3f11ad6e24035bf527802c.tar.gz |
Merge pull request #264 from mencio/document-bindings-fix
Document bindings fix - Changing the documents architecture to use bindings instead of events
Diffstat (limited to 'js/document/models')
-rwxr-xr-x | js/document/models/base.js | 14 | ||||
-rwxr-xr-x | js/document/models/html.js | 5 | ||||
-rwxr-xr-x | js/document/models/text.js | 3 |
3 files changed, 15 insertions, 7 deletions
diff --git a/js/document/models/base.js b/js/document/models/base.js index 6d9d2e89..76a5e62b 100755 --- a/js/document/models/base.js +++ b/js/document/models/base.js | |||
@@ -62,6 +62,20 @@ exports.BaseDocumentModel = Montage.create(Component, { | |||
62 | }, | 62 | }, |
63 | //////////////////////////////////////////////////////////////////// | 63 | //////////////////////////////////////////////////////////////////// |
64 | // | 64 | // |
65 | _selection: { | ||
66 | value: [] | ||
67 | }, | ||
68 | |||
69 | selection: { | ||
70 | get: function() { | ||
71 | return this._selection; | ||
72 | }, | ||
73 | set: function(value) { | ||
74 | this._selection = value; | ||
75 | } | ||
76 | }, | ||
77 | //////////////////////////////////////////////////////////////////// | ||
78 | // | ||
65 | fileTemplate: { | 79 | fileTemplate: { |
66 | value: null | 80 | value: null |
67 | }, | 81 | }, |
diff --git a/js/document/models/html.js b/js/document/models/html.js index 0fe33990..9aa0d27e 100755 --- a/js/document/models/html.js +++ b/js/document/models/html.js | |||
@@ -27,11 +27,6 @@ exports.HtmlDocumentModel = Montage.create(BaseDocumentModel, { | |||
27 | }, | 27 | }, |
28 | //////////////////////////////////////////////////////////////////// | 28 | //////////////////////////////////////////////////////////////////// |
29 | // | 29 | // |
30 | selection: { | ||
31 | value: [] | ||
32 | }, | ||
33 | //////////////////////////////////////////////////////////////////// | ||
34 | // | ||
35 | selectionContainer: { | 30 | selectionContainer: { |
36 | value: [] | 31 | value: [] |
37 | }, | 32 | }, |
diff --git a/js/document/models/text.js b/js/document/models/text.js index d1252b7d..6cb61d48 100755 --- a/js/document/models/text.js +++ b/js/document/models/text.js | |||
@@ -22,7 +22,7 @@ exports.TextDocumentModel = Montage.create(BaseDocumentModel, { | |||
22 | save: { | 22 | save: { |
23 | enumerable: false, | 23 | enumerable: false, |
24 | value: function (callback) { | 24 | value: function (callback) { |
25 | this.application.ninja.documentController.activeDocument.model.views.code.editor.save();//save to textarea | 25 | this.application.ninja.currentDocument.model.views.code.editor.save();//save to textarea |
26 | 26 | ||
27 | var self = this; | 27 | var self = this; |
28 | 28 | ||
@@ -60,7 +60,6 @@ exports.TextDocumentModel = Montage.create(BaseDocumentModel, { | |||
60 | } | 60 | } |
61 | // | 61 | // |
62 | this.parentContainer.removeChild(this.views.code.textViewContainer); | 62 | this.parentContainer.removeChild(this.views.code.textViewContainer); |
63 | this.application.ninja.stage.showCodeViewBar(false); | ||
64 | this.application.ninja.stage.restoreAllPanels(); | 63 | this.application.ninja.stage.restoreAllPanels(); |
65 | this.views.code = null; | 64 | this.views.code = null; |
66 | 65 | ||