Hip new multi select.

This commit is contained in:
James Cole
2017-01-24 07:37:29 +01:00
parent 6c14e9d083
commit 872e8f2de6
4 changed files with 1760 additions and 20 deletions

View File

@@ -26,6 +26,7 @@ $(function () {
}
);
// set values from cookies, if any:
if (!(readCookie('report-type') === null)) {
$('select[name="report_type"]').val(readCookie('report-type'));
@@ -34,10 +35,13 @@ $(function () {
if ((readCookie('report-accounts') !== null)) {
var arr = readCookie('report-accounts').split(',');
arr.forEach(function (val) {
$('input[class="account-checkbox"][type="checkbox"][value="' + val + '"]').prop('checked', true);
$('#inputAccounts').find('option[value="' + val + '"]').prop('selected', true);
});
}
// make account select a hip new bootstrap multi-select thing.
$('#inputAccounts').multiselect();
// set date:
var startStr = readCookie('report-start');
var endStr = readCookie('report-end');