diff options
Diffstat (limited to 'js/panels')
34 files changed, 498 insertions, 251 deletions
diff --git a/js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.js b/js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.js index 0c950ffd..2a3fc068 100755 --- a/js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.js +++ b/js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.js | |||
@@ -520,9 +520,7 @@ var CSSPanel = exports.CSSPanelBase = (require("montage/core/core").Montage).cre | |||
520 | this.inComputedStyleMode = false; // No computed styles mode for multiple items | 520 | this.inComputedStyleMode = false; // No computed styles mode for multiple items |
521 | 521 | ||
522 | ///// if multiple items are selected, then show common rules | 522 | ///// if multiple items are selected, then show common rules |
523 | var elements = items.map(function(item) { | 523 | var elements = Array.prototype.slice.call(this.application.ninja.selectedElements, 0); |
524 | return item._element; | ||
525 | }); | ||
526 | 524 | ||
527 | ///// show toolbar, but hide computed style button | 525 | ///// show toolbar, but hide computed style button |
528 | this.sections.styles.toolbar.style.display = ''; | 526 | this.sections.styles.toolbar.style.display = ''; |
@@ -538,7 +536,7 @@ var CSSPanel = exports.CSSPanelBase = (require("montage/core/core").Montage).cre | |||
538 | this.sections.styles.statusMsg.classList.add('nj-css-panel-hide'); | 536 | this.sections.styles.statusMsg.classList.add('nj-css-panel-hide'); |
539 | this.sections.styles.showComputedEl.classList.remove('nj-css-panel-hide');// .style.display = ''; | 537 | this.sections.styles.showComputedEl.classList.remove('nj-css-panel-hide');// .style.display = ''; |
540 | this.sections.styles.toolbar.style.display = ''; | 538 | this.sections.styles.toolbar.style.display = ''; |
541 | this.showStylesForElement(items[0]._element, null); | 539 | this.showStylesForElement(items[0], null); |
542 | } else { | 540 | } else { |
543 | this.sections.styles.statusMsg.classList.add('nj-css-panel-hide'); | 541 | this.sections.styles.statusMsg.classList.add('nj-css-panel-hide'); |
544 | this._inMultiSelectMode = false; | 542 | this._inMultiSelectMode = false; |
@@ -1691,7 +1689,7 @@ NJCSSStyle.prototype.styleChange = function() { | |||
1691 | NJCSSStyle.prototype.getUnits = function(val) { | 1689 | NJCSSStyle.prototype.getUnits = function(val) { |
1692 | if(val.split(/\s/).length > 1) { | 1690 | if(val.split(/\s/).length > 1) { |
1693 | return false; | 1691 | return false; |
1694 | } else if(/px|em|pt|in|cm|mm|ex|pc|%/.test(val)) { | 1692 | } else if(/(px|em|pt|in|cm|mm|ex|pc|%)$/.test(val)) { |
1695 | return val.replace(/^.*(px|em|pt|in|cm|mm|ex|pc|%).*/, '$1'); | 1693 | return val.replace(/^.*(px|em|pt|in|cm|mm|ex|pc|%).*/, '$1'); |
1696 | } | 1694 | } |
1697 | return null; | 1695 | return null; |
@@ -1771,7 +1769,7 @@ NJCSSStyle.prototype.updateValue = function(newValue, bypassUndo) { | |||
1771 | this.styleChange(); | 1769 | this.styleChange(); |
1772 | return true; | 1770 | return true; |
1773 | } | 1771 | } |
1774 | 1772 | ||
1775 | var IMPORTANT_FLAG = ' !important', | 1773 | var IMPORTANT_FLAG = ' !important', |
1776 | dec = this.njRule.declaration, | 1774 | dec = this.njRule.declaration, |
1777 | acceptAsValid = false, | 1775 | acceptAsValid = false, |
diff --git a/js/panels/Components/ComponentsPanel.js b/js/panels/Components/ComponentsPanel.js deleted file mode 100755 index df1d74bb..00000000 --- a/js/panels/Components/ComponentsPanel.js +++ /dev/null | |||
@@ -1,47 +0,0 @@ | |||
1 | /* <copyright> | ||
2 | This file contains proprietary software owned by Motorola Mobility, Inc.<br/> | ||
3 | No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/> | ||
4 | (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. | ||
5 | </copyright> */ | ||
6 | |||
7 | var Montage = require("montage/core/core").Montage; | ||
8 | |||
9 | var PanelBase = require("js/panels/PanelBase").PanelBase; | ||
10 | var ComponentsPanelBase = require("js/panels/Components/ComponentsPanelBase.reel").ComponentsPanelBase; | ||
11 | |||
12 | exports.ComponentsPanel = Montage.create(PanelBase, { | ||
13 | id : {value : "componentsPanel", writable:true, enumerable:true, configurable:true}, | ||
14 | panelName : {value : "Components", writable:true, enumerable:true, configurable:true}, | ||
15 | panelHeaderID : {value : "componentsPanelHeader", writable:true, enumerable:true, configurable:true}, | ||
16 | disclosureIconID : {value : "componentsPanelDisclosureIcon", writable:true, enumerable:true, configurable:true}, | ||
17 | closeButtonID : {value : "componentsPanelCloseButton", writable:true, enumerable:true, configurable:true}, | ||
18 | panelContentID : {value : "componentsPanelContent", writable:true, enumerable:true, configurable:true}, | ||
19 | |||
20 | init : { | ||
21 | value : function() | ||
22 | { | ||
23 | this.contentHeight = 200; | ||
24 | this.minHeight = 100; | ||
25 | this.defaultHeight = 200; | ||
26 | |||
27 | /* OLD WAY -- Removing the temporary div | ||
28 | // TODO: Remove this comment once this is tested. | ||
29 | var panelContainer = document.createElement("div"); | ||
30 | this._componentsPanelBase = ComponentsPanelBase.create(); | ||
31 | this._componentsPanelBase.element = panelContainer; | ||
32 | |||
33 | this.content = this._componentsPanelBase; | ||
34 | this._componentsPanelBase.needsDraw = true; | ||
35 | */ | ||
36 | |||
37 | this.content = ComponentsPanelBase.create(); | ||
38 | } | ||
39 | }, | ||
40 | |||
41 | _componentsPanelBase:{ | ||
42 | enumerable: true, | ||
43 | value: null, | ||
44 | writable:true | ||
45 | } | ||
46 | |||
47 | }); \ No newline at end of file | ||
diff --git a/js/panels/Materials/materials-popup.reel/materials-popup.css b/js/panels/Materials/materials-popup.reel/materials-popup.css index 89233c64..2d339411 100755 --- a/js/panels/Materials/materials-popup.reel/materials-popup.css +++ b/js/panels/Materials/materials-popup.reel/materials-popup.css | |||
@@ -37,21 +37,53 @@ | |||
37 | .mp_property | 37 | .mp_property |
38 | { | 38 | { |
39 | height:40px; | 39 | height:40px; |
40 | position: relative; | ||
40 | } | 41 | } |
41 | 42 | ||
42 | .mp_property > .prop-label | 43 | .mp_property > .prop-label |
43 | { | 44 | { |
44 | float: left; | 45 | position:relative; |
45 | /*width:86px;*/ | 46 | top:12px; |
46 | margin: 0px 8px 2px 5px; | 47 | float: left; |
48 | width: 100px; | ||
47 | } | 49 | } |
48 | 50 | ||
49 | .mp_property > .prop-controller | 51 | .mp_property > .prop-controller |
50 | { | 52 | { |
51 | float: right; | 53 | position:relative; |
52 | clear: left; | 54 | top:12px; |
53 | width: auto; | 55 | left: 10px; |
54 | margin: 0px 0px 3px 0px; | 56 | float: left; |
57 | } | ||
58 | |||
59 | .mp_property .hottext, | ||
60 | .mp_property .hottextInput | ||
61 | { | ||
62 | width: 30px; | ||
63 | } | ||
64 | |||
65 | .mp_property .button | ||
66 | { | ||
67 | width: 30px; | ||
68 | height: 20px; | ||
69 | } | ||
70 | |||
71 | .mp_property .inputRow | ||
72 | { | ||
73 | top: 8px; | ||
74 | position: relative; | ||
75 | } | ||
76 | |||
77 | .mp_properties_list | ||
78 | { | ||
79 | padding-bottom: 8px; | ||
80 | } | ||
81 | |||
82 | .mp_properties_list > .mp_property > .colortoolbar | ||
83 | { | ||
84 | width: 27px !important; | ||
85 | height: 27px !important; | ||
86 | overflow:hidden !important; | ||
55 | } | 87 | } |