aboutsummaryrefslogtreecommitdiff
path: root/js/panels
diff options
context:
space:
mode:
Diffstat (limited to 'js/panels')
-rwxr-xr-xjs/panels/Panel.reel/Panel.html2
-rwxr-xr-xjs/panels/color/colorpopup-manager.js56
-rwxr-xr-xjs/panels/components-panel.reel/components-panel.js5
-rw-r--r--js/panels/css-panel/css-style.reel/css-style.html2
-rw-r--r--js/panels/css-panel/rule-components/css-style-rule.reel/css-style-rule.html2
-rw-r--r--js/panels/css-panel/style-sheet.reel/style-sheet.html6
-rwxr-xr-xjs/panels/properties.reel/properties.html6
-rwxr-xr-xjs/panels/properties.reel/sections/three-d-view.reel/three-d-view.html2
8 files changed, 28 insertions, 53 deletions
diff --git a/js/panels/Panel.reel/Panel.html b/js/panels/Panel.reel/Panel.html
index 5937b58f..80fd1a13 100755
--- a/js/panels/Panel.reel/Panel.html
+++ b/js/panels/Panel.reel/Panel.html
@@ -6,6 +6,8 @@
6 </copyright> --> 6 </copyright> -->
7<html lang="en"> 7<html lang="en">
8<head> 8<head>
9 <meta http-equiv="content-type" content="text/html; charset=utf-8" />
10
9 <script type="text/montage-serialization"> 11 <script type="text/montage-serialization">
10 { 12 {
11 "Resizer": { 13 "Resizer": {
diff --git a/js/panels/color/colorpopup-manager.js b/js/panels/color/colorpopup-manager.js
index 529ec1c8..4667f2b4 100755
--- a/js/panels/color/colorpopup-manager.js
+++ b/js/panels/color/colorpopup-manager.js
@@ -29,49 +29,27 @@ exports.ColorPopupManager = Montage.create(Component, {
29 enumerable: false, 29 enumerable: false,
30 value: function () { 30 value: function () {
31 //////////////////////////////////////////////////////////// 31 ////////////////////////////////////////////////////////////
32 //TODO: Improve logic on handling closing the popup 32 //Closing popups on resize
33 ////////////////////////////////////////////////////////////
34 //Hiding popup on any panel(s) actions
35 this.eventManager.addEventListener("panelOrderChanged", function (e) {
36 this.application.ninja.colorController.colorPopupManager.hideColorPopup();
37 }.bind(this));
38 //
39 this.eventManager.addEventListener("panelClose", function (e) {
40 this.application.ninja.colorController.colorPopupManager.hideColorPopup();
41 }.bind(this));
42 //
43 this.eventManager.addEventListener("panelCollapsed", function (e) {
44 this.application.ninja.colorController.colorPopupManager.hideColorPopup();
45 }.bind(this));
46 //
47 this.eventManager.addEventListener("panelSelected", function (e) {
48 this.application.ninja.colorController.colorPopupManager.hideColorPopup();
49 }.bind(this));
50 //
51 this.eventManager.addEventListener("togglePanel", function (e) {
52 this.application.ninja.colorController.colorPopupManager.hideColorPopup();
53 }.bind(this));
54 //
55 this.eventManager.addEventListener("panelResizing", function (e) {
56 this.application.ninja.colorController.colorPopupManager.hideColorPopup();
57 }.bind(this));
58 //
59 this.eventManager.addEventListener("panelResizedStart", function (e) {
60 this.application.ninja.colorController.colorPopupManager.hideColorPopup();
61 }.bind(this));
62 //
63 this.eventManager.addEventListener("panelResizedEnd", function (e) {
64 this.application.ninja.colorController.colorPopupManager.hideColorPopup();
65 }.bind(this));
66 //
67 window.addEventListener('resize', function (e) { 33 window.addEventListener('resize', function (e) {
68 this.application.ninja.colorController.colorPopupManager.hideColorPopup(); 34 this.application.ninja.colorController.colorPopupManager.hideColorPopup();
69 }.bind(this)); 35 }.bind(this));
70 // 36 //Storing limits of popup
37 var top, bottom, left, right;
38 //Closing popups if outside limits
71 document.addEventListener('mousedown', function (e) { 39 document.addEventListener('mousedown', function (e) {
72 // 40 //Checking for popup to be opened otherwise nothing happens
73 if (e._event.srcElement.getAttribute('data-montage-id') === 'stageCanvas' || e._event.srcElement.id === 'mainContainer' || e._event.srcElement.getAttribute('data-montage-id') === 'drawingCanvas') { 41 if (this._popupPanel.opened && this._popupPanel.popup && this._popupPanel.popup.element && !e._event.srcElement.inputType) {
74 this.application.ninja.colorController.colorPopupManager.hideColorPopup(); 42 //Getting horizontal limits
43 left = parseInt(this._popupPanel.popup.element.style.left) + parseInt(this._popupPanel.popup.element.style.marginLeft);
44 right = left + parseInt(this._popupPanel.popup.element.offsetWidth);
45 //Getting vertical limits
46 top = parseInt(this._popupPanel.popup.element.style.top) + parseInt(this._popupPanel.popup.element.style.marginTop);
47 bottom = left + parseInt(this._popupPanel.popup.element.offsetHeight);
48 //Checking click position in relation to limits
49 if ((e._event.clientX < left || e._event.clientX > right) || (e._event.clientY < top || e._event.clientY > bottom)) {
50 //Hides popups since click is outside limits
51 this.application.ninja.colorController.colorPopupManager.hideColorPopup();
52 }
75 } 53 }
76 }.bind(this)); 54 }.bind(this));
77 //////////////////////////////////////////////////////////// 55 ////////////////////////////////////////////////////////////
diff --git a/js/panels/components-panel.reel/components-panel.js b/js/panels/components-panel.reel/components-panel.js
index e6b7a6e3..46f91410 100755
--- a/js/panels/components-panel.reel/components-panel.js
+++ b/js/panels/components-panel.reel/components-panel.js
@@ -98,11 +98,6 @@ exports.ComponentsPanel = Montage.create(Component, {
98 "text": "Textfield", 98 "text": "Textfield",
99 "dataFile" : "node_modules/components-data/textfield.json", 99 "dataFile" : "node_modules/components-data/textfield.json",
100 "component": "textfield" 100 "component": "textfield"
101 },
102 {
103 "text": "Toggle Button",
104 "dataFile" : "node_modules/components-data/toggle-button.json",
105 "component": "toggleButton"
106 } 101 }
107 ] 102 ]
108 } 103 }
diff --git a/js/panels/css-panel/css-style.reel/css-style.html b/js/panels/css-panel/css-style.reel/css-style.html
index 0f16b3d8..4e670cdc 100644
--- a/js/panels/css-panel/css-style.reel/css-style.html
+++ b/js/panels/css-panel/css-style.reel/css-style.html
@@ -24,7 +24,7 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot
24 "object": "js/panels/CSSPanel/css-property-name-list" 24 "object": "js/panels/CSSPanel/css-property-name-list"
25 }, 25 },
26 "checkbox": { 26 "checkbox": {
27 "prototype": "montage/ui/checkbox.reel", 27 "prototype": "montage/ui/native/input-checkbox.reel",
28 "properties": { 28 "properties": {
29 "element": {"#": "disable-checkbox"}, 29 "element": {"#": "disable-checkbox"},
30 "checked": true 30 "checked": true
diff --git a/js/panels/css-panel/rule-components/css-style-rule.reel/css-style-rule.html b/js/panels/css-panel/rule-components/css-style-rule.reel/css-style-rule.html
index 8b0c3101..99021917 100644
--- a/js/panels/css-panel/rule-components/css-style-rule.reel/css-style-rule.html
+++ b/js/panels/css-panel/rule-components/css-style-rule.reel/css-style-rule.html
@@ -49,7 +49,7 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot
49 } 49 }
50 }, 50 },
51 "sheetLink": { 51 "sheetLink": {
52 "prototype": "montage/ui/anchor.reel", 52 "prototype": "montage/ui/native/anchor.reel",
53 "properties": { 53 "properties": {
54 "element": {"#": "style-sheet-name"} 54 "element": {"#": "style-sheet-name"}
55 } 55 }
diff --git a/js/panels/css-panel/style-sheet.reel/style-sheet.html b/js/panels/css-panel/style-sheet.reel/style-sheet.html
index d08453fa..4f17c0fb 100644
--- a/js/panels/css-panel/style-sheet.reel/style-sheet.html
+++ b/js/panels/css-panel/style-sheet.reel/style-sheet.html
@@ -40,7 +40,7 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot
40 } 40 }
41 }, 41 },
42 "editButton": { 42 "editButton": {
43 "prototype": "montage/ui/button.reel", 43 "prototype": "montage/ui/native/button.reel",
44 "properties": { 44 "properties": {
45 "element": {"#": "edit-button"}, 45 "element": {"#": "edit-button"},
46 "identifier": "editButton", 46 "identifier": "editButton",
@@ -53,7 +53,7 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot
53 53
54 }, 54 },
55 "disableButton": { 55 "disableButton": {
56 "prototype": "montage/ui/button.reel", 56 "prototype": "montage/ui/native/button.reel",
57 "properties": { 57 "properties": {
58 "element": {"#": "disable-button"}, 58 "element": {"#": "disable-button"},
59 "identifier": "disableButton", 59 "identifier": "disableButton",
@@ -66,7 +66,7 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot
66 66
67 }, 67 },
68 "deleteButton": { 68 "deleteButton": {
69 "prototype": "montage/ui/button.reel", 69 "prototype": "montage/ui/native/button.reel",
70 "properties": { 70 "properties": {
71 "element": {"#": "delete-button"}, 71 "element": {"#": "delete-button"},
72 "identifier": "deleteButton", 72 "identifier": "deleteButton",
diff --git a/js/panels/properties.reel/properties.html b/js/panels/properties.reel/properties.html
index a737bd39..72984c17 100755
--- a/js/panels/properties.reel/properties.html
+++ b/js/panels/properties.reel/properties.html
@@ -11,21 +11,21 @@
11 <script type="text/montage-serialization"> 11 <script type="text/montage-serialization">
12 { 12 {
13 "elementName": { 13 "elementName": {
14 "prototype": "montage/ui/textfield.reel", 14 "prototype": "montage/ui/native/input-text.reel",
15 "properties": { 15 "properties": {
16 "element": {"#": "elementName"} 16 "element": {"#": "elementName"}
17 } 17 }
18 }, 18 },
19 19
20 "elementId": { 20 "elementId": {
21 "prototype": "montage/ui/textfield.reel", 21 "prototype": "montage/ui/native/input-text.reel",
22 "properties": { 22 "properties": {
23 "element": {"#": "elementId"} 23 "element": {"#": "elementId"}
24 } 24 }
25 }, 25 },
26 26
27 "elementClass": { 27 "elementClass": {
28 "prototype": "montage/ui/textfield.reel", 28 "prototype": "montage/ui/native/input-text.reel",
29 "properties": { 29 "properties": {
30 "element": {"#": "elementClass"} 30 "element": {"#": "elementClass"}
31 } 31 }