UI dependency graph cleanup

This commit is contained in:
kayone
2013-10-08 18:43:41 -07:00
parent 86ea33b638
commit 4948d0608b
87 changed files with 1119 additions and 735 deletions
+8 -14
View File
@@ -1,22 +1,18 @@
'use strict';
define(
[
'app',
'marionette',
'backbone',
'backgrid',
'History/Table/HistoryTableLayout',
'History/Queue/QueueLayout'
], function (App,
Marionette,
Backgrid,
HistoryTableLayout,
QueueLayout) {
], function (Marionette, Backbone, Backgrid, HistoryTableLayout, QueueLayout) {
return Marionette.Layout.extend({
template: 'History/HistoryLayoutTemplate',
regions: {
history: '#history',
queueRegion : '#queue'
history : '#history',
queueRegion: '#queue'
},
ui: {
@@ -25,8 +21,8 @@ define(
},
events: {
'click .x-history-tab' : '_showHistory',
'click .x-queue-tab' : '_showQueue'
'click .x-history-tab': '_showHistory',
'click .x-queue-tab' : '_showQueue'
},
initialize: function (options) {
@@ -45,10 +41,8 @@ define(
}
},
_navigate:function(route){
require(['Router'], function(){
App.Router.navigate(route);
});
_navigate: function (route) {
Backbone.history.navigate(route);
},
_showHistory: function (e) {
+3 -3
View File
@@ -2,9 +2,9 @@
define(
[
'app',
'vent',
'Cells/NzbDroneCell'
], function (App, NzbDroneCell) {
], function (vent, NzbDroneCell) {
return NzbDroneCell.extend({
className: 'history-details-cell',
@@ -21,7 +21,7 @@ define(
},
_showDetails: function () {
App.vent.trigger(App.Commands.ShowHistoryDetails, { history: this.model });
vent.trigger(vent.Commands.ShowHistoryDetails, { history: this.model });
}
});
});