Converted notifications to thingi provider

Fixed: Issues creating and saving Connects
This commit is contained in:
Mark McDowall
2013-10-12 11:44:40 -07:00
parent ff7ce397ab
commit 27da44ba45
51 changed files with 299 additions and 761 deletions

View File

@@ -1,7 +1,7 @@
<div class="add-notification-item span3">
<div class="row">
<div class="span3">
{{implementationName}}
{{implementation}}
{{#if link}}
<a href="{{link}}"><i class="icon-info-sign"/></a>
{{/if}}

View File

@@ -3,7 +3,7 @@
define([
'AppLayout',
'marionette',
'Settings/Notifications/EditView'
'Settings/Notifications/NotificationEditView'
], function (AppLayout, Marionette, EditView) {
return Marionette.ItemView.extend({

View File

@@ -8,13 +8,13 @@ define(
'Settings/Notifications/DeleteView',
'Commands/CommandController',
'Mixins/AsModelBoundView',
'Form/FormBuilder',
'underscore'
'underscore',
'Form/FormBuilder'
], function (vent, AppLayout, Marionette, DeleteView, CommandController, AsModelBoundView, _) {
var model = Marionette.ItemView.extend({
template: 'Settings/Notifications/EditTemplate',
template: 'Settings/Notifications/NotificationEditViewTemplate',
events: {
'click .x-save' : '_saveNotification',
@@ -24,11 +24,6 @@ define(
'click .x-test' : '_test'
},
ui: {
testButton: '.x-test',
testIcon : '.x-test-icon'
},
initialize: function (options) {
this.notificationCollection = options.notificationCollection;
},
@@ -68,24 +63,14 @@ define(
},
_test: function () {
var testCommand = this.model.get('testCommand');
if (testCommand) {
this.idle = false;
var properties = {};
var testCommand = 'test{0}'.format(this.model.get('implementation'));
var properties = {};
_.each(this.model.get('fields'), function (field) {
properties[field.name] = field.value;
});
_.each(this.model.get('fields'), function (field) {
properties[field.name] = field.value;
});
CommandController.Execute(testCommand, properties);
}
},
_testOnAlways: function () {
if (!this.isClosed) {
this.idle = true;
}
CommandController.Execute(testCommand, properties);
}
});

View File

@@ -1,9 +1,9 @@
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
{{#if id}}
<h3>Edit - {{implementationName}}</h3>
<h3>Edit - {{implementation}}</h3>
{{else}}
<h3>Add - {{implementationName}}</h3>
<h3>Add - {{implementation}}</h3>
{{/if}}
</div>
<div class="modal-body">