Notifications wired up server sided

This commit is contained in:
Mark McDowall 2013-05-19 16:17:32 -07:00
commit e9bf78a97d
57 changed files with 977 additions and 951 deletions

View file

@ -0,0 +1,19 @@
<div class="control-group">
<label class="control-label">{{label}}</label>
<div class="controls">
<label class="checkbox toggle well">
<input type="checkbox" name="fields.{{order}}.value"/>
<p>
<span>On</span>
<span>Off</span>
</p>
<div class="btn btn-primary slide-button"></div>
</label>
<span class="help-inline-checkbox">
<i class="icon-question-sign" title="{{helpText}}"></i>
</span>
</div>
</div>

View file

@ -0,0 +1,10 @@
<div class="control-group">
<label class="control-label">{{label}}</label>
<div class="controls">
<input type="text" name="fields.{{order}}.value"/>
<span class="help-inline">
<i class="icon-question-sign" title="{{helpText}}"></i>
</span>
</div>
</div>

View file

@ -7,6 +7,14 @@ Handlebars.registerHelper('partial', function (templateName) {
return new Handlebars.SafeString(templateFunction(this));
});
Handlebars.registerHelper('formField', function () {
if (!this.type) {
return Handlebars.helpers.partial.apply(this, ['Form/TextboxTemplate']);
}
return Handlebars.helpers.partial.apply(this, ['Form/TextboxTemplate']);
});
Handlebars.registerHelper("debug", function(optionalValue) {
console.log("Current Context");
console.log("====================");

View file

@ -22,15 +22,6 @@
</div>
{{#each fields}}
<div class="control-group">
<label class="control-label">{{label}}</label>
<div class="controls">
<input type="text" name="fields.{{@index}}.value"/>
<span class="help-inline">
<i class="icon-question-sign" title="{{helpText}}"></i>
</span>
</div>
</div>
{{formField}}
{{/each}}
</fieldset>