1
0
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:
Mark McDowall 2013-07-26 00:19:44 -07:00
parent 4f1b27a523
commit 6522b38584
6 changed files with 38 additions and 11 deletions

View 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>

View File

@ -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>

View File

@ -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();

View File

@ -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;
}
}
}

View File

@ -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();

View File

@ -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();