REFACTOR: Fixes poor class hierarchy for listing topics

- Upgrades Ember to latest
- Fixes a bunch of bugs with page titles and missing "active" states
This commit is contained in:
Robin Ward
2014-01-14 12:48:57 -05:00
committed by Régis Hanol
parent 86214989f5
commit 4981525047
178 changed files with 8441 additions and 4573 deletions

View File

@@ -0,0 +1 @@
PreloadStore.store("currentUser", {"id":42,"username":"eviltrout","avatar_template":"//www.gravatar.com/avatar/c6e17f2ae2a215e87ff9e878a4e63cd9.png?s={size}&r=pg&d=identicon","name":"Evil Trout","unread_notifications":0,"unread_private_messages":0,"admin":false,"notification_channel_position":null,"site_flagged_posts_count":0,"moderator":false,"staff":false,"reply_count":0,"topic_count":0,"enable_quoting":true,"external_links_in_new_tab":false,"dynamic_favicon":false,"trust_level":0,"can_edit":true});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,4 +1,4 @@
integration("List Topics");
integration("Discover Topics");
test("Default List", function() {
expect(2);

View File

@@ -16,14 +16,14 @@ test("isInternal with a HTTPS url", function() {
});
test("navigatedToHome", function() {
var fakeListController = { refresh: function() { return true; } };
var fakeListController = { send: function() { return true; } };
var mock = sinon.mock(fakeListController);
this.stub(Discourse.URL, "controllerFor").returns(fakeListController);
mock.expects("refresh").twice();
mock.expects("send").withArgs('refresh').twice();
ok(Discourse.URL.navigatedToHome("/", "/"));
var defaultFilter = "/" + Discourse.ListController.FILTERS[0];
var defaultFilter = "/" + Discourse.Site.currentProp('filters')[0];
ok(Discourse.URL.navigatedToHome(defaultFilter, "/"));
ok(!Discourse.URL.navigatedToHome("/old", "/new"));

View File

@@ -78,6 +78,7 @@ Discourse.rootElement = '#ember-testing';
Discourse.setupForTesting();
Discourse.injectTestHelpers();
Discourse.runInitializers();
Discourse.start();
Discourse.Router.map(function() {
Discourse.routeBuilder.call(this);