38 lines
1.0 KiB
JavaScript
38 lines
1.0 KiB
JavaScript
|
function initPage() {
|
||
|
var backBtn = $j('#backBtn');
|
||
|
var table = $j('#framesTable');
|
||
|
|
||
|
// Define the icons used in the bootstrap-table top-right toolbar
|
||
|
var icons = {
|
||
|
paginationSwitchDown: 'fa-caret-square-o-down',
|
||
|
paginationSwitchUp: 'fa-caret-square-o-up',
|
||
|
refresh: 'fa-sync',
|
||
|
toggleOff: 'fa-toggle-off',
|
||
|
toggleOn: 'fa-toggle-on',
|
||
|
columns: 'fa-th-list',
|
||
|
fullscreen: 'fa-arrows-alt',
|
||
|
detailOpen: 'fa-plus',
|
||
|
detailClose: 'fa-minus'
|
||
|
};
|
||
|
|
||
|
// Init the bootstrap-table
|
||
|
table.bootstrapTable('destroy').bootstrapTable({icons: icons});
|
||
|
|
||
|
backBtn.prop('disabled', !document.referrer.length);
|
||
|
|
||
|
// Manage the BACK button
|
||
|
document.getElementById("backBtn").addEventListener("click", function onBackClick(evt) {
|
||
|
evt.preventDefault();
|
||
|
window.history.back();
|
||
|
});
|
||
|
// Manage the REFRESH Button
|
||
|
document.getElementById("refreshBtn").addEventListener("click", function onRefreshClick(evt) {
|
||
|
evt.preventDefault();
|
||
|
window.location.reload(true);
|
||
|
});
|
||
|
}
|
||
|
|
||
|
$j(document).ready(function() {
|
||
|
initPage();
|
||
|
});
|