Sha256: 671feff3aa93b5b85998d2478b0fd6c018af5fca142d573b240fae1006a2b1c0

Contents?: true

Size: 682 Bytes

Versions: 45

Compression:

Stored size: 682 Bytes

Contents

$ ->
  $('table.dragtable').dragtable
    persistState: (table) ->
      if !window.sessionStorage
        return
      ss = window.sessionStorage
      table.el.find('th').each (i) ->
        if @id != ''
          table.sortOrder[@id] = i
        return
      ss.setItem "column-order.#{window.location.pathname}", JSON.stringify(table.sortOrder)
      console.log(ss)
      return
    restoreState: eval('(' + window.sessionStorage.getItem("column-order.#{window.location.pathname}") + ')')
            
$ ->
  $('[data-reset-column-order]').on 'click', (e) ->
    window.sessionStorage.removeItem "column-order.#{window.location.pathname}"
    window.location.reload()
    false

Version data entries

45 entries across 45 versions & 1 rubygems

Version Path
itsf_backend-2.0.2 app/assets/javascripts/itsf/backend/application/table-column-sorting.coffee
itsf_backend-2.0.1 app/assets/javascripts/itsf/backend/application/table-column-sorting.coffee
itsf_backend-1.2.8 app/assets/javascripts/itsf/backend/application/table-column-sorting.coffee
itsf_backend-1.2.7 app/assets/javascripts/itsf/backend/application/table-column-sorting.coffee
itsf_backend-1.2.6 app/assets/javascripts/itsf/backend/application/table-column-sorting.coffee
itsf_backend-1.2.5 app/assets/javascripts/itsf/backend/application/table-column-sorting.coffee
itsf_backend-1.2.4 app/assets/javascripts/itsf/backend/application/table-column-sorting.coffee
itsf_backend-1.2.1 app/assets/javascripts/itsf/backend/application/table-column-sorting.coffee
itsf_backend-1.2.0 app/assets/javascripts/itsf/backend/application/table-column-sorting.coffee
itsf_backend-1.1.15 app/assets/javascripts/itsf/backend/application/table-column-sorting.coffee
itsf_backend-1.1.14 app/assets/javascripts/itsf/backend/application/table-column-sorting.coffee
itsf_backend-1.1.13 app/assets/javascripts/itsf/backend/application/table-column-sorting.coffee
itsf_backend-1.1.12 app/assets/javascripts/itsf/backend/application/table-column-sorting.coffee
itsf_backend-1.1.11 app/assets/javascripts/itsf/backend/application/table-column-sorting.coffee
itsf_backend-1.1.10 app/assets/javascripts/itsf/backend/application/table-column-sorting.coffee
itsf_backend-1.1.9 app/assets/javascripts/itsf/backend/application/table-column-sorting.coffee
itsf_backend-1.1.8 app/assets/javascripts/itsf/backend/application/table-column-sorting.coffee
itsf_backend-1.1.7 app/assets/javascripts/itsf/backend/application/table-column-sorting.coffee
itsf_backend-1.1.6 app/assets/javascripts/itsf/backend/application/table-column-sorting.coffee
itsf_backend-1.1.5 app/assets/javascripts/itsf/backend/application/table-column-sorting.coffee