New: option to blacklist a release when removing it from download clientpull/4/head
parent
5d41ebd322
commit
3c641cab33
@ -0,0 +1,39 @@
|
||||
'use strict';
|
||||
define(
|
||||
[
|
||||
'vent',
|
||||
'marionette'
|
||||
], function (vent, Marionette) {
|
||||
|
||||
return Marionette.ItemView.extend({
|
||||
template: 'Activity/Queue/RemoveFromQueueViewTemplate',
|
||||
|
||||
events: {
|
||||
'click .x-confirm-remove' : 'removeItem'
|
||||
},
|
||||
|
||||
ui: {
|
||||
blacklist : '.x-blacklist',
|
||||
indicator : '.x-indicator'
|
||||
},
|
||||
|
||||
initialize: function (options) {
|
||||
this.templateHelpers = {
|
||||
showBlacklist: options.showBlacklist
|
||||
};
|
||||
},
|
||||
|
||||
removeItem: function () {
|
||||
var blacklist = this.ui.blacklist.prop('checked');
|
||||
|
||||
this.ui.indicator.show();
|
||||
|
||||
this.model.destroy({
|
||||
data: { 'blacklist': blacklist },
|
||||
wait: true
|
||||
}).done(function () {
|
||||
vent.trigger(vent.Commands.CloseModalCommand);
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
@ -0,0 +1,49 @@
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h3>{{title}}</h3>
|
||||
</div>
|
||||
<div class="modal-body remove-from-queue-modal">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
Are you sure you want to remove '{{title}}'?
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{#if showBlacklist}}
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label">Blacklist release</label>
|
||||
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group">
|
||||
<label class="checkbox toggle well">
|
||||
<input type="checkbox" class="x-blacklist"/>
|
||||
<p>
|
||||
<span>Yes</span>
|
||||
<span>No</span>
|
||||
</p>
|
||||
|
||||
<div class="btn slide-button btn-danger"/>
|
||||
</label>
|
||||
|
||||
<span class="help-inline-checkbox">
|
||||
<i class="icon-nd-form-info" title="Do you want to blacklist this release?"/>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<span class="indicator x-indicator"><i class="icon-spinner icon-spin"></i></span>
|
||||
<button class="btn" data-dismiss="modal">cancel</button>
|
||||
<button class="btn btn-danger x-confirm-remove">remove</button>
|
||||
</div>
|
||||
</div>
|
Loading…
Reference in new issue