direct-fuel-injection / bbGrid

Grid system on Backbone.js and Bootstrap, sure jQuery :)
http://direct-fuel-injection.github.com/bbGrid
138 stars 59 forks source link

getSelectedModels #51

Closed anek77713 closed 10 years ago

anek77713 commented 10 years ago

from your webpage: Buttons Example code:

App.ButtonsExampleGrid = new bbGrid.View({ ... buttons: [{ title: 'Show selected', onClick: function(){ var models = this.view.getSelectedModels(); if( !.isEmpty(models)) { alert(.first(models).get('name')); } else { alert('Nothing'); } } }] });

error: TypeError: Cannot call method 'getSelectedModels' of undefined http://direct-fuel-injection.github.io/bbGrid/javascripts/main.js:59

when pressing "show selected"

anek77713 commented 10 years ago

changing var models = this.view.getSelectedModels(); to var models = this.getSelectedModels();

does the trick ;)

direct-fuel-injection commented 10 years ago

oh, i forgot this :)

direct-fuel-injection commented 10 years ago

in click function this bind to view. Sure :)

anek77713 commented 10 years ago

прекрасный фреймворк, только добавить удобное редактирование в самой таблицы, было бы отлично. я так и не разобрался как это сделать )