19 function clearingSuccess(data) {
27 $(document).ready(
function () {
28 bulkModal = $(
'#bulkModal').plainModal({child: textModal});
29 userModal = $(
'#userModal').plainModal();
30 clearingHistoryDataModal = $(
'#ClearingHistoryDataModal').plainModal();
33 function openBulkModal(uploadTreeId) {
34 $(
'#uploadTreeId').val(uploadTreeId);
35 bulkModal.plainModal(
'open');
38 function closeBulkModal() {
39 bulkModal.plainModal(
'close');
42 function loadBulkHistoryModal() {
43 refreshBulkHistory(
function(data) {
44 $(
'#bulkHistoryModal').plainModal(
'open');
48 function openUserModal(uploadTreeId) {
49 $(
'#uploadTreeId').val(uploadTreeId);
50 userModal.plainModal(
'open');
53 function closeUserModal() {
54 userModal.plainModal(
'close');
57 function openClearingHistoryDataModal(uploadTreeId) {
58 $(
'#uploadTreeId').val(uploadTreeId);
59 clearingHistoryDataModal.plainModal(
'open');
62 function closeClearingHistoryDataModal() {
63 clearingHistoryDataModal.plainModal(
'close');
66 function scheduleBulkScan() {
67 scheduleBulkScanCommon($(
'#bulkIdResult'),
function () {
72 function performPostRequest(doRemove) {
74 performPostRequestCommon($(
'#bulkIdResult'),
function () {
79 function markDecisions(uploadTreeIdForMultiple) {
80 if(Array.isArray(uploadTreeIdForMultiple)){
82 "uploadTreeId": uploadTreeIdForMultiple,
83 "decisionMark":
'irrelevant' 87 "uploadTreeId": $(
'#uploadTreeId').val(),
88 "decisionMark": uploadTreeIdForMultiple
91 resultEntity = $(
'bulkIdResult');
94 url:
"?mod=change-license-processPost",
96 success:
function (data) { location.reload(); },
97 error:
function(responseobject) { scheduledDeciderError(responseobject, resultEntity); }
102 function deleteMarkedDecisions(decisionToBeRemoved) {
104 "uploadTreeId": $(
'#uploadTreeId').val(),
105 "decisionMark": decisionToBeRemoved
107 resultEntity = $(
'bulkIdResult');
109 var pleaseConfirm = confirm(
"You are about to delete recent decisions. Please confirm!");
110 if (pleaseConfirm ==
true) {
113 url:
"?mod=change-license-processPost",
115 success:
function (data) { location.reload(); },
116 error:
function(responseobject) { scheduledDeciderError(responseobject, resultEntity); }
121 function cleanText() {
122 var $textField = $(
'#bulkRefText');
123 var text = $textField.val();
125 text = text.replace(/ [ ]*/gi,
' ')
126 .replace(/(^|\n)[ \t]*/gi,
'$1')
127 .replace(/(^|\n) ?\/[\*\/]+/gi,
'$1')
129 .replace(/(^|\n) ?#+/gi,
'$1')
131 $textField.val(text);