Slide 61
Slide 61 text
function withSelect() {
this.defaultAttrs({
selectedIds: []
});
this.toggleItemSelect = function(ev, data) {
var $item = $(data.el), append;
if ($item.hasClass(this.attr.selectedClass)) {
this.unselectItem($item);
} else {
this.selectItem($item, isMultiSelect(ev));
}
};
this.selectItem = function($item, append) {/*..*/};
this.unselectItem = function($item) {/*..*/};
this.after('initialize', function() {
this.on(this.select('itemSelector'), 'click', this.toggleItemSelect);
});
}
Thursday, August 22, 13