Settings will load with zero notifications

This commit is contained in:
Mark McDowall 2013-07-26 15:07:51 -07:00
commit f25df49068
13 changed files with 69 additions and 83 deletions

View file

@ -1,7 +0,0 @@
<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

@ -2,7 +2,15 @@
<legend>Indexers</legend>
<div class="row">
<div class="span12">
<ul id="x-indexers" class="indexer-list"></ul>
<ul id="x-indexers" class="indexer-list">
<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>
</ul>
</div>
</div>
</fieldset>

View file

@ -10,19 +10,19 @@ define(['app',
itemViewContainer: '#x-indexers',
template : 'Settings/Indexers/CollectionTemplate',
ui: {
'addCard': '.x-add-card'
},
events: {
'click .x-add-card': '_openSchemaModal'
},
onRender: function () {
this.listenTo(this.collection, 'add', this.render);
this.templateFunction = Marionette.TemplateCache.get('Settings/Indexers/AddCardTemplate');
var html = this.templateFunction();
this.$itemViewContainer.append(html);
appendHtml: function(collectionView, itemView, index){
collectionView.ui.addCard.parent('li').before(itemView.el);
},
_openSchemaModal: function () {
var self = this;
//TODO: Is there a better way to deal with changing URLs?

View file

@ -29,20 +29,8 @@
}
&.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;
}
}
}