mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-18 21:34:28 -04:00
UI dependency graph cleanup
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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 });
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user