Convert admin/registrations datatable to AJAX-backed

Supercedes https://github.com/openSUSE/osem/pull/2031 .

Note:

* "Questions" modals have been dropped from this view; questions are no
  longer asked on registration, since Surveys(PR#1100)  were added.
This commit is contained in:
James Mason 2018-09-21 17:32:41 -07:00 committed by Henne Vogelsang
parent eea05d649c
commit d7a0936dd7
4 changed files with 167 additions and 63 deletions

View file

@ -30,3 +30,18 @@ $(function () {
});
});
});
function truncatify(selector) {
$(selector).each(function(){
var text = $(this).text()
$(this).html('<span data-toggle="tooltip" title="' + text + '">' + text + '</span> ')
});
}
function iconize(selector, value, icon, title) {
$(selector).each(function(){
if ($(this).text() == value) {
$(this).html("<i class='fa fa-" + icon + "' title='" + title + "'></i>");
}
});
}