aboutsummaryrefslogtreecommitdiff
path: root/js/document
diff options
context:
space:
mode:
authorAnanya Sen2012-06-12 12:09:45 -0700
committerAnanya Sen2012-06-12 12:09:45 -0700
commit3389cd085555e188800f337525c0fc8884084c04 (patch)
tree3899c1c4b8bce4ec3c05fb4b8f6f3824cd82188d /js/document
parent1e7f318e7bbc0c3cd95217fc369ccc30963a5381 (diff)
parent6854a72504f57903bd5de003e377f2aefb02d0da (diff)
downloadninja-3389cd085555e188800f337525c0fc8884084c04.tar.gz
Merge branch 'refs/heads/ninja-internal-master' into cut-copy-paste
Diffstat (limited to 'js/document')
-rwxr-xr-xjs/document/document-html.js6
-rwxr-xr-xjs/document/mediators/template.js4
-rwxr-xr-xjs/document/models/base.js3
-rwxr-xr-xjs/document/models/html.js5
-rwxr-xr-xjs/document/templates/banner/index.html23
-rwxr-xr-xjs/document/templates/html/index.html23
6 files changed, 57 insertions, 7 deletions
diff --git a/js/document/document-html.js b/js/document/document-html.js
index 04565753..15f88d09 100755
--- a/js/document/document-html.js
+++ b/js/document/document-html.js
@@ -107,6 +107,12 @@ exports.HtmlDocument = Montage.create(Component, {
107 }, 107 },
108 handleViewReady: { 108 handleViewReady: {
109 value: function() { 109 value: function() {
110 // TODO: Find a better way to initialize this property
111 // Assign the domContainer to be the document root on open
112 if(typeof this.model.domContainer !== "undefined") {
113 this.model.domContainer = this.model.documentRoot;
114 }
115
110 //Making callback after view is loaded 116 //Making callback after view is loaded
111 this.loaded.callback.call(this.loaded.context, this); 117 this.loaded.callback.call(this.loaded.context, this);
112 } 118 }
diff --git a/js/document/mediators/template.js b/js/document/mediators/template.js
index 4c72314a..50fad1c3 100755
--- a/js/document/mediators/template.js
+++ b/js/document/mediators/template.js
@@ -613,8 +613,8 @@ exports.TemplateDocumentMediator = Montage.create(Component, {
613 } else { 613 } else {
614 cleanHTML = template.file.content.document.documentElement.outerHTML.replace(/(\b(?:(?:https?|ftp|file|[A-Za-z]+):\/\/|www\.|ftp\.)(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[-A-Z0-9+&@#\/%=~_|$?!:,.])*(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[A-Z0-9+&@#\/%=~_|$]))/gi, parseNinjaRootUrl.bind(this)); 614 cleanHTML = template.file.content.document.documentElement.outerHTML.replace(/(\b(?:(?:https?|ftp|file|[A-Za-z]+):\/\/|www\.|ftp\.)(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[-A-Z0-9+&@#\/%=~_|$?!:,.])*(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[A-Z0-9+&@#\/%=~_|$]))/gi, parseNinjaRootUrl.bind(this));
615 } 615 }
616 //TODO: Remove, this is a temp hack 616 //TODO: Remove, this is a temp hack to maintain a doc type on HTML files
617 cleanHTML = cleanHTML; 617 cleanHTML = '<!DOCTYPE html>'+cleanHTML;
618 // 618 //
619 function parseNinjaRootUrl(url) { 619 function parseNinjaRootUrl(url) {
620 if (url.indexOf(this.application.ninja.coreIoApi.rootUrl) !== -1) { 620 if (url.indexOf(this.application.ninja.coreIoApi.rootUrl) !== -1) {
diff --git a/js/document/models/base.js b/js/document/models/base.js
index 5fa06259..1307e0c0 100755
--- a/js/document/models/base.js
+++ b/js/document/models/base.js
@@ -65,6 +65,9 @@ exports.BaseDocumentModel = Montage.create(Component, {
65 _selection: { 65 _selection: {
66 value: [] 66 value: []
67 }, 67 },
68 domContainer: {
69 value: null
70 },
68 //////////////////////////////////////////////////////////////////// 71 ////////////////////////////////////////////////////////////////////
69 // 72 //
70 selection: { 73 selection: {
diff --git a/js/document/models/html.js b/js/document/models/html.js
index 7064c6e3..4a232ee1 100755
--- a/js/document/models/html.js
+++ b/js/document/models/html.js
@@ -27,11 +27,6 @@ exports.HtmlDocumentModel = Montage.create(BaseDocumentModel, {
27 this.libs = {montage: false, canvas: false, montageId: null, canvasId: null}; 27 this.libs = {montage: false, canvas: false, montageId: null, canvasId: null};
28 } 28 }
29 }, 29 },
30 ////////////////////////////////////////////////////////////////////
31 //
32 selectionContainer: {
33 value: []
34 },
35 //////////////////////////////////////////////////////////////////// 30 ////////////////////////////////////////////////////////////////////
36 // 31 //
37 draw3DGrid: { 32 draw3DGrid: {
diff --git a/js/document/templates/banner/index.html b/js/document/templates/banner/index.html
index 08a998e5..626dc0bc 100755
--- a/js/document/templates/banner/index.html
+++ b/js/document/templates/banner/index.html
@@ -71,6 +71,29 @@
71 -webkit-transform-style: preserve-3d; 71 -webkit-transform-style: preserve-3d;
72 -webkit-transform: perspective(1400) matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); 72 -webkit-transform: perspective(1400) matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
73 } 73 }
74
75 ::-webkit-scrollbar { width: 11px; height: 11px; }
76 ::-webkit-scrollbar-button:start:decrement, ::-webkit-scrollbar-button:end:increment { display: none; }
77 ::-webkit-scrollbar-button:vertical:start:increment, body::-webkit-scrollbar-button:vertical:end:decrement { display: none; }
78 ::-webkit-scrollbar-button:horizontal:start:increment, body::-webkit-scrollbar-button:horizontal:end:decrement { display: none; }
79 ::-webkit-scrollbar-track:vertical { background-color: black; }
80 ::-webkit-scrollbar-track:horizontal { background-color: black; }
81 ::-webkit-scrollbar-track-piece:vertical:start { background-color: transparent; }
82 ::-webkit-scrollbar-track-piece:horizontal:start { background-color: transparent; }
83 ::-webkit-scrollbar-track-piece:vertical:end { background-color: transparent; }
84 ::-webkit-scrollbar-track-piece:horizontal:end { background-color: transparent; }
85 ::-webkit-scrollbar-thumb:vertical { border-color: black; border-style: solid; border-width: 2px; -webkit-border-radius: 6px; background: -webkit-gradient(linear, left top, right top, color-stop(0.16, #8c8c8c), color-stop(0.49, #adadad), color-stop(0.82, #8c8c8c)); }
86 ::-webkit-scrollbar-thumb:vertical:hover { border-color: black; border-style: solid; border-width: 2px; -webkit-border-radius: 6px; background: -webkit-gradient(linear, left top, right top, color-stop(0.1, #bebebe), color-stop(0.5, white), color-stop(0.9, #bebebe)); }
87 ::-webkit-scrollbar-thumb:horizontal { border-color: black; border-style: solid; border-width: 2px; -webkit-border-radius: 6px; background: -webkit-gradient(linear, left top, left bottom, color-stop(0.1, #8c8c8c), color-stop(0.5, #adadad), color-stop(0.9, #8c8c8c)); }
88 ::-webkit-scrollbar-thumb:horizontal:hover { border-color: black; border-style: solid; border-width: 2px; -webkit-border-radius: 6px; background: -webkit-gradient(linear, left top, left bottom, color-stop(0.16, #bebebe), color-stop(0.49, white), color-stop(0.82, #bebebe)); }
89 ::-webkit-scrollbar-corner { background-color: black; }
90 ::-webkit-scrollbar-corner:window-inactive { background-color: black; }
91 ::-webkit-scrollbar-track:vertical:disabled { display: block; }
92 ::-webkit-scrollbar-track:horizontal:disabled { display: block; }
93 ::-webkit-scrollbar-track-piece:disabled { display: block; }
94 ::-webkit-scrollbar-corner:disabled { display: block; }
95 ::-webkit-resizer:disabled { display: block; }
96
74 </style> 97 </style>
75 98
76 <script type="text/javascript" data-ninja-template="true"> 99 <script type="text/javascript" data-ninja-template="true">
diff --git a/js/document/templates/html/index.html b/js/document/templates/html/index.html
index c74a7251..8fc0d82f 100755
--- a/js/document/templates/html/index.html
+++ b/js/document/templates/html/index.html
@@ -58,6 +58,29 @@
58 .nj-element-highlight { 58 .nj-element-highlight {
59 outline: 4px solid #ff0000; 59 outline: 4px solid #ff0000;
60 } 60 }
61
62 ::-webkit-scrollbar { width: 11px; height: 11px; }
63 ::-webkit-scrollbar-button:start:decrement, ::-webkit-scrollbar-button:end:increment { display: none; }
64 ::-webkit-scrollbar-button:vertical:start:increment, body::-webkit-scrollbar-button:vertical:end:decrement { display: none; }
65 ::-webkit-scrollbar-button:horizontal:start:increment, body::-webkit-scrollbar-button:horizontal:end:decrement { display: none; }
66 ::-webkit-scrollbar-track:vertical { background-color: black; }
67 ::-webkit-scrollbar-track:horizontal { background-color: black; }
68 ::-webkit-scrollbar-track-piece:vertical:start { background-color: transparent; }
69 ::-webkit-scrollbar-track-piece:horizontal:start { background-color: transparent; }
70 ::-webkit-scrollbar-track-piece:vertical:end { background-color: transparent; }
71 ::-webkit-scrollbar-track-piece:horizontal:end { background-color: transparent; }
72 ::-webkit-scrollbar-thumb:vertical { border-color: black; border-style: solid; border-width: 2px; -webkit-border-radius: 6px; background: -webkit-gradient(linear, left top, right top, color-stop(0.16, #8c8c8c), color-stop(0.49, #adadad), color-stop(0.82, #8c8c8c)); }
73 ::-webkit-scrollbar-thumb:vertical:hover { border-color: black; border-style: solid; border-width: 2px; -webkit-border-radius: 6px; background: -webkit-gradient(linear, left top, right top, color-stop(0.1, #bebebe), color-stop(0.5, white), color-stop(0.9, #bebebe)); }
74 ::-webkit-scrollbar-thumb:horizontal { border-color: black; border-style: solid; border-width: 2px; -webkit-border-radius: 6px; background: -webkit-gradient(linear, left top, left bottom, color-stop(0.1, #8c8c8c), color-stop(0.5, #adadad), color-stop(0.9, #8c8c8c)); }
75 ::-webkit-scrollbar-thumb:horizontal:hover { border-color: black; border-style: solid; border-width: 2px; -webkit-border-radius: 6px; background: -webkit-gradient(linear, left top, left bottom, color-stop(0.16, #bebebe), color-stop(0.49, white), color-stop(0.82, #bebebe)); }
76 ::-webkit-scrollbar-corner { background-color: black; }
77 ::-webkit-scrollbar-corner:window-inactive { background-color: black; }
78 ::-webkit-scrollbar-track:vertical:disabled { display: block; }
79 ::-webkit-scrollbar-track:horizontal:disabled { display: block; }
80 ::-webkit-scrollbar-track-piece:disabled { display: block; }
81 ::-webkit-scrollbar-corner:disabled { display: block; }
82 ::-webkit-resizer:disabled { display: block; }
83
61 </style> 84 </style>
62 85
63 <script type="text/javascript" data-ninja-template="true"> 86 <script type="text/javascript" data-ninja-template="true">