Subversion Repositories SmartDukaan

Rev

Rev 31356 | Rev 31702 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 31356 Rev 31687
Line 928... Line 928...
928
		clearTimeout(debounceTimer)
928
		clearTimeout(debounceTimer)
929
		debounceTimer
929
		debounceTimer
930
			= setTimeout(() => func.apply(context, args), delay)
930
			= setTimeout(() => func.apply(context, args), delay)
931
	}
931
	}
932
}
932
}
-
 
933
 
-
 
934
 
-
 
935
function ExportToExcel(container, type, fn, dl) {
-
 
936
	let tableId = $(container).data('tableid');
-
 
937
	var elt = document.getElementById(tableId);
-
 
938
	if ($.fn.DataTable.isDataTable(`#${tableId}`)) {
-
 
939
		elt = $(`#${tableId}`).DataTable().table(0).container();
-
 
940
	}
-
 
941
	var wb = XLSX.utils.table_to_book(elt, {sheet: "sheet1"});
-
 
942
	return dl ?
-
 
943
		XLSX.write(wb, {bookType: type, bookSST: true, type: 'base64'}) :
-
 
944
		XLSX.writeFile(wb, fn || ('MySheetName.' + (type || 'xlsx')));
-
 
945
}
-
 
946
 
-
 
947
 
-
 
948
$(document).on('click', ".manage-pcm", function () {
-
 
949
	managePCM();
-
 
950
});
-
 
951
 
-
 
952
function managePCM() {
-
 
953
	doGetAjaxRequestHandler(`${context}/brand-pcm`, function (
-
 
954
		response) {
-
 
955
		$('#main-content').html(response);
-
 
956
	});
-
 
957
}