Merge lp:~hatch/juju-gui/bundle-tabs-1240973 into lp:juju-gui/experimental
Proposed by
Jeff Pihach
Status: | Merged |
---|---|
Merged at revision: | 1141 |
Proposed branch: | lp:~hatch/juju-gui/bundle-tabs-1240973 |
Merge into: | lp:juju-gui/experimental |
Diff against target: |
133 lines (+49/-20) 4 files modified
app/subapps/browser/views/bundle.js (+1/-0) app/subapps/browser/views/charm.js (+1/-9) app/subapps/browser/views/entity-base.js (+16/-0) test/test_bundle_details_view.js (+31/-11) |
To merge this branch: | bzr merge lp:~hatch/juju-gui/bundle-tabs-1240973 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Juju GUI Hackers | Pending | ||
Review via email:
|
Description of the change
Bundle tabview now reacts to the url hash
To post a comment you must log in.
Reviewers: mp+191680_ code.launchpad. net,
Message:
Please take a look.
Description:
Bundle tabview now reacts to the url hash
https:/ /code.launchpad .net/~hatch/ juju-gui/ bundle- tabs-1240973/ +merge/ 191680
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/14702045/
Affected files (+51, -20 lines): browser/ views/bundle. js browser/ views/charm. js browser/ views/entity- base.js bundle_ details_ view.js
A [revision details]
M app/subapps/
M app/subapps/
M app/subapps/
M test/test_
Index: [revision details]
=== added file '[revision details]'
--- [revision details] 2012-01-01 00:00:00 +0000
+++ [revision details] 2012-01-01 00:00:00 +0000
@@ -0,0 +1,2 @@
+Old revision: <email address hidden>
+New revision: <email address hidden>
Index: test/test_ bundle_ details_ view.js bundle_ details_ view.js' bundle_ details_ view.js 2013-10-17 14:11:43 +0000 bundle_ details_ view.js 2013-10-17 16:55:19 +0000
=== modified file 'test/test_
--- test/test_
+++ test/test_
@@ -51,24 +51,31 @@
});
beforeEach( function( ) { iew(); lFakebackend = function() { ackend( ); function( ) { remove( ).destroy( true); iew(options) { iner(); .append( '<div class=" bws-view- data">< /div>') ; browser. views.BrowserBu ndleView( { lFakebackend = function() { ackend( ); function( ) { remove( ).destroy( true); browser. views.BrowserBu ndleView( bundleView) ;
+ view = generateBundleV
+ view._setupLoca
+ this.fakebackend = utils.makeFakeB
+ };
+ });
+
+ afterEach(
+ container.
+ view.destroy();
+ });
+
+ function generateBundleV
data = Y.clone(origData);
container = utils.makeConta
container
- view = new Y.juju.
+ var defaults = {
store: modifyFakeStore(),
db: {},
entityId: data.id,
renderTo: container
- });
- view._setupLoca
- this.fakebackend = utils.makeFakeB
};
- });
-
- afterEach(
- container.
- view.destroy();
- });
+ var bundleView = Y.mix(defaults, options, true);
+ view = new Y.juju.
+ return view;
+ }
function modifyFakeStore (options) { render( );
var defaults = {
@@ -297,6 +304,19 @@
view.
});
- iew({ function( resolve) { resolve(); }); 'renderedChange ', function(e) { 'container' ).one(' .yui3-tab- selected a'); equal(selected. getAttribute( 'href') , '#bws-charms');
+ it('selects the proper tab when given one', function(done) {
+ view = generateBundleV
+ activeTab: '#bws-charms'
+ });
+ view._parseData = function() {
+ return new Y.Promise(
+ };
+ view.render();
+ view.after(
+ var selected = view.get(
+ assert.
+ done();
+ });
+ });
});
Index: app/subapps/ browser/ views/bundle. js browser/ views/bundle. js' browser/ views/bundle. js 2013-10-17 14:11:43 +0000 browser/ views/bundle. js 2013-10-17 16:55:19 +0000
this. tabview. selectChild( 2);
this._ dispatchTabEven ts(this. tabview) ; eTab();
this._ renderCharmList ing();
=== modified file 'app/subapps/
--- app/subapps/
+++ app/subapps/
@@ -204,6 +204,7 @@
}
+ this._showActiv
Index: app/subapps/brow...