-
×
- You can use custom formats to service all your automation needs! Read the
Wiki Page for more info.
- If you don't have the need for full customization, you can find a lot of predefined examples
here.
- These should be able to cover most automation needs.
+
+
+
+
×
+ You can use custom formats to service all your automation needs! Read the
Wiki Page for more info.
+ If you don't have the need for full customization, you can find a lot of predefined examples
here.
+ These should be able to cover most automation needs.
+
-
-
+
-
+
+
+ Custom Formats are very advanced. Please make sure you understand them fully before proceeding!
+
+
+
diff --git a/src/UI/Settings/CustomFormats/DeleteCustomFormatView.js b/src/UI/Settings/CustomFormats/DeleteCustomFormatView.js
new file mode 100644
index 000000000..f9894ebd7
--- /dev/null
+++ b/src/UI/Settings/CustomFormats/DeleteCustomFormatView.js
@@ -0,0 +1,28 @@
+var vent = require('vent');
+var Marionette = require('marionette');
+
+module.exports = Marionette.ItemView.extend({
+ template : 'Settings/CustomFormats/DeleteCustomFormatView',
+
+ ui: {
+ indicator : '.x-indicator',
+ delete : '.x-confirm-delete',
+ cancel : '.x-cancel-confirm'
+ },
+
+ events : {
+ 'click .x-confirm-delete' : '_removeProfile'
+ },
+
+ _removeProfile : function() {
+ this.ui.indicator.show();
+ this.ui.delete.attr("disabled", "disabled");
+ this.ui.cancel.attr("disabled", "disabled");
+
+ var self = this;
+ this.model.destroy({ wait : true }).done(function() {
+ self.ui.indicator.hide();
+ vent.trigger(vent.Commands.CloseModalCommand);
+ });
+ }
+});
diff --git a/src/UI/Settings/CustomFormats/DeleteCustomFormatViewTemplate.hbs b/src/UI/Settings/CustomFormats/DeleteCustomFormatViewTemplate.hbs
new file mode 100644
index 000000000..e59e17f0f
--- /dev/null
+++ b/src/UI/Settings/CustomFormats/DeleteCustomFormatViewTemplate.hbs
@@ -0,0 +1,21 @@
+
+
+
+
Are you sure you want to delete '{{name}}'?
+
+ Custom Formats will be removed from all files, history items, backlisted releases and profiles.
+ If a profile has this format set as cutoff, the cutoff will be reset to 'None'!
+
+
+ Important: This operation may take multiple minutes to complete! Please make sure you keep this tab open and active!
+
+
+
+
diff --git a/src/UI/Settings/CustomFormats/Edit/CustomFormatEditView.js b/src/UI/Settings/CustomFormats/Edit/CustomFormatEditView.js
index 6efde413b..70acee683 100644
--- a/src/UI/Settings/CustomFormats/Edit/CustomFormatEditView.js
+++ b/src/UI/Settings/CustomFormats/Edit/CustomFormatEditView.js
@@ -2,7 +2,7 @@
var $ = require('jquery');
var vent = require('vent');
var Marionette = require('marionette');
-//var DeleteView = require('../Delete/IndexerDeleteView');
+var DeleteView = require('../DeleteCustomFormatView');
var AsModelBoundView = require('../../../Mixins/AsModelBoundView');
var AsValidatedView = require('../../../Mixins/AsValidatedView');
var AsEditModalView = require('../../../Mixins/AsEditModalView');
@@ -29,7 +29,7 @@ var view = Marionette.Layout.extend({
testArea : '#x-test-region'
},
- //_deleteView : DeleteView,
+ _deleteView : DeleteView,
initialize : function(options) {
this.targetCollection = options.targetCollection;
diff --git a/src/UI/Settings/CustomFormats/Edit/CustomFormatEditViewTemplate.hbs b/src/UI/Settings/CustomFormats/Edit/CustomFormatEditViewTemplate.hbs
index 533930cef..634317a01 100644
--- a/src/UI/Settings/CustomFormats/Edit/CustomFormatEditViewTemplate.hbs
+++ b/src/UI/Settings/CustomFormats/Edit/CustomFormatEditViewTemplate.hbs
@@ -31,7 +31,7 @@