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
=== modified file 'app/subapps/browser/views/charm.js'
--- app/subapps/browser/views/charm.js 2013-07-19 20:22:52 +0000
+++ app/subapps/browser/views/charm.js 2013-07-22 18:05:38 +0000
@@ -79,6 +79,7 @@
79 *79 *
80 */80 */
81 _addCharmEnvironment: function(ev) {81 _addCharmEnvironment: function(ev) {
82 debugger;
82 ev.halt();83 ev.halt();
83 var charm,84 var charm,
84 browserCharm = this.get('charm'),85 browserCharm = this.get('charm'),
@@ -266,6 +267,7 @@
266267
267 */268 */
268 _handleBack: function(ev) {269 _handleBack: function(ev) {
270 debugger;
269 ev.halt();271 ev.halt();
270 this.fire('viewNavigate', {272 this.fire('viewNavigate', {
271 change: {273 change: {
@@ -282,6 +284,7 @@
282284
283 */285 */
284 _handleCharmSelection: function(ev) {286 _handleCharmSelection: function(ev) {
287 debugger;
285 ev.halt();288 ev.halt();
286 var charm = ev.currentTarget;289 var charm = ev.currentTarget;
287 var charmID = charm.getData('charmid');290 var charmID = charm.getData('charmid');
@@ -530,6 +533,7 @@
530 @param {Y.EventFacade} e The click event.533 @param {Y.EventFacade} e The click event.
531 */534 */
532 _openShareLink: function(e) {535 _openShareLink: function(e) {
536 debugger;
533 e.halt();537 e.halt();
534 var shareLink = e.currentTarget.get('href');538 var shareLink = e.currentTarget.get('href');
535 window.open(shareLink, 'share_window');539 window.open(shareLink, 'share_window');
@@ -544,6 +548,7 @@
544 *548 *
545 */549 */
546 _toggleLog: function(ev) {550 _toggleLog: function(ev) {
551 debugger;
547 ev.halt();552 ev.halt();
548 var container = this.get('container'),553 var container = this.get('container'),
549 target = ev.currentTarget,554 target = ev.currentTarget,
550555
=== modified file 'app/views/viewlet-manager.js'
--- app/views/viewlet-manager.js 2013-07-22 14:04:31 +0000
+++ app/views/viewlet-manager.js 2013-07-22 18:05:38 +0000
@@ -139,6 +139,14 @@
139 conflict: function(node) {},139 conflict: function(node) {},
140140
141 /**141 /**
142 A destroy callback for removing a viewlet.
143
144 @method destroy
145
146 */
147 destroy: function() {},
148
149 /**
142 Called by the databinding engine when fields drop out of sync with150 Called by the databinding engine when fields drop out of sync with
143 the supplied model.151 the supplied model.
144152
@@ -286,8 +294,13 @@
286 },294 },
287295
288 /**296 /**
297<<<<<<< TREE
289 Renders the viewlets into the viewlet manager. Viewlets with a logical298 Renders the viewlets into the viewlet manager. Viewlets with a logical
290 slot name defined are not rendered by default and require that showViewlet299 slot name defined are not rendered by default and require that showViewlet
300=======
301 Renders the viewlets into the view container. Viewlets with a logical
302 slot name defined are not rendered by default and require that showViewlet
303>>>>>>> MERGE-SOURCE
291 be called for them to render. Slots are typically filled through event304 be called for them to render. Slots are typically filled through event
292 callback interactions (for example in a click handler).305 callback interactions (for example in a click handler).
293306
@@ -421,6 +434,8 @@
421 hideSlot: function(e) {434 hideSlot: function(e) {
422 var existing = this._slots[e.currentTarget.getData('slot')];435 var existing = this._slots[e.currentTarget.getData('slot')];
423 if (existing) {436 if (existing) {
437 // Run a destroy on the viewlet.
438 existing.destroy();
424 // unbind the databinding439 // unbind the databinding
425 existing.remove();440 existing.remove();
426 // remove the element from the DOM441 // remove the element from the DOM
@@ -543,6 +558,12 @@
543 @method destructor558 @method destructor
544 */559 */
545 destructor: function() {560 destructor: function() {
561 Y.Object.each(this.viewlets, function(viewlet, name) {
562 if (!viewlet.slot) {
563 viewlet.destroy();
564 }
565 });
566
546 this._events.forEach(function(event) {567 this._events.forEach(function(event) {
547 event.detach();568 event.detach();
548 });569 });
549570
=== modified file 'app/views/viewlets/charm-details.js'
--- app/views/viewlets/charm-details.js 2013-07-22 15:06:11 +0000
+++ app/views/viewlets/charm-details.js 2013-07-22 18:05:38 +0000
@@ -29,6 +29,10 @@
29 name: 'charmDetails',29 name: 'charmDetails',
30 slot: 'left-hand-panel',30 slot: 'left-hand-panel',
31 templateWrapper: templates['left-breakout-panel'],31 templateWrapper: templates['left-breakout-panel'],
32 destroy: function() {
33 Y.one('.left-breakout').removeClass('with-charm');
34 this.charmView.destroy();
35 },
32 /**36 /**
33 Render the viewlet.37 Render the viewlet.
3438
@@ -40,23 +44,30 @@
40 render: function(charm, viewletManagerAttrs) {44 render: function(charm, viewletManagerAttrs) {
41 var store = viewletManagerAttrs.store;45 var store = viewletManagerAttrs.store;
42 store.charm(charm.get('storeId'), {46 store.charm(charm.get('storeId'), {
47<<<<<<< TREE
43 'success': function(data, storeCharm) {48 'success': function(data, storeCharm) {
44 var charmView = new browserViews.BrowserCharmView({49 var charmView = new browserViews.BrowserCharmView({
50=======
51 'success': function(data) {
52 var storeCharm = new models.BrowserCharm(data.charm);
53 Y.one('.left-breakout').addClass('with-charm');
54 this.charmView = new browserViews.BrowserCharmView({
55>>>>>>> MERGE-SOURCE
45 charm: storeCharm,56 charm: storeCharm,
46 forInspector: true,57 forInspector: true,
47 renderTo: this.container.one('.content'),58 renderTo: this.container.one('.content'),
48 store: store59 store: store
49 });60 });
50 charmView.render();61 this.charmView.render();
51 },62 },
52 'failure': function(data) {63 'failure': function(data) {
53 var charmView = new browserViews.BrowserCharmView({64 this.charmView = new browserViews.BrowserCharmView({
54 charm: charm,65 charm: charm,
55 forInspector: true,66 forInspector: true,
56 renderTo: this.container.one('.content'),67 renderTo: this.container.one('.content'),
57 store: store68 store: store
58 });69 });
59 charmView.render();70 this.charmView.render();
60 }71 }
61 }, this, viewletManagerAttrs.db.browserCharms);72 }, this, viewletManagerAttrs.db.browserCharms);
62 return this.templateWrapper({ initial: 'Loading...'});73 return this.templateWrapper({ initial: 'Loading...'});
6374
=== modified file 'lib/views/browser/charm-full.less'
--- lib/views/browser/charm-full.less 2013-07-18 20:08:23 +0000
+++ lib/views/browser/charm-full.less 2013-07-22 18:05:38 +0000
@@ -1,4 +1,5 @@
1#subapp-browser .charm {1#subapp-browser .charm,
2.charm {
2 display: table;3 display: table;
3 width: 100%;4 width: 100%;
45
@@ -107,7 +108,7 @@
107 bottom: 30px;108 bottom: 30px;
108 right: 30px;109 right: 30px;
109110
110 .add {111 a.add {
111 // Using a variable here because LESS strips commas in mixin args.112 // Using a variable here because LESS strips commas in mixin args.
112 @box-shadow: inset 0 2px 2px rgba(0, 0, 0, 0.3);113 @box-shadow: inset 0 2px 2px rgba(0, 0, 0, 0.3);
113 .create-box-shadow(@box-shadow);114 .create-box-shadow(@box-shadow);
@@ -299,7 +300,7 @@
299 padding: 17px 70px 16px 16px;300 padding: 17px 70px 16px 16px;
300301
301 a {302 a {
302 padding-right: 5px; 303 padding-right: 5px;
303 }304 }
304 }305 }
305}306}
@@ -335,7 +336,8 @@
335 padding: 0 20px 20px 20px;336 padding: 0 20px 20px 20px;
336 border-bottom: 1px solid @bws-border;337 border-bottom: 1px solid @bws-border;
337338
338 .add {339 a.add {
340 color: #fff;
339 display: inline-block;341 display: inline-block;
340 }342 }
341 }343 }
@@ -351,7 +353,7 @@
351 }353 }
352 span {354 span {
353 color: @bws-text;355 color: @bws-text;
354 text-decoration: underline; 356 text-decoration: underline;
355 }357 }
356 }358 }
357 }359 }
@@ -390,3 +392,7 @@
390 padding-top: 30px;392 padding-top: 30px;
391 }393 }
392}394}
395
396.yui3-juju-inspector .left-breakout.with-charm {
397 width: 750px;
398}
393399
=== modified file 'lib/views/juju-inspector.less'
--- lib/views/juju-inspector.less 2013-07-22 13:36:45 +0000
+++ lib/views/juju-inspector.less 2013-07-22 18:05:38 +0000
@@ -109,6 +109,7 @@
109 line-height: 18px;109 line-height: 18px;
110 cursor: pointer;110 cursor: pointer;
111 color: @inspector-background-color;111 color: @inspector-background-color;
112 z-index: 10;
112 }113 }
113114
114 .header-slot {115 .header-slot {

Subscribers

People subscribed via source and target branches