Merge lp:~rharding/juju-gui/inspector-details-css into lp:juju-gui/experimental

Proposed by Richard Harding on 2013-07-22
Status: Work in progress
Proposed branch: lp:~rharding/juju-gui/inspector-details-css
Merge into: lp:juju-gui/experimental
Diff against target: 215 lines (+52/-8) (has conflicts)
5 files modified
app/subapps/browser/views/charm.js (+5/-0)
app/views/viewlet-manager.js (+21/-0)
app/views/viewlets/charm-details.js (+14/-3)
lib/views/browser/charm-full.less (+11/-5)
lib/views/juju-inspector.less (+1/-0)
Text conflict in app/views/viewlet-manager.js
Text conflict in app/views/viewlets/charm-details.js
To merge this branch: bzr merge lp:~rharding/juju-gui/inspector-details-css
Reviewer Review Type Date Requested Status
Juju GUI Hackers 2013-07-22 Pending
Review via email: mp+176259@code.launchpad.net

Description of the change

TBD

To post a comment you must log in.

Unmerged revisions

863. By Richard Harding on 2013-07-18

Update the close to stay on top of content in the left-breakout

862. By Richard Harding on 2013-07-18

Working on getting destory into the picture

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'app/subapps/browser/views/charm.js'
2--- app/subapps/browser/views/charm.js 2013-07-19 20:22:52 +0000
3+++ app/subapps/browser/views/charm.js 2013-07-22 18:05:38 +0000
4@@ -79,6 +79,7 @@
5 *
6 */
7 _addCharmEnvironment: function(ev) {
8+ debugger;
9 ev.halt();
10 var charm,
11 browserCharm = this.get('charm'),
12@@ -266,6 +267,7 @@
13
14 */
15 _handleBack: function(ev) {
16+ debugger;
17 ev.halt();
18 this.fire('viewNavigate', {
19 change: {
20@@ -282,6 +284,7 @@
21
22 */
23 _handleCharmSelection: function(ev) {
24+ debugger;
25 ev.halt();
26 var charm = ev.currentTarget;
27 var charmID = charm.getData('charmid');
28@@ -530,6 +533,7 @@
29 @param {Y.EventFacade} e The click event.
30 */
31 _openShareLink: function(e) {
32+ debugger;
33 e.halt();
34 var shareLink = e.currentTarget.get('href');
35 window.open(shareLink, 'share_window');
36@@ -544,6 +548,7 @@
37 *
38 */
39 _toggleLog: function(ev) {
40+ debugger;
41 ev.halt();
42 var container = this.get('container'),
43 target = ev.currentTarget,
44
45=== modified file 'app/views/viewlet-manager.js'
46--- app/views/viewlet-manager.js 2013-07-22 14:04:31 +0000
47+++ app/views/viewlet-manager.js 2013-07-22 18:05:38 +0000
48@@ -139,6 +139,14 @@
49 conflict: function(node) {},
50
51 /**
52+ A destroy callback for removing a viewlet.
53+
54+ @method destroy
55+
56+ */
57+ destroy: function() {},
58+
59+ /**
60 Called by the databinding engine when fields drop out of sync with
61 the supplied model.
62
63@@ -286,8 +294,13 @@
64 },
65
66 /**
67+<<<<<<< TREE
68 Renders the viewlets into the viewlet manager. Viewlets with a logical
69 slot name defined are not rendered by default and require that showViewlet
70+=======
71+ Renders the viewlets into the view container. Viewlets with a logical
72+ slot name defined are not rendered by default and require that showViewlet
73+>>>>>>> MERGE-SOURCE
74 be called for them to render. Slots are typically filled through event
75 callback interactions (for example in a click handler).
76
77@@ -421,6 +434,8 @@
78 hideSlot: function(e) {
79 var existing = this._slots[e.currentTarget.getData('slot')];
80 if (existing) {
81+ // Run a destroy on the viewlet.
82+ existing.destroy();
83 // unbind the databinding
84 existing.remove();
85 // remove the element from the DOM
86@@ -543,6 +558,12 @@
87 @method destructor
88 */
89 destructor: function() {
90+ Y.Object.each(this.viewlets, function(viewlet, name) {
91+ if (!viewlet.slot) {
92+ viewlet.destroy();
93+ }
94+ });
95+
96 this._events.forEach(function(event) {
97 event.detach();
98 });
99
100=== modified file 'app/views/viewlets/charm-details.js'
101--- app/views/viewlets/charm-details.js 2013-07-22 15:06:11 +0000
102+++ app/views/viewlets/charm-details.js 2013-07-22 18:05:38 +0000
103@@ -29,6 +29,10 @@
104 name: 'charmDetails',
105 slot: 'left-hand-panel',
106 templateWrapper: templates['left-breakout-panel'],
107+ destroy: function() {
108+ Y.one('.left-breakout').removeClass('with-charm');
109+ this.charmView.destroy();
110+ },
111 /**
112 Render the viewlet.
113
114@@ -40,23 +44,30 @@
115 render: function(charm, viewletManagerAttrs) {
116 var store = viewletManagerAttrs.store;
117 store.charm(charm.get('storeId'), {
118+<<<<<<< TREE
119 'success': function(data, storeCharm) {
120 var charmView = new browserViews.BrowserCharmView({
121+=======
122+ 'success': function(data) {
123+ var storeCharm = new models.BrowserCharm(data.charm);
124+ Y.one('.left-breakout').addClass('with-charm');
125+ this.charmView = new browserViews.BrowserCharmView({
126+>>>>>>> MERGE-SOURCE
127 charm: storeCharm,
128 forInspector: true,
129 renderTo: this.container.one('.content'),
130 store: store
131 });
132- charmView.render();
133+ this.charmView.render();
134 },
135 'failure': function(data) {
136- var charmView = new browserViews.BrowserCharmView({
137+ this.charmView = new browserViews.BrowserCharmView({
138 charm: charm,
139 forInspector: true,
140 renderTo: this.container.one('.content'),
141 store: store
142 });
143- charmView.render();
144+ this.charmView.render();
145 }
146 }, this, viewletManagerAttrs.db.browserCharms);
147 return this.templateWrapper({ initial: 'Loading...'});
148
149=== modified file 'lib/views/browser/charm-full.less'
150--- lib/views/browser/charm-full.less 2013-07-18 20:08:23 +0000
151+++ lib/views/browser/charm-full.less 2013-07-22 18:05:38 +0000
152@@ -1,4 +1,5 @@
153-#subapp-browser .charm {
154+#subapp-browser .charm,
155+.charm {
156 display: table;
157 width: 100%;
158
159@@ -107,7 +108,7 @@
160 bottom: 30px;
161 right: 30px;
162
163- .add {
164+ a.add {
165 // Using a variable here because LESS strips commas in mixin args.
166 @box-shadow: inset 0 2px 2px rgba(0, 0, 0, 0.3);
167 .create-box-shadow(@box-shadow);
168@@ -299,7 +300,7 @@
169 padding: 17px 70px 16px 16px;
170
171 a {
172- padding-right: 5px;
173+ padding-right: 5px;
174 }
175 }
176 }
177@@ -335,7 +336,8 @@
178 padding: 0 20px 20px 20px;
179 border-bottom: 1px solid @bws-border;
180
181- .add {
182+ a.add {
183+ color: #fff;
184 display: inline-block;
185 }
186 }
187@@ -351,7 +353,7 @@
188 }
189 span {
190 color: @bws-text;
191- text-decoration: underline;
192+ text-decoration: underline;
193 }
194 }
195 }
196@@ -390,3 +392,7 @@
197 padding-top: 30px;
198 }
199 }
200+
201+.yui3-juju-inspector .left-breakout.with-charm {
202+ width: 750px;
203+}
204
205=== modified file 'lib/views/juju-inspector.less'
206--- lib/views/juju-inspector.less 2013-07-22 13:36:45 +0000
207+++ lib/views/juju-inspector.less 2013-07-22 18:05:38 +0000
208@@ -109,6 +109,7 @@
209 line-height: 18px;
210 cursor: pointer;
211 color: @inspector-background-color;
212+ z-index: 10;
213 }
214
215 .header-slot {

Subscribers

People subscribed via source and target branches