Built files from Bizgaze WebServer
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

documents.min.js 8.9KB

12345678
  1. var Unibase;(function(n){let t;(function(t){let i;(function(t){let i;(function(t){class i extends n.Platform.Core.BaseComponent{constructor(){super(...arguments);this.ej2Source={Excel:["libs/syncfusion/excel/ej2-excel.min.js"],Pdf:["libs/syncfusion/pdf/ej2-pdf.min.js"],Word:["libs/syncfusion/word/ej2-word.min.js"]}}jsFiles(){return["apps/collaboration/managers/documentmanager.js"]}cssFiles(){return[]}loadForm(t,i,r,u,f){var e=this;e.navigationHelper.popup(i,"",n.Apps.Collaboration.Components.Documents.Instance(),function(){var n=f;u!=null&&u()},n.Platform.Helpers.Size.ExtraLarge)}html(){return`<div><div id="DocumentViewer" style="width: 100%;height: 100%" class="DocumentViewer"></div></div>
  2. <div id="dialog-container">
  3. <div id="dialog"></div>
  4. <div id="see-document-status"></div>
  5. <div id="dlgContent" class="dialogContent"></div>
  6. </div><div id="importfile-container"></div>
  7. <div id="copydocument-container"> </div><div id="spreadsheettrim-container">
  8. <div id="removeduplicates"></div><div id="biz-ss-menubar-fullscreendialog"></div><div id="biz-ss-resizetofit-dialog"></div></div>`}load(n,t){var i=this;i._containerid=t}convertDocsToPdfDownload(t){n.Apps.Collaboration.DocumentManager.Instance().ConvertDocstoPdfDownload(t).then(function(t){n.Themes.Compact.Components.Notification.Instance().Downloadfile(t.result)})}previewSpreadSheet(t){let i=n.Apps.Collaboration.DocumentManager.Instance();i.getDocumentFileInfo(t).then(t=>{i.getJsonData(t.result.FileId).then(r=>{i.getCustomJsonData(t.result.FileId).then(i=>{n.Apps.Collaboration.Components.Documents.Instance()._documentId=t.result.FileId,n.Apps.Collaboration.Components.DocConnector.Instance().init(t.result.FileId,t.result.DocumentGroup),this.fileCacheHelper.loadJsFiles(["apps/collaboration/components/sheets/formatpainter.js","apps/collaboration/components/unicloud.js","apps/collaboration/components/sheets/spellcheck.js","apps/collaboration/components/sheets/spellcheck.js","apps/collaboration/components/sheets/autofill.js","apps/collaboration/components/sheets/ribbon.js","apps/collaboration/components/sheets/dialogue.js","apps/collaboration/components/sheets/base.js","apps/collaboration/components/common/download.js","apps/collaboration/enums/enum.js"],()=>{let u=n.Apps.Collaboration.Components.Sheets.Base.Instance();console.log(t);r.result!=null&&r.result!=""&&(u.init(t,r,i),n.Platform.Helpers.NavigationHelper.Instance().hideLoading())})})})})}previewWordDocument(t){n.Apps.Collaboration.DocumentManager.Instance().getDocumentFileInfo(t).then(t=>{n.Apps.Collaboration.DocumentManager.Instance().getJsonData(t.result.FileId).then(i=>{this.fileCacheHelper.loadJsFiles(["apps/collaboration/components/doceditor/base.js","platform/core/helpers/file/filehelper.js","apps/collaboration/components/sheets/base.js","apps/collaboration/components/unicloud.js","apps/collaboration/components/doceditor/ribbon.js","apps/collaboration/components/common/download.js"],()=>{let r=n.Apps.Collaboration.Components.DocEditor.Base.Instance();r.init(t,i);n.Platform.Helpers.NavigationHelper.Instance().hideLoading()})})})}previewPdf(t){n.Apps.Collaboration.DocumentManager.Instance().getDocumentFileInfo(t).then(t=>{this.fileCacheHelper.loadJsFiles(["apps/collaboration/components/pdfviewer/base.js"],()=>{let i=n.Apps.Collaboration.Components.PdfViewer.Base.Instance();i.init(t);n.Platform.Helpers.NavigationHelper.Instance().hideLoading()})})}previewImage(t){n.Apps.Collaboration.DocumentManager.Instance().getDocumentFileInfo(t).then(function(t){for(var i=t.result,e=i.DocumentFileName+"."+i.FileType,u=atob(i.FileData),f=new Array(u.length),r=0;r<u.length;r++)f[r]=u.charCodeAt(r);var o=new Uint8Array(f),s=new Blob([o],{type:i.DocumentGroup+"/"+i.FileType+";base64"}),h=URL.createObjectURL(s);window.open(h,e,"width=600,height=600,scrollbars=yes");n.Platform.Helpers.NavigationHelper.Instance().hideLoading()})}previewDocument(n,t,i){this.documentfileid=n;this.documentGroup=t;$(".unibase_modal_backdrop").removeAttr("style");$(".preloader-it").fadeIn();this.fileCacheHelper.loadJsFiles(["apps/collaboration/managers/documentmanager.js","apps/collaboration/managers/filemanager.js","apps/collaboration/components/sheets/spellcheck.js","apps/collaboration/components/docconnector.js","apps/collaboration/components/unidochub.js","apps/collaboration/components/common/util.js","libs/syncfusion/ej2.min.js","apps/collaboration/components/fullscreen.js"],()=>{this.fileCacheHelper.loadCssFiles(["libs/syncfusion/material.css","libs/syncfusion/custom-css.css","libs/syncfusion/docx.css","libs/syncfusion/spreadsheet-custom.css","libs/syncfusion/pdf.css"],()=>{t=="Image"?this.previewImage(n):t=="Excel"?this.previewSpreadSheet(n,i):t=="Word"?this.previewWordDocument(n):t=="Pdf"&&this.previewPdf(n)})})}downloadDocument(t,i){i=="Excel"?n.Platform.Helpers.FileCacheHelper.Instance().loadJsFile("apps/collaboration/managers/documentmanager.js",function(){var i={FileId:t};n.Apps.Collaboration.DocumentManager.Instance().spreadSheetDownload(i).then(function(t){var i=t.result;i=encodeURIComponent(i);n.Themes.Compact.Components.Notification.Instance().Downloadfile(i)})}):i=="Word"?n.Platform.Helpers.FileCacheHelper.Instance().loadJsFile("apps/collaboration/managers/documentmanager.js",function(){n.Apps.Collaboration.DocumentManager.Instance().getDocumentFileInfo(t).then(function(t){var i=t.result.DocumentFilePath;i=encodeURIComponent(i);n.Themes.Compact.Components.Notification.Instance().Downloadfile(i)})}):n.Platform.Helpers.FileCacheHelper.Instance().loadJsFile("apps/collaboration/managers/documentmanager.js",function(){n.Apps.Collaboration.DocumentManager.Instance().getDocumentFileInfo(t).then(function(n){var t=document.createElement("a");t.href="data:"+n.result.FileType+";base64,"+n.result.FileData;t.download=n.result.FileTitle+"."+n.result.FileType;t.click()})})}deleteDocumentFile(t){bootbox.confirm("Do you want to Delete this File ?",function(i){i==!0&&n.Platform.Files.Managers.FileManager.Instance().deleteDocumentFile(t).then(function(){var t,i;MessageHelper.Instance().showSuccess("Document File Deleted Successfully.","");t=n.Themes.Compact.Components.Details.Instance();t._recordId=n.Themes.Providers.DetailHelper.recordId;t._installedAppId=n.Themes.Providers.DetailHelper.installedAppId;t._containerId=$("._bizgaze_detail_container:visible").attr("id");i=t;t.loadPortlets(i)})})}newWordDoc(t){n.Platform.Helpers.NavigationHelper.Instance().showLoading();this.fileCacheHelper.loadJsFiles(this.ej2Source.Word.concat(["apps/collaboration/managers/documentmanager.js","apps/collaboration/components/sheets/spellcheck.js","apps/collaboration/components/docconnector.js","apps/collaboration/components/unidochub.js","apps/collaboration/components/common/util.js","apps/collaboration/components/fullscreen.js","apps/collaboration/components/sheets/base.js","apps/collaboration/components/doceditor/base.js","apps/collaboration/components/doceditor/ribbon.js","apps/collaboration/components/common/download.js","apps/collaboration/enums/enum.js"]),()=>{this.fileCacheHelper.loadCssFiles(["libs/syncfusion/material.css","libs/syncfusion/custom-css.css","libs/syncfusion/docx.css","libs/syncfusion/spreadsheet-custom.css","libs/syncfusion/pdf.css"],()=>{let i=n.Apps.Collaboration.Components.DocEditor.Base.Instance();i.init({result:{FileTitle:"Untitled Document",NewDocument:!0,NewUpload:!0}},{result:""},t);n.Platform.Helpers.NavigationHelper.Instance().hideLoading()})})}newExcel(t,i){n.Platform.Helpers.NavigationHelper.Instance().showLoading();this.fileCacheHelper.loadJsFiles(["apps/collaboration/components/sheets/formatpainter.js","apps/collaboration/components/unicloud.js","apps/collaboration/components/docconnector.js","libs/syncfusion/ej2.min.js","apps/collaboration/components/fullscreen.js","apps/collaboration/components/sheets/spellcheck.js","apps/collaboration/components/sheets/autofill.js","apps/collaboration/components/sheets/ribbon.js","apps/collaboration/components/sheets/dialogue.js","apps/collaboration/components/sheets/base.js","apps/collaboration/components/common/download.js","apps/collaboration/components/common/util.js","apps/collaboration/enums/enum.js"],()=>{this.fileCacheHelper.loadCssFiles(["libs/syncfusion/material.css","libs/syncfusion/custom-css.css","libs/syncfusion/docx.css","libs/syncfusion/spreadsheet-custom.css","libs/syncfusion/pdf.css"],()=>{var r,f={result:{FileTitle:"Untitled Spreadsheet",NewDocument:!0,NewUpload:!0,folderId:r}},u;r=t!=0&&t!=undefined?parseInt(atob(t)):0;u=n.Apps.Collaboration.Components.Sheets.Base.Instance();u.init(f,{result:""},{result:""},i);n.Platform.Helpers.NavigationHelper.Instance().hideLoading()})})}static Instance(){return this.instance===undefined&&(this.instance=new i),this.instance}}t.Documents=i;class r{}t.sfdtexport=r})(i=t.Components||(t.Components={}))})(i=t.Collaboration||(t.Collaboration={}))})(t=n.Apps||(n.Apps={}))})(Unibase||(Unibase={}));