Files
puppetboard/puppetboard/static/js/tables.js
Michael b5ba2515e2 Semantic UI update to 2.1.8 (#211)
* 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
2016-04-23 20:30:20 -04:00

36 lines
861 B
JavaScript

// Generated by CoffeeScript 1.4.0
(function() {
var $;
$ = jQuery;
$(function() {});
if ($('th.default-sort').data()) {
$('table.sortable').tablesort().data('tablesort').sort($("th.default-sort"), "desc");
}
$('thead th.date').data('sortBy', function(th, td, tablesort) {
return moment.utc(td.text()).unix();
});
$('input.filter-table').parent('div').removeClass('hide');
$("input.filter-table").on("keyup", function(e) {
var ev, rex;
rex = new RegExp($(this).val(), "i");
$(".searchable tr").hide();
$(".searchable tr").filter(function() {
return rex.test($(this).text());
}).show();
if (e.keyCode === 27) {
$(e.currentTarget).val("");
ev = $.Event("keyup");
ev.keyCode = 13;
$(e.currentTarget).trigger(ev);
return e.currentTarget.blur();
}
});
}).call(this);