mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-18 21:34:28 -04:00
Quality Profile add card
This commit is contained in:
@@ -10,34 +10,21 @@ define([
|
||||
itemViewContainer: '.notifications',
|
||||
template : 'Settings/Notifications/CollectionTemplate',
|
||||
|
||||
ui: {
|
||||
'addCard': '.x-add-card'
|
||||
},
|
||||
|
||||
events: {
|
||||
'click .x-add': '_openSchemaModal',
|
||||
'click .x-add-card': '_openSchemaModal'
|
||||
},
|
||||
|
||||
onBeforeItemAdded: function () {
|
||||
this.ui.addCard.remove();
|
||||
},
|
||||
|
||||
onAfterItemAdded: function () {
|
||||
this._appendAddCard();
|
||||
},
|
||||
|
||||
_openSchemaModal: function () {
|
||||
SchemaModal.open(this.collection);
|
||||
},
|
||||
|
||||
_appendAddCard: function () {
|
||||
this.$itemViewContainer.find('.x-add-card').remove();
|
||||
|
||||
this.templateFunction = Marionette.TemplateCache.get('Settings/Notifications/AddCardTemplate');
|
||||
var html = this.templateFunction();
|
||||
|
||||
this.$itemViewContainer.append(html);
|
||||
},
|
||||
|
||||
_openSchemaModal: function () {
|
||||
SchemaModal.open(this.collection);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@@ -56,22 +56,22 @@
|
||||
.settings {
|
||||
margin-top: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.add-card {
|
||||
.clickable;
|
||||
color: #adadad;
|
||||
font-size: 50px;
|
||||
text-align: center;
|
||||
|
||||
.center {
|
||||
display: inline-block;
|
||||
padding: 0px 20px;
|
||||
padding-top: 5px;
|
||||
margin-top: 15px;
|
||||
}
|
||||
|
||||
i {
|
||||
&.add-card {
|
||||
.clickable;
|
||||
color: #adadad;
|
||||
font-size: 50px;
|
||||
text-align: center;
|
||||
|
||||
.center {
|
||||
display: inline-block;
|
||||
padding: 0px 20px;
|
||||
padding-top: 5px;
|
||||
margin-top: 15px;
|
||||
}
|
||||
|
||||
i {
|
||||
.clickable;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user