removed NzbDrone. namespace, everything is done using require.

This commit is contained in:
Keivan Beigi 2013-06-24 16:41:59 -07:00
commit b0bd3f34f1
121 changed files with 2570 additions and 2587 deletions

View file

@ -0,0 +1,11 @@
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h3>Delete: {{name}}</h3>
</div>
<div class="modal-body">
<p>Are you sure you want to delete '{{name}}'?</p>
</div>
<div class="modal-footer">
<button class="btn" data-dismiss="modal">cancel</button>
<button class="btn btn-danger x-confirm-delete">delete</button>
</div>

View file

@ -0,0 +1,24 @@
'use strict';
define(
[
'app',
'marionette'
], function (App, Marionette) {
return Marionette.ItemView.extend({
template: 'Quality/Profile/DeleteTemplate',
events: {
'click .x-confirm-delete': '_removeProfile'
},
_removeProfile: function () {
this.model.destroy({
wait: true
}).done(function () {
App.modalRegion.close();
});
}
});
});

View file

@ -1,35 +1,40 @@
'use strict';

'use strict';
define([
'app',
'marionette',
'Settings/Quality/Profile/EditQualityProfileView',
'Mixins/AsModelBoundView'
], function (App, Marionette, EditProfileView, AsModelBoundView) {
define(
[
'app',
'marionette',
'Settings/Quality/Profile/EditQualityProfileView',
'Settings/Quality/Profile/DeleteView',
'Mixins/AsModelBoundView'
var view = Marionette.ItemView.extend({
template: 'Settings/Quality/Profile/QualityProfileTemplate',
tagName : 'tr',
], function (App, Marionette, EditProfileView, DeleteProfileView, AsModelBoundView) {
ui: {
'progressbar': '.progress .bar'
},
var view = Marionette.ItemView.extend({
template: 'Settings/Quality/Profile/QualityProfileTemplate',
tagName : 'tr',
events: {
'click .x-edit' : 'edit',
'click .x-remove': 'removeQuality'
},
ui: {
'progressbar': '.progress .bar'
},
edit: function () {
var view = new EditProfileView({ model: this.model});
App.modalRegion.show(view);
},
events: {
'click .x-edit' : 'edit',
'click .x-remove': 'removeQuality'
},
removeQuality: function () {
var view = new NzbDrone.Series.Delete.DeleteSeriesView({ model: this.model });
NzbDrone.modalRegion.show(view);
}
edit: function () {
var view = new EditProfileView({ model: this.model});
App.modalRegion.show(view);
},
removeQuality: function () {
var view = new DeleteProfileView({ model: this.model });
App.modalRegion.show(view);
}
});
return AsModelBoundView.call(view);
});
return AsModelBoundView.call(view);
});