bbGrid
bbGrid copied to clipboard
nl (dutch) dict
bbGrid.Dict.nl = {
loading: 'Laden...',
noData: 'Geen rijen',
search: 'Zoeken',
rowsOnPage: 'Rijen per pagina',
page: 'Pag',
all: 'Alle',
prep: 'van'
};
And maybe you could add:
bbGrid.setDict('en'||'ru'||'nl');
to the docs, combined with the one above for languages not in bbGrid.
Another thing that seems obvious but might be nice to add in the docs is that when using bbGrid dynamically with multiple collections you can set the colModel in the model definition:
var Person = Backbone.Model.extend({
defaults : {
name : '',
email : ''
},
bbGridView : [{
title : 'Name',
index : true,
name : 'name',
filter : true,
filterType : 'input'
}, {
title : 'Email',
index : true,
name : 'email',
filter : true,
filterType : 'input'
}]
});
var Persons = Backbone.Collection.extend({
model : Person
});
var persons = new Persons([{name:'me',email:'[email protected]'},{name:'you',email:'[email protected]'}]);
var myGrid = new bbGrid.View({
collection : persons,
colModel : persons.model.prototype.bbGridView
});
Or you could make a tiny adjustment in a few parts of the code that when colModel is not set as an option to the new bbGrid.View() it will be looked up in model.prototype of the collection.
this.colModel || this.collection.model.prototype.bbGridView