diff --git a/UI/Settings/Notifications/CollectionView.js b/UI/Settings/Notifications/CollectionView.js index 5abe0ae5f..67658c995 100644 --- a/UI/Settings/Notifications/CollectionView.js +++ b/UI/Settings/Notifications/CollectionView.js @@ -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); } }); }); diff --git a/UI/Settings/Notifications/notifications.less b/UI/Settings/Notifications/notifications.less index 87a669eea..59c1726ce 100644 --- a/UI/Settings/Notifications/notifications.less +++ b/UI/Settings/Notifications/notifications.less @@ -56,22 +56,22 @@ .settings { margin-top: 5px; } -} -.add-card { - .clickable; - color: #adadad; - font-size: 50px; - text-align: center; + &.add-card { + .clickable; + color: #adadad; + font-size: 50px; + text-align: center; - .center { - display: inline-block; - padding: 0px 20px; - padding-top: 5px; - margin-top: 15px; - } + .center { + display: inline-block; + padding: 0px 20px; + padding-top: 5px; + margin-top: 15px; + } - i { - .clickable; + i { + .clickable; + } } } \ No newline at end of file diff --git a/UI/Settings/Quality/Profile/AddCardTemplate.html b/UI/Settings/Quality/Profile/AddCardTemplate.html new file mode 100644 index 000000000..54c8b09be --- /dev/null +++ b/UI/Settings/Quality/Profile/AddCardTemplate.html @@ -0,0 +1,7 @@ +