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

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