function renderPlugin_quotas(data) { var directives = { ByteUsed: { text: function () { return formatBytes(this["ByteUsed"], data["Options"]["@attributes"]["byteFormat"]); } }, ByteSoft: { text: function () { return formatBytes(this["ByteSoft"], data["Options"]["@attributes"]["byteFormat"]); } }, ByteHard: { text: function () { return formatBytes(this["ByteHard"], data["Options"]["@attributes"]["byteFormat"]); } }, BytePercentUsed: { html: function () { return '
' + '
' + this["BytePercentUsed"] + '%
'; } }, FilePercentUsed: { html: function () { return '
' + '
' + this["FilePercentUsed"] + '%
'; } } }; if (data['Plugins']['Plugin_Quotas'] !== undefined) { var qtitems = items(data['Plugins']['Plugin_Quotas']['Quota']); if (qtitems.length > 0) { var qt_memory = []; qt_memory.push_attrs(qtitems); $('#quotas-data').render(qt_memory, directives); $('#quotas_User').removeClass("sorttable_sorted"); // reset sort order sorttable.innerSortFunction.apply($('#quotas_User')[0], []); $('#block_quotas').show(); } else { $('#block_quotas').hide(); } } else { $('#block_quotas').hide(); } }