aboutsummaryrefslogtreecommitdiff
path: root/js/document/models/text.js
diff options
context:
space:
mode:
authorhwc4872012-07-09 16:08:02 -0700
committerhwc4872012-07-09 16:08:02 -0700
commit5085d0f67df89a21715308956004164597a6ba79 (patch)
tree2c896163143a66331205a39b0a3b1b45d51bf12a /js/document/models/text.js
parent51f1691f792dbda9b740ded8aa0457c9406db156 (diff)
parent84b3327bd92faafab7954b5eb64c7abe24a3fe13 (diff)
downloadninja-5085d0f67df89a21715308956004164597a6ba79.tar.gz
Merge branch 'master' of github.com:Motorola-Mobility/ninja-internal into GridFixes
Conflicts: js/helper-classes/3D/StageLine.js
Diffstat (limited to 'js/document/models/text.js')
-rwxr-xr-xjs/document/models/text.js62
1 files changed, 31 insertions, 31 deletions
diff --git a/js/document/models/text.js b/js/document/models/text.js
index acb70631..b81a2b13 100755
--- a/js/document/models/text.js
+++ b/js/document/models/text.js
@@ -30,19 +30,19 @@ POSSIBILITY OF SUCH DAMAGE.
30 30
31//////////////////////////////////////////////////////////////////////// 31////////////////////////////////////////////////////////////////////////
32// 32//
33var Montage = require("montage/core/core").Montage, 33var Montage = require("montage/core/core").Montage,
34 BaseDocumentModel = require("js/document/models/base").BaseDocumentModel; 34 BaseDocumentModel = require("js/document/models/base").BaseDocumentModel;
35//////////////////////////////////////////////////////////////////////// 35////////////////////////////////////////////////////////////////////////
36// 36//
37exports.TextDocumentModel = Montage.create(BaseDocumentModel, { 37exports.TextDocumentModel = Montage.create(BaseDocumentModel, {
38 //////////////////////////////////////////////////////////////////// 38 ////////////////////////////////////////////////////////////////////
39 // 39 //
40 hasTemplate: { 40 hasTemplate: {
41 enumerable: false, 41 enumerable: false,
42 value: false 42 value: false
43 }, 43 },
44//////////////////////////////////////////////////////////////////// 44////////////////////////////////////////////////////////////////////
45 // 45 //
46 save: { 46 save: {
47 enumerable: false, 47 enumerable: false,
48 value: function (callback) { 48 value: function (callback) {
@@ -58,37 +58,37 @@ exports.TextDocumentModel = Montage.create(BaseDocumentModel, {
58 } 58 }
59 }, 59 },
60//////////////////////////////////////////////////////////////////// 60////////////////////////////////////////////////////////////////////
61 // 61 //
62 handleSaved: { 62 handleSaved: {
63 value: function (result) { 63 value: function (result) {
64 // 64 //
65 if (result.status === 204) { 65 if (result.status === 204) {
66 this.model.needsSave = false; 66 this.model.needsSave = false;
67 } 67 }
68 // 68 //
69 if (this.callback) this.callback(result); 69 if (this.callback) this.callback(result);
70 } 70 }
71 }, 71 },
72 //////////////////////////////////////////////////////////////////// 72 ////////////////////////////////////////////////////////////////////
73 // 73 //
74 close: { 74 close: {
75 value: function (view, callback) { 75 value: function (view, callback) {
76 //Outcome of close (pending on save logic) 76 //Outcome of close (pending on save logic)
77 var success; 77 var success;
78 // 78 //
79 if (this.needsSave) { 79 if (this.needsSave) {
80 //Prompt user to save of lose data 80 //Prompt user to save of lose data
81 } else { 81 } else {
82 //Close file 82 //Close file
83 success = true; 83 success = true;
84 } 84 }
85 // 85 //
86 this.parentContainer.removeChild(this.views.code.textViewContainer); 86 this.parentContainer.removeChild(this.views.code.textViewContainer);
87 this.application.ninja.stage.restoreAllPanels(); 87 this.application.ninja.stage.restoreAllPanels();
88 this.views.code = null; 88 this.views.code = null;
89 89
90 // 90 //
91 return success; 91 return success;
92 } 92 }
93 } 93 }
94}); 94});