1function ExportModal() { 2 this.title = ""; 3 this.getExportModalUrl = ""; 4 this.performExportUrl = ""; 5 this.modal = {}; 6} 7 8ExportModal.prototype.init = function (options) { 9 var self = this; 10 var alreadyParsedAsJson = typeof (options) === "object"; 11 if (!alreadyParsedAsJson) 12 options = JSON.parse(options); 13 self.title = options.title; 14 self.getExportModalUrl = options.getExportModalUrl; 15 self.performExportUrl = options.performExportUrl; 16 self.openModal(); 17}; 18 19ExportModal.prototype.openModal = function () { 20 var self = this; 21 self.modal = openCpModal({ 22 title: self.title, 23 className: 'modalExport modalContainerCP adminWrap form', 24 url: self.getExportModalUrl, 25 autoAdjust: false, 26 isFrontEnd: false, 27 onLoadComplete: () => self.modalOpened() 28 }); 29}; 30 31ExportModal.prototype.modalOpened = function () { 32 var self = this; 33 //Bind Export and Cancel buttons on the modal 34 $("#lnkStartExport").on("click", function () { 35 var idsToExport = []; 36 $("input:checkbox[name=category]:checked").each(function () { 37 idsToExport.push($(this).val()); 38 }); 39 40 if (idsToExport && idsToExport.length <= 0) { 41 alert('No categories are selected that can be exported.'); 42 return; 43 } 44 else { 45 window.open(self.performExportUrl + '?categoryIdsToExport=' + idsToExport.join(',')); 46 } 47 }); 48 49 $("#lnkCancelExportModal").on("click", function () { 50 hideModal('modalExport'); 51 }); 52}; 53 54window.ExportModalInstance = window.ExportModalInstance || new ExportModal();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.