123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229 |
- <!DOCTYPE html>
- <html class="app">
- <head>
- <meta charset="utf-8" />
- <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
- <title>Bizgaze</title>
- <link rel="stylesheet" href="tenants/themes/compact/css/style.ext.css" inline />
- <link rel="stylesheet" href="platform/bundle/icon.bundle.min.css" inline />
- <link rel="stylesheet" href="platform/bundle/libs/style.min.css" inline />
- </head>
- <body style="background:#ffffff;">
- <div class="preloader-it" id="preloader-it" style="background:transparent"><div class="loader-pendulums"> </div></div>
- <div id="bizgaze_message"></div>
- <div id="bizgaze_body"></div>
- <div class="modal-backdrop fade show unibase_modal_backdrop" style="display:none;"></div>
- </body>
- </html>
- <script type="text/javascript" src="settings/settings.js"></script>
- <script type="text/javascript" src="platform/bundle/libs/login.library.js"></script>
- <script type="text/javascript" src="platform/bundle/index.min.js"></script>
- <script type="text/javascript" src="platform/bundle/index.platform.min.js"></script>
-
- <script type="text/javascript">
- 'use strict';
-
-
- function ReloadImage(event) {
- let imgelement = $(event.target);
- //restricted for empty src
- var imgsrc = imgelement.attr('src');
- if (imgsrc == null || imgsrc == "" || imgsrc == undefined) {
- return;
- }
- var eventDataLoaded = Number(event.target.dataset['loaded']);
- var eventDataDynamic = Number(event.target.dataset['dynamic']);
- if (eventDataLoaded == 0 || eventDataLoaded == undefined || isNaN(eventDataLoaded)) { // condition to hit reloadimage event only once
- if (eventDataDynamic != undefined && !isNaN(eventDataDynamic) && eventDataDynamic == 1) { // condition to get file from either wwwroot or server
- var path = event.target.src.replace("file://" + '/', '');
- path = path.replace(window.location.origin + '/', '');
- if (isMobileApp()) { // for mobile app
- let func = bl_index.GetFileByMobilePath;
- Unibase.Platform.Helpers.MobileHelper.Instance().getMobileFilePath(imgelement, path, func);
- //var mobileFilePath = Unibase.Platform.Helpers.MobileHelper.Instance().getMobileFilePath().replace(/^\//, ''); // replace method to remove starting slash
- //path = path.replace(mobileFilePath + '/', '');
- }
- else { //for normal screens
- if (path != null && path != undefined && path != "") {
- var tempPath = path.split("~/");
- var checkPath = tempPath[tempPath.length - 1];
- var tester = new Image();
- tester.onload = function () { // load image if it is in wwwroot without hitting server
- imgelement.attr('src', _appsettings.asset_url() + checkPath);
- };
- tester.onerror = function () { // if image not found in wwwroot hit server and get base64 string
- const imgurl = 'apis/v4/Documents/GetFile?path=' + path;
- Unibase.Platform.Analytics.Managers.ReportManager.Instance().dataHelper().getAsync(imgurl).then(function (response) {
- if (response != null && response != "" && response != undefined) {
- let src = '';
- if (response.file) {
- src = 'data:image/png;base64,' + response.file;
- }
- else {
- src = 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyBpZD0iTGF5ZXJfMSIgZGF0YS1uYW1lPSJMYXllciAxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMiAzMiI+CiAgPGRlZnM+CiAgICA8c3R5bGU+CiAgICAgIC5jbHMtMSB7CiAgICAgICAgZmlsbDogIzgxYTZjNzsKICAgICAgfQoKICAgICAgLmNscy0yIHsKICAgICAgICBmaWxsOiAjNGJlMmFmOwogICAgICB9CgogICAgICAuY2xzLTMgewogICAgICAgIGZpbGw6ICMwYTBhMGE7CiAgICAgIH0KCiAgICAgIC5jbHMtNCB7CiAgICAgICAgZmlsbDogI2ZmY2M0YTsKICAgICAgfQogICAgPC9zdHlsZT4KICA8L2RlZnM+CiAgPHBhdGggY2xhc3M9ImNscy0xIiBkPSJNMS4yNyw1LjU5djExLjg1bDUuMzctNS4zNyw5LjQ2LDkuNDYsNC45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44Nmw0LjU5LTQuNTksLjg2LC44Ni00LjU5LDQuNTlabTEzLjEzLTEzLjEzbC04LjE2LDguMTYtMS4wNS0xLjA1Yy0uMS0uMS0uMjctLjEtLjM4LDBsLTQuNzgsNC43OEw2LjgyLDExLjg5cy0uMTItLjA4LS4xOS0uMDgtLjE0LC4wMy0uMTksLjA4TDEuNTMsMTYuOFY1Ljg2SDMwLjQ3djMuNDJaIi8+CiAgICA8cGF0aCBjbGFzcz0iY2xzLTMiIGQ9Ik0zMC44NCwxNC43MWMtLjEtLjA0LS4yMS0uMDItLjI5LC4wNmwtNS42NCw1LjY0czAsMCwwLDBsLTUuODEsNS44MWMtLjA4LC4wOC0uMSwuMTktLjA2LC4yOSwuMDQsLjEsLjE0LC4xNiwuMjUsLjE2aDExLjQ1Yy4xNSwwLC4yNy0uMTIsLjI3LS4yN3YtLjE2czAsMCwwLDBWMTQuOTVjMC0uMTEtLjA2LS4yLS4xNi0uMjVabS0uMzcsMTAuODlsLTEuMjEtMS4yMS0zLjc5LTMuNzksNS01djEwLjAxWm0tMTAuNTUsLjU0bDUuMTctNS4xNywzLjYsMy42LDEuNTYsMS41NmgtMTAuMzNaIi8+CiAgICA8cGF0aCBjbGFzcz0iY2xzLTMiIGQ9Ik0xNy43MywxNS4yOGMxLjQ0LDAsMi42MS0xLjE3LDIuNjEtMi42MXMtMS4xNy0yLjYxLTIuNjEtMi42MS0yLjYxLDEuMTctMi42MSwyLjYxLDEuMTcsMi42MSwyLjYxLDIuNjFabTAtNC42OGMxLjE0LDAsMi4wOCwuOTMsMi4wOCwyLjA4cy0uOTMsMi4wOC0yLjA4LDIuMDgtMi4wOC0uOTMtMi4wOC0yLjA4LC45My0yLjA4LDIuMDgtMi4wOFoiLz4KICA8L2c+Cjwvc3ZnPg==';
- imgelement.addClass("blanded-img");
- }
- imgelement.attr('src', src);
- }
- });
- };
- tester.src = _appsettings.asset_url() + checkPath;
- }
- imgelement.attr('data-loaded', 1); // change data-loaded attr to 1 so that this method dont hit second time
- }
- }
- else { // condition to load file by just adding serverurl to the path
- var path = event.target.src.replace(window.location.origin + '/', '');
- if (path != null && path != undefined && path != "") {
- var server_url = _appsettings.server_url();
- if (!event.target.src.includes(server_url)) {
- const src = server_url + "/" + path;
- imgelement.attr('src', src);
- }
- }
- imgelement.attr('data-loaded', 1); // change data-loaded attr to 1 so that this method dont hit second time
-
- }
- }
- }
- function sanitizeURL(event) {
- let element = $(event.target);
- var filePath = event.target.src.replace("file://" + '/', '');
- var eventDataLoaded = Number(event.target.dataset['loaded']);
- if (eventDataLoaded == 0 || eventDataLoaded == undefined || isNaN(eventDataLoaded)) { // condition to hit reloadimage event only once
- element.attr('data-loaded', 1); // change data-loaded attr to 1 so that this method dont hit second time
- filePath = filePath.replace(window.location.origin + '/', '');
- if (filePath != null && filePath != undefined && filePath != "") {
- var tempPath = filePath.split("~/");
- var checkPath = tempPath[tempPath.length - 1];
- filePath = checkPath;
- }
- if (isMobileApp()) { // for mobile app
- var mobileFilePath = Unibase.Platform.Helpers.MobileHelper.Instance().getMobileFilePath().replace(/^\//, ''); // replace method to remove starting slash
- filePath = filePath.replace(mobileFilePath + '/', '');
- var serverURL = _appsettings.server_url();
- if (!filePath.includes(serverURL)) {
- filePath = serverURL + "/" + filePath;;
- }
- }
- element.attr('src', filePath); // for assinging sanitized path to the element
- }
- }
- if (window.origin.indexOf('localhost') < 0) {
- var mapKey = _mapsettings.key();
- $.getScript("https://maps.googleapis.com/maps/api/js?key=" + mapKey + "&libraries=places&callback=initMap", function () { });
- }
-
- const bl_index = {
- init: function () {
- //Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFiles(['platform/core/helpers/routes/router.js', 'tenants/themes/default/js/navigation/navigationhelper.js', 'tenants/themes/default/js/navigation/navigationhelper_old.js','platform/analytics/components/reportviewer/_reportviewer.js','platform/analytics/components/chartviewer/_chart.js','platform/analytics/managers/reportmanager.js','platform/apps/managers/appmanager.js'], function () {
- // RouteHelper.Instance().setNavigationHelper(new Unibase.Themes.Default.NavigationHelper_new());
- // RouteHelper.Instance().init();
- //if (_Unibase != undefined) {
- // _Unibase.SetTheme('Default');
- //}
- //});
- //Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFiles(['platform/core/helpers/routes/router.js', 'tenants/themes/compact/js/navigation/navigationhelper.js', 'platform/analytics/components/reportviewer/_reportviewer.js', 'platform/analytics/components/chartviewer/_chart.js', 'platform/analytics/managers/reportmanager.js', 'platform/apps/managers/appmanager.js', "/platform/filters/managers/interfaces/ifiltermanager.js", "/platform/filters/managers/filtermanager.js"], function () {
-
- RouteHelper.Instance().setNavigationHelper(new Unibase.Themes.Compact.NavigationHelper());
- Unibase.Themes.Providers.Settings.Instance().SetProviders(function () {
- RouteHelper.Instance().init();
- })
- // var server_url = UrlHelper.Instance().getQueryStringVar("server_url");
- },
- setMobileHelper: function (osId) {
- Unibase.Platform.Helpers.FileCacheHelper.Instance().addCacheFiles(['platform/core/helpers/mobile/basemobilehelper.js', 'platform/core/helpers/mobile/mobilehelper.js', 'platform/core/helpers/mobile/android/androidhelper.js', 'platform/core/helpers/mobile/ios/ioshelper.js', 'platform/core/helpers/mobile/enums/mobilepermissiontype.js', 'platform/core/helpers/mobile/flutter/flutterhelper.js']);
- Unibase.Platform.Helpers.MobileHelper.SetInstance(Number(osId));
- Unibase.Platform.Helpers.MobileHelper.Instance().setTheme('Compact');
- bl_index.init();
- },
- isAndroid: function () {
- if (window['_Unibase']) {
- return _Unibase.hasOwnProperty('LoadFileFromAndroid');
- }
- return false;
- },
- isIOs: function () {
- if (window['webkit']) {
- if (window.webkit['messageHandlers']) {
- return window.webkit.messageHandlers.hasOwnProperty('LoadFileFromiOs');
- }
- }
- return false;
- },
- isFlutter: function () {
- // if (window['flutter_inappwebview']) {
- // return true;
- // }
- // return false;
- if (window['_Bizgaze_F']) {
- return true;
- }
- return false;
- },
- GetFileByMobilePath: function (imgelement, path, mobilefilePath) {
- mobilefilePath = mobilefilePath.replace(/^\//, '');
- path = decodeURI(path);
- path = path.replace(mobilefilePath + '/', '');
- if (path != null && path != undefined && path != "") {
- var tempPath = path.split("~/");
- var checkPath = tempPath[tempPath.length - 1];
- if (!checkPath.includes(_appsettings.asset_url())) {
- checkPath = _appsettings.asset_url() + "/" + checkPath;
- }
- var tester = new Image();
- tester.onload = function () { // load image if it is in wwwroot without hitting server
- imgelement.attr('src', checkPath);
- };
- tester.onerror = function () { // if image not found in wwwroot hit server and get base64 string
- const imgurl = 'apis/v4/Documents/GetFile?path=' + path;
- Unibase.Platform.Analytics.Managers.ReportManager.Instance().dataHelper().getAsync(imgurl).then(function (response) {
- if (response != null && response != "" && response != undefined) {
- if (response.file != null && response.file != "" && response.file != undefined) {
- let src = 'data:image/png;base64,' + response.file;
- imgelement.attr('src', src);
- }
- }
- });
- };
- tester.src = checkPath;
- }
- imgelement.attr('data-loaded', 1); // change data-loaded attr to 1 so that this method dont hit second time
-
- }
- }
-
- window.addEventListener("load", (event) => {
-
- if (bl_index.isAndroid()) bl_index.setMobileHelper(1);
-
- else if (bl_index.isIOs()) bl_index.setMobileHelper(2);
-
- else if (bl_index.isFlutter()) bl_index.setMobileHelper(3);
-
- else bl_index.init();
- window.addEventListener('message', function (e) {
- //if we get post support message from stage change in help module
- if (e.data === 'supportmsg') {
- $('#div_Footer').toggleClass('hidden');
- if ($('#div_Footer').hasClass('hidden')) {
- $('#div_def_body').css('max-height', '100vh')
- }
- else {
- const footerHeight = $("#div_Footer").outerHeight(true);
- $('#div_def_body').css('max-height', `calc(100vh - ${footerHeight}px)`);
- }
- } else {
- $('#btn_CloseSupport').click();
- if (e == 'ld-frm-ifrme') {
- debugger;
- }
- }
- //do stuff
- });
- //window.setInterval(function () {
- // if (feather != null && feather != undefined) { feather.replace(); }
- //}, 1000);
- });
- </script>
|