This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ParamForm = window.Interface.BaseForm.extend({ | |
initialize: function(options){ | |
options.schema = { | |
client_name: {type: 'Text', title: 'Client Name', validators: ['required'], editorClass: 'client_name'}, | |
name: {type: 'Text', title: 'Short Name', editorClass: 'name', fieldClass: 'hidden'}, | |
urls: {type: 'List', title: 'Source urls', validators: ['url']}, | |
exporters: {type: 'List', title: 'Facebook Pages', itemType: 'InlineObject', validators: [this.validateListExporter], | |
subSchema: { | |
name: {type: 'Text', title: 'Name', validators: ['required']}, | |
exporter: {type: 'Exporter', title: 'Type', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.bbf-field .bbf-keyvalue-editor input { | |
width: 45%; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Currently, the Object ItemType is not supported. | |
*/ | |
var Form = Backbone.Form, | |
editors = Form.editors; | |
Form.setTemplates({ | |
listKeyValueItem: '\ | |
<li>\ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(){ | |
var validators = Backbone.Form.validators; | |
//a validator verifying if an element is not in a given list | |
validators.errMessages.notInList = 'Must not be in list {{list}}'; | |
validators.notInList = function(options) { | |
if (!options.list) throw new Error('Missing required "list" options for "notInList" validator'); | |
options = _.extend({ | |
type: 'notInList', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Form = Backbone.Form, | |
editors = Form.editors; | |
// we don't want our nested form to have a (nested) <form> tag | |
// (currently bbf includes form tags: https://github.com/powmedia/backbone-forms/issues/8) | |
// aside from being strange html to have nested form tags, it causes submission-upon-enter | |
Form.setTemplates({ | |
nestedForm: '<div class="bbf-nested-form">{{fieldsets}}</div>' | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Example of a user's .screenrc file | |
# | |
# no annoying audible bell, please | |
#vbell on | |
vbell off | |
# detach on hangup | |
autodetach on |
NewerOlder