This repository has been archived by the owner on Jan 27, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 41
/
Copy pathrouter.js
65 lines (52 loc) · 1.59 KB
/
router.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/*globals ga*/
// ensure we don't share routes between all Router instances
var Router = Ember.Router.extend({
location: 'hash'
});
Router.map(function() {
this.route('login');
this.route('password-reset');
this.route('create-user');
this.route('confirm-email');
this.route('resend-email');
this.route('start');
this.route('theme');
this.route('wordpress');
this.route('reindex');
this.route('import');
this.route('expired');
this.route('form', { path: '/form/:id' });
this.resource('wh', function () {
this.resource('wh.settings', { path: '/settings/' }, function () {
this.route('billing');
this.route('data');
this.route('domain');
this.route('general');
this.route('team');
this.route('password-change');
this.route('urls');
});
this.route('search-global-results');
this.resource('wh.content', { path: '/content/' }, function () {
this.route('all-types');
this.route('start');
this.resource('wh.content.type', { path: '/:type_id' }, function () {
this.route('index', { path: '/' });
this.route('edit', { path: '/:item_id' });
this.route('json', { path: '/:item_id/json' });
this.route('new');
});
});
});
this.route('component-test');
this.route('helper-test');
});
Router.reopen({
notifyAnalytics: function() {
var dim1 = Ember.$('meta[name="siteName"]').attr('content');
Ember.Logger.log('Sending pageview to analytics.', dim1);
ga('set', 'dimension1', dim1);
ga('send', 'pageview');
}.on('didTransition')
});
export default Router;