diff --git a/UI/Settings/Notifications/AddCardTemplate.html b/UI/Settings/Notifications/AddCardTemplate.html
new file mode 100644
index 000000000..b32a4ab00
--- /dev/null
+++ b/UI/Settings/Notifications/AddCardTemplate.html
@@ -0,0 +1,7 @@
+
diff --git a/UI/Settings/Notifications/CollectionView.js b/UI/Settings/Notifications/CollectionView.js
index 8c00dc559..5abe0ae5f 100644
--- a/UI/Settings/Notifications/CollectionView.js
+++ b/UI/Settings/Notifications/CollectionView.js
@@ -10,12 +10,34 @@ define([
itemViewContainer: '.notifications',
template : 'Settings/Notifications/CollectionTemplate',
+ ui: {
+ 'addCard': '.x-add-card'
+ },
+
events: {
- 'click .x-add': '_openSchemaModal'
+ '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);
}
});
});
diff --git a/UI/Settings/Notifications/notifications.less b/UI/Settings/Notifications/notifications.less
index 06ec6f3d3..87a669eea 100644
--- a/UI/Settings/Notifications/notifications.less
+++ b/UI/Settings/Notifications/notifications.less
@@ -56,4 +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 {
+ .clickable;
+ }
}
\ No newline at end of file