Finished category report.

This commit is contained in:
James Cole
2016-11-17 20:02:55 +01:00
parent 13b96f6136
commit 5088df103f
9 changed files with 367 additions and 199 deletions

View File

@@ -55,6 +55,10 @@ $(function () {
}
);
// trigger list thing
listLengthInitial();
});
function currencySelect(e) {
@@ -108,3 +112,30 @@ accounting.settings = {
decimal: "."
}
};
function listLengthInitial() {
"use strict";
$('.overListLength').hide();
$('.listLengthTrigger').unbind('click').click(triggerList)
}
function triggerList(e) {
"use strict";
var link = $(e.target);
var table = link.parent().parent().parent().parent();
console.log('data-hidden = ' + table.attr('data-hidden'));
if (table.attr('data-hidden') === 'no') {
// hide all elements, return false.
table.find('.overListLength').hide();
table.attr('data-hidden', 'yes');
link.text(showFullList);
return false;
}
// show all, return false
table.find('.overListLength').show();
table.attr('data-hidden', 'no');
link.text(showOnlyTop);
return false;
}