mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-04 10:02:40 +01:00
Indexers add card
This commit is contained in:
parent
4f1b27a523
commit
6522b38584
7
UI/Settings/Indexers/AddCardTemplate.html
Normal file
7
UI/Settings/Indexers/AddCardTemplate.html
Normal file
@ -0,0 +1,7 @@
|
||||
<li>
|
||||
<div class="indexer-settings-item add-card x-add-card">
|
||||
<span class="center well">
|
||||
<i class="icon-plus" title="Add Newznab"/>
|
||||
</span>
|
||||
</div>
|
||||
</li>
|
@ -1,12 +1,5 @@
|
||||
<fieldset>
|
||||
<legend>Indexers</legend>
|
||||
|
||||
<div class="row">
|
||||
<div class="span12">
|
||||
<button class="btn btn-success x-add">Add Newznab</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="span12">
|
||||
<ul id="x-indexers" class="indexer-list"></ul>
|
||||
|
@ -11,10 +11,19 @@ define(['app',
|
||||
template : 'Settings/Indexers/CollectionTemplate',
|
||||
|
||||
events: {
|
||||
'click .x-add': 'openSchemaModal'
|
||||
'click .x-add-card': '_openSchemaModal'
|
||||
},
|
||||
|
||||
openSchemaModal: function () {
|
||||
onAfterItemAdded: function () {
|
||||
this.$itemViewContainer.find('.x-add-card').parent('li').remove();
|
||||
|
||||
this.templateFunction = Marionette.TemplateCache.get('Settings/Indexers/AddCardTemplate');
|
||||
var html = this.templateFunction();
|
||||
|
||||
this.$itemViewContainer.append(html);
|
||||
},
|
||||
|
||||
_openSchemaModal: function () {
|
||||
var self = this;
|
||||
//TODO: Is there a better way to deal with changing URLs?
|
||||
var schemaCollection = new IndexerCollection();
|
||||
|
@ -27,4 +27,22 @@
|
||||
.btn-group {
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
&.add-card {
|
||||
.clickable;
|
||||
color: #adadad;
|
||||
font-size: 50px;
|
||||
text-align: center;
|
||||
|
||||
.center {
|
||||
display: inline-block;
|
||||
padding: 0px 20px;
|
||||
padding-top: 5px;
|
||||
margin-top: 100px;
|
||||
}
|
||||
|
||||
i {
|
||||
.clickable;
|
||||
}
|
||||
}
|
||||
}
|
@ -15,7 +15,7 @@ define([
|
||||
},
|
||||
|
||||
onAfterItemAdded: function () {
|
||||
this.$itemViewContainer.find('.x-add-card').remove();
|
||||
this.$itemViewContainer.find('.x-add-card').parent('li').remove();
|
||||
|
||||
this.templateFunction = Marionette.TemplateCache.get('Settings/Notifications/AddCardTemplate');
|
||||
var html = this.templateFunction();
|
||||
|
@ -17,7 +17,7 @@ define(['app',
|
||||
},
|
||||
|
||||
onAfterItemAdded: function () {
|
||||
this.$itemViewContainer.find('.x-add-card').remove();
|
||||
this.$itemViewContainer.find('.x-add-card').parent('li').remove();
|
||||
|
||||
this.templateFunction = Marionette.TemplateCache.get('Settings/Quality/Profile/AddCardTemplate');
|
||||
var html = this.templateFunction();
|
||||
|
Loading…
Reference in New Issue
Block a user