diff options
author | Jose Antonio Marquez | 2012-03-16 21:03:58 -0700 |
---|---|---|
committer | Jose Antonio Marquez | 2012-03-16 21:03:58 -0700 |
commit | 415bab69cca4e8511144407b67bec80f2ba95422 (patch) | |
tree | c336ca8ae1bcd6761c924bacf8bfe7143b2c7885 /js/controllers | |
parent | e7e18f02870a0cfe06e550acf8ffef6eab945231 (diff) | |
parent | 954f5a13e371febcb1c0fb8015c577ee51c23130 (diff) | |
download | ninja-415bab69cca4e8511144407b67bec80f2ba95422.tar.gz |
Merge branch 'refs/heads/Ninja-Internal' into Document
Diffstat (limited to 'js/controllers')
-rwxr-xr-x | js/controllers/document-controller.js | 2 | ||||
-rwxr-xr-x | js/controllers/elements/element-controller.js | 17 |
2 files changed, 1 insertions, 18 deletions
diff --git a/js/controllers/document-controller.js b/js/controllers/document-controller.js index 87e93465..7d982a62 100755 --- a/js/controllers/document-controller.js +++ b/js/controllers/document-controller.js | |||
@@ -372,7 +372,7 @@ var DocumentController = exports.DocumentController = Montage.create(Component, | |||
372 | nextDocumentIndex = closeDocumentIndex - 1; | 372 | nextDocumentIndex = closeDocumentIndex - 1; |
373 | } | 373 | } |
374 | this.application.ninja.stage.stageView.switchDocument(this._documents[nextDocumentIndex]); | 374 | this.application.ninja.stage.stageView.switchDocument(this._documents[nextDocumentIndex]); |
375 | if(typeof this.activeDocument.stopVideos !== "undefined"){doc.stopVideos();} | 375 | if(typeof doc.stopVideos !== "undefined"){doc.stopVideos();} |
376 | this._removeDocumentView(doc.container); | 376 | this._removeDocumentView(doc.container); |
377 | }else if(this._documents.length === 0){ | 377 | }else if(this._documents.length === 0){ |
378 | if(typeof this.activeDocument.pauseAndStopVideos !== "undefined"){ | 378 | if(typeof this.activeDocument.pauseAndStopVideos !== "undefined"){ |
diff --git a/js/controllers/elements/element-controller.js b/js/controllers/elements/element-controller.js index 9f00604f..70aba54e 100755 --- a/js/controllers/elements/element-controller.js +++ b/js/controllers/elements/element-controller.js | |||
@@ -51,23 +51,6 @@ var ElementController = exports.ElementController = Montage.create(NJComponent, | |||
51 | 51 | ||
52 | setAttribute: { | 52 | setAttribute: { |
53 | value: function(el, att, value) { | 53 | value: function(el, att, value) { |
54 | if(att === "id") { | ||
55 | if(value === "") { | ||
56 | el.setAttribute(att, value); | ||
57 | return; | ||
58 | } | ||
59 | |||
60 | // Then check if this is a valid id by the following spec: http://www.w3.org/TR/REC-html40/types.html#h-6.2 | ||
61 | var regexID = /^([a-zA-Z])+([a-zA-Z0-9_\.\:\-])+/; | ||
62 | if(!regexID.test(value)) { | ||
63 | alert("Invalid ID"); | ||
64 | return; | ||
65 | } else if (this.application.ninja.currentDocument._document.getElementById(value) !== null) { | ||
66 | alert("The following ID: " + value + " is already in Use"); | ||
67 | } | ||
68 | |||
69 | } | ||
70 | |||
71 | el.setAttribute(att, value); | 54 | el.setAttribute(att, value); |
72 | } | 55 | } |
73 | }, | 56 | }, |