SalesCallAssets = function( options ) { let instance = this; this.interactionId = options.interactionId; this.partnerId = options.partnerId; this.partnerType = options.partnerType; this.rootElement = null; } SalesCallAssets.prototype.constructor = SalesCallAssets; SalesCallAssets.prototype.iconForFileExt = function( fileExt ) { if( ! fileExt ) { return null }; fileExt = fileExt.toUpperCase().replace( /^\s+|\s+$/, "" ); let icon = null; switch ( fileExt ) { case 'PPTX' : icon = "pptxfile"; break; case 'PPT' : icon = "pptfile"; break; case 'TXT' : icon = "textdocument"; break; case 'DOCX' : icon = "docxfile"; break; case 'DOC' : icon = "docfile"; break; case 'PDF' : icon = "pdffile"; break; case 'XLS' : icon = "xlsfile"; break; case 'XLSX' : icon = "xlsxfile"; break; case 'JPG' : case 'TIF' : case 'PNG' : icon = "photo"; break; case 'MP4' : icon = "video"; break; } return icon; } SalesCallAssets.prototype.refresh = function() { //console.log("Refreshing SalesCallAssets"); let gridDataSource = this.dataGrid.getDataSource(); gridDataSource.reload(); } SalesCallAssets.prototype.element = function() { if( this.rootElement ) return this.rootElement; let instance = this; let dataSource = Fse.Data.newDataSource( { object : "BCM.SalesCallAssets", paginate : false, objectParams : { interactionId : instance.interactionId, partnerId : instance.partnerId, partnerType : instance.partnerType, includeNoAssetItems : false } } ); instance.dataGrid = $("