almost all js files are loaded using require.js

This commit is contained in:
Keivan Beigi 2013-06-14 16:18:37 -07:00
commit 2407e33ea2
35 changed files with 570 additions and 717 deletions

View file

@ -1,6 +1,6 @@
"use strict";
define(['app', 'History/Model'], function () {
NzbDrone.History.Collection = Backbone.PageableCollection.extend({
define(['app', 'History/Model', 'backbone.pageable'], function (App, HistoryModel, PageableCollection) {
NzbDrone.History.Collection = PageableCollection.extend({
url : NzbDrone.Constants.ApiRoot + '/history',
model : NzbDrone.History.Model,
@ -34,4 +34,4 @@ define(['app', 'History/Model'], function () {
return resp;
}
});
});
});

View file

@ -1,9 +1,14 @@
NzbDrone.Missing.Row = Backgrid.Row.extend({
events: {
'click .x-search' : 'search'
},
"use strict";
define(['app','backgrid'], function () {
NzbDrone.Missing.Row = Backgrid.Row.extend({
events: {
'click .x-search': 'search'
},
search: function () {
window.alert('Episode Search');
}
});
search: function () {
window.alert('Episode Search');
}
});
return NzbDrone.Missing.Row;
});