* Update to Semantic UI 2.1.6 Basically I tried to rebuild the old layout as closely as possible. It is a bit more mobile friendly but still misses Semantic UIs collapsable menu: https://github.com/Semantic-Org/Semantic-UI/issues/157 + ditch old tablesorter for recommended one + use em instead of percentage for status labels in macros Overview: + sort overview by report date per default + slightly different colors Facts: + template based approach to even out the columns in facts view + don't show empty containers + needed an additional variable in context * get rid of unnecessary semantic src files * more cleanup * clean jquery-tablesort directory as well * drop unused theme files * remove symlinks in static/{js,css} * semantic_update + bump to semantic 2.1.8 + minor adjustments - default-sort class in tables - table type in inventory - fixed and wrapped table for reports * updated screenshots
25 lines
633 B
CoffeeScript
25 lines
633 B
CoffeeScript
$ = jQuery
|
|
$ ->
|
|
|
|
if $('th.default-sort').data()
|
|
$('table.sortable').tablesort().data('tablesort').sort($("th.default-sort"),"desc")
|
|
|
|
$('thead th.date').data 'sortBy', (th, td, tablesort) ->
|
|
return moment.utc(td.text()).unix()
|
|
|
|
$('input.filter-table').parent('div').removeClass('hide')
|
|
$("input.filter-table").on "keyup", (e) ->
|
|
rex = new RegExp($(this).val(), "i")
|
|
|
|
$(".searchable tr").hide()
|
|
$(".searchable tr").filter( ->
|
|
rex.test $(this).text()
|
|
).show()
|
|
|
|
if e.keyCode is 27
|
|
$(e.currentTarget).val ""
|
|
ev = $.Event("keyup")
|
|
ev.keyCode = 13
|
|
$(e.currentTarget).trigger(ev)
|
|
e.currentTarget.blur()
|