2013-06-24 23:41:59 +00:00
|
|
|
'use strict';
|
|
|
|
define(
|
|
|
|
[
|
|
|
|
'app',
|
|
|
|
'marionette'
|
|
|
|
], function (App, Marionette) {
|
|
|
|
|
|
|
|
return Marionette.ItemView.extend({
|
2013-06-25 00:41:32 +00:00
|
|
|
template: 'Settings/Quality/Profile/DeleteTemplate',
|
2013-06-24 23:41:59 +00:00
|
|
|
|
|
|
|
events: {
|
|
|
|
'click .x-confirm-delete': '_removeProfile'
|
|
|
|
},
|
|
|
|
|
|
|
|
_removeProfile: function () {
|
|
|
|
|
|
|
|
this.model.destroy({
|
|
|
|
wait: true
|
|
|
|
}).done(function () {
|
2013-07-24 01:15:58 +00:00
|
|
|
App.vent.trigger(App.Commands.CloseModalCommand);
|
2013-06-24 23:41:59 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|