23 function clearingSuccess(data) {
24 $(
'#recentLicenseClearing').html(data.recentLicenseClearing);
27 function openBulkModal() {
28 $(
'#userModal').hide();
29 $(
'#ClearingHistoryDataModal').hide();
30 $(
'#bulkModal').toggle();
33 function closeBulkModal() {
34 $(
'#bulkModal').hide();
37 function openUserModal() {
38 $(
'#bulkModal').hide();
39 $(
'#ClearingHistoryDataModal').hide();
40 $(
'#userModal').toggle();
41 $(
"#globalDecision").prop(
"checked",
false);
42 if ($(
'#userModal').is(
":visible")) {
43 $(
'#licenseSelectionTable_filter label input').focus();
47 function closeUserModal() {
48 $(
'#userModal').hide();
51 function openClearingHistoryDataModal() {
52 $(
'#bulkModal').hide();
53 $(
'#userModal').hide();
54 $(
'#ClearingHistoryDataModal').toggle();
55 createClearingHistoryDataTable();
58 function closeClearingHistoryDataModal() {
59 $(
'#ClearingHistoryDataModal').hide();
62 function reloadClearingTable() {
64 var table = createClearingTable();
66 $(
'#bulkIdResult').hide();
67 refreshBulkHistory(
function (data) {
68 $(
'#bulkHistory').show();
72 function scheduleBulkScan() {
73 scheduleBulkScanCommon($(
'#bulkIdResult'), reloadClearingTable);
76 function cleanText() {
77 var $textField = $(
'#bulkRefText');
78 var text = $textField.val();
80 text = text.replace(/ [ ]*/gi,
' ')
81 .replace(/(^|\n)[ \t]*/gi,
'$1')
82 .replace(/(^|\n) ?\/[\*\/]+/gi,
'$1')
84 .replace(/(^|\n) ?#+/gi,
'$1')
90 function calculateDivHeight() {
91 var viewportWidth = $(window).width();
92 var viewportHeight = $(window).height();
94 var usedPixels = $(
'#leftrightalignment').offset();
95 var availablePixels = viewportHeight - usedPixels.top;
96 var fixedPixelsLeft = 40;
97 var availablePixelsLeft = availablePixels - fixedPixelsLeft;
98 var availableWidth = viewportWidth / 2 - 20;
100 $(
'.headerBox').css({height: availablePixelsLeft +
'px', width: availableWidth +
'px'});
101 $(
'.boxnew').css({height: availablePixelsLeft +
'px', width: availableWidth +
'px'});
104 $(document).ready(
function () {
105 calculateDivHeight();
108 $(window).resize(calculateDivHeight);