Sha256: 2a94ca82926aced5aa546770d2462580f254421d24a17cd7f3e6b077b64f10f3
Contents?: true
Size: 868 Bytes
Versions: 11
Compression:
Stored size: 868 Bytes
Contents
class IuguUI.Table extends IuguUI.Dataset layout: "iugu-ui-table" defaults: itemLayout: "iugu-ui-table-row" itemTagName: "tr" itemClassName: "table-row" events: 'click .sort-button' : 'sortByColumn' context: -> sortableBy: @options.sortableBy fields: @options.fields sortBy: @sortBy initialize: -> super @sortBy = {} sortByColumn: (e) -> btn = $(e.currentTarget) name = btn.attr('id') if btn.data('direction') == "asc" btn.data('direction', "") delete @sortBy[name] else if btn.data('direction') == "desc" btn.data('direction', "asc") @sortBy[name] = "asc" else btn.data('direction', "desc") @sortBy[name] = "desc" @collection.removeFilter 'sortBy' @collection.configureFilter 'sortBy', @sortBy @collection.fetch() @IuguUI.Table = IuguUI.Table
Version data entries
11 entries across 11 versions & 1 rubygems