
Product
Introducing Pull Request Stories to Help Security Teams Track Supply Chain Risks
Socket’s new Pull Request Stories give security teams clear visibility into dependency risks and outcomes across scanned pull requests.
backbone-daybed
Advanced tools
Generic wrappers around Backbone-Forms for Daybed.
Basically, it gives you :
Have a look at the Demo !
Load Javascript dependencies :
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.4.2/underscore-min.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/backbone.js/1.0.0/backbone-min.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/backbone-forms/0.12.0/backbone-forms.min.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/mustache.js/0.7.0/mustache.min.js"></script>
<script type="text/javascript" src="backbone-daybed.js"></script>
<div id="form-holder"></div>
Initalize form in <div>
container :
Daybed.SETTINGS.SERVER = "http://daybed.lolnet.org"; // no trailing slash
var form = Daybed.renderForm('#form-holder', {id: 'your-model-id'});
form.on('created', function (record) {
$("#form-holder").html(record.id + " was saved succesfully.");
})
###Daybed.Definition
Daybed model definition.
var definition = new Daybed.Definition({id: 'gnah'});
definition.fetch();
definition.whenReady(function () {
console.log(JSON.stringify(definition.attributes));
});
####Methods
whenReady(function)
Callback function when Definition is ready (i.e. fetched from the server).
fieldsNames()
Returns list of fields names (Array<String>
).
itemSchema()
Returns the Backbone-Forms schema for editing and saving records for this model.
###Daybed.ItemList
Retrieve data item of Daybed model
var definition = new Daybed.Definition({id: 'gnah'}),
collection = new Daybed.ItemList(definition);
definition.fetch();
collection.fetch(); // (will wait if necessary)
###Daybed.TableView
Shows Daybed records in a table.
Uses Definition fields names for table headers.
var collection = new Daybed.ItemList(definition),
tableView = new Daybed.TableView(collection);
definition.whenReady(function () {
$("#container").html(tableView.render().$el);
});
definition.fetch();
###Daybed.FormView
A form for creating and editing Daybed records.
var formView = new Daybed.FormView({definition: definition});
definition.whenReady(function () {
$("#panel").html(formView.render().$el);
});
definition.fetch();
formView.on('created saved', function () {
window.alert('Done !');
});
####Options
TODO
####Methods
TODO
FAQs
Generic wrappers around Backbone-Forms for Daybed models
The npm package backbone-daybed receives a total of 1 weekly downloads. As such, backbone-daybed popularity was classified as not popular.
We found that backbone-daybed demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket’s new Pull Request Stories give security teams clear visibility into dependency risks and outcomes across scanned pull requests.
Research
/Security News
npm author Qix’s account was compromised, with malicious versions of popular packages like chalk-template, color-convert, and strip-ansi published.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.