Built files from Bizgaze WebServer
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

index.html 15KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  1. <!DOCTYPE html>
  2. <html class="app">
  3. <head>
  4. <meta charset="utf-8" />
  5. <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
  6. <title>Bizgaze</title>
  7. <link rel="stylesheet" href="tenants/themes/compact/css/style.ext.css" inline />
  8. <link rel="stylesheet" href="platform/bundle/icon.bundle.min.css" inline />
  9. <link rel="stylesheet" href="platform/bundle/libs/style.min.css" inline />
  10. </head>
  11. <body style="background:#ffffff;">
  12. <div class="preloader-it" id="preloader-it" style="background:transparent"><div class="loader-pendulums">&nbsp;</div></div>
  13. <div id="bizgaze_message"></div>
  14. <div id="bizgaze_body"></div>
  15. <div class="modal-backdrop fade show unibase_modal_backdrop" style="display:none;"></div>
  16. </body>
  17. </html>
  18. <script type="text/javascript" src="settings/settings.js"></script>
  19. <script type="text/javascript" src="platform/bundle/libs/login.library.js"></script>
  20. <script type="text/javascript" src="platform/bundle/index.min.js"></script>
  21. <script type="text/javascript" src="platform/bundle/index.platform.min.js"></script>
  22. <script type="text/javascript">
  23. 'use strict';
  24. function ReloadImage(event) {
  25. let imgelement = $(event.target);
  26. //restricted for empty src
  27. var imgsrc = imgelement.attr('src');
  28. if (imgsrc == null || imgsrc == "" || imgsrc == undefined) {
  29. return;
  30. }
  31. var eventDataLoaded = Number(event.target.dataset['loaded']);
  32. var eventDataDynamic = Number(event.target.dataset['dynamic']);
  33. if (eventDataLoaded == 0 || eventDataLoaded == undefined || isNaN(eventDataLoaded)) { // condition to hit reloadimage event only once
  34. if (eventDataDynamic != undefined && !isNaN(eventDataDynamic) && eventDataDynamic == 1) { // condition to get file from either wwwroot or server
  35. var path = event.target.src.replace("file://" + '/', '');
  36. path = path.replace(window.location.origin + '/', '');
  37. if (isMobileApp()) { // for mobile app
  38. let func = bl_index.GetFileByMobilePath;
  39. Unibase.Platform.Helpers.MobileHelper.Instance().getMobileFilePath(imgelement, path, func);
  40. //var mobileFilePath = Unibase.Platform.Helpers.MobileHelper.Instance().getMobileFilePath().replace(/^\//, ''); // replace method to remove starting slash
  41. //path = path.replace(mobileFilePath + '/', '');
  42. }
  43. else { //for normal screens
  44. if (path != null && path != undefined && path != "") {
  45. var tempPath = path.split("~/");
  46. var checkPath = tempPath[tempPath.length - 1];
  47. var tester = new Image();
  48. tester.onload = function () { // load image if it is in wwwroot without hitting server
  49. imgelement.attr('src', _appsettings.asset_url() + checkPath);
  50. };
  51. tester.onerror = function () { // if image not found in wwwroot hit server and get base64 string
  52. const imgurl = 'apis/v4/Documents/GetFile?path=' + path;
  53. Unibase.Platform.Analytics.Managers.ReportManager.Instance().dataHelper().getAsync(imgurl).then(function (response) {
  54. if (response != null && response != "" && response != undefined) {
  55. let src = '';
  56. if (response.file) {
  57. src = 'data:image/png;base64,' + response.file;
  58. }
  59. else {
  60. src = 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyBpZD0iTGF5ZXJfMSIgZGF0YS1uYW1lPSJMYXllciAxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMiAzMiI+CiAgPGRlZnM+CiAgICA8c3R5bGU+CiAgICAgIC5jbHMtMSB7CiAgICAgICAgZmlsbDogIzgxYTZjNzsKICAgICAgfQoKICAgICAgLmNscy0yIHsKICAgICAgICBmaWxsOiAjNGJlMmFmOwogIC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wuOTMsMi4wOCwyLjA4cy0uOTMsMi4wOC0yLjA4LDIuMDgtMi4wOC0uOTMtMi4wOC0yLjA4LC45My0yLjA4LDIuMDgtMi4wOFoiLz4KICA8L2c+Cjwvc3ZnPg==';
  61. imgelement.addClass("blanded-img");
  62. }
  63. imgelement.attr('src', src);
  64. }
  65. });
  66. };
  67. tester.src = _appsettings.asset_url() + checkPath;
  68. }
  69. imgelement.attr('data-loaded', 1); // change data-loaded attr to 1 so that this method dont hit second time
  70. }
  71. }
  72. else { // condition to load file by just adding serverurl to the path
  73. var path = event.target.src.replace(window.location.origin + '/', '');
  74. if (path != null && path != undefined && path != "") {
  75. var server_url = _appsettings.server_url();
  76. if (!event.target.src.includes(server_url)) {
  77. const src = server_url + "/" + path;
  78. imgelement.attr('src', src);
  79. }
  80. }
  81. imgelement.attr('data-loaded', 1); // change data-loaded attr to 1 so that this method dont hit second time
  82. }
  83. }
  84. }
  85. function sanitizeURL(event) {
  86. let element = $(event.target);
  87. var filePath = event.target.src.replace("file://" + '/', '');
  88. var eventDataLoaded = Number(event.target.dataset['loaded']);
  89. if (eventDataLoaded == 0 || eventDataLoaded == undefined || isNaN(eventDataLoaded)) { // condition to hit reloadimage event only once
  90. element.attr('data-loaded', 1); // change data-loaded attr to 1 so that this method dont hit second time
  91. filePath = filePath.replace(window.location.origin + '/', '');
  92. if (filePath != null && filePath != undefined && filePath != "") {
  93. var tempPath = filePath.split("~/");
  94. var checkPath = tempPath[tempPath.length - 1];
  95. filePath = checkPath;
  96. }
  97. if (isMobileApp()) { // for mobile app
  98. var mobileFilePath = Unibase.Platform.Helpers.MobileHelper.Instance().getMobileFilePath().replace(/^\//, ''); // replace method to remove starting slash
  99. filePath = filePath.replace(mobileFilePath + '/', '');
  100. var serverURL = _appsettings.server_url();
  101. if (!filePath.includes(serverURL)) {
  102. filePath = serverURL + "/" + filePath;;
  103. }
  104. }
  105. element.attr('src', filePath); // for assinging sanitized path to the element
  106. }
  107. }
  108. if (window.origin.indexOf('localhost') < 0) {
  109. var mapKey = _mapsettings.key();
  110. $.getScript("https://maps.googleapis.com/maps/api/js?key=" + mapKey + "&libraries=places&callback=initMap", function () { });
  111. }
  112. const bl_index = {
  113. init: function () {
  114. //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 () {
  115. // RouteHelper.Instance().setNavigationHelper(new Unibase.Themes.Default.NavigationHelper_new());
  116. // RouteHelper.Instance().init();
  117. //if (_Unibase != undefined) {
  118. // _Unibase.SetTheme('Default');
  119. //}
  120. //});
  121. //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 () {
  122. RouteHelper.Instance().setNavigationHelper(new Unibase.Themes.Compact.NavigationHelper());
  123. Unibase.Themes.Providers.Settings.Instance().SetProviders(function () {
  124. RouteHelper.Instance().init();
  125. })
  126. // var server_url = UrlHelper.Instance().getQueryStringVar("server_url");
  127. },
  128. setMobileHelper: function (osId) {
  129. 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']);
  130. Unibase.Platform.Helpers.MobileHelper.SetInstance(Number(osId));
  131. Unibase.Platform.Helpers.MobileHelper.Instance().setTheme('Compact');
  132. bl_index.init();
  133. },
  134. isAndroid: function () {
  135. if (window['_Unibase']) {
  136. return _Unibase.hasOwnProperty('LoadFileFromAndroid');
  137. }
  138. return false;
  139. },
  140. isIOs: function () {
  141. if (window['webkit']) {
  142. if (window.webkit['messageHandlers']) {
  143. return window.webkit.messageHandlers.hasOwnProperty('LoadFileFromiOs');
  144. }
  145. }
  146. return false;
  147. },
  148. isFlutter: function () {
  149. // if (window['flutter_inappwebview']) {
  150. // return true;
  151. // }
  152. // return false;
  153. if (window['_Bizgaze_F']) {
  154. return true;
  155. }
  156. return false;
  157. },
  158. GetFileByMobilePath: function (imgelement, path, mobilefilePath) {
  159. mobilefilePath = mobilefilePath.replace(/^\//, '');
  160. path = decodeURI(path);
  161. path = path.replace(mobilefilePath + '/', '');
  162. if (path != null && path != undefined && path != "") {
  163. var tempPath = path.split("~/");
  164. var checkPath = tempPath[tempPath.length - 1];
  165. if (!checkPath.includes(_appsettings.asset_url())) {
  166. checkPath = _appsettings.asset_url() + "/" + checkPath;
  167. }
  168. var tester = new Image();
  169. tester.onload = function () { // load image if it is in wwwroot without hitting server
  170. imgelement.attr('src', checkPath);
  171. };
  172. tester.onerror = function () { // if image not found in wwwroot hit server and get base64 string
  173. const imgurl = 'apis/v4/Documents/GetFile?path=' + path;
  174. Unibase.Platform.Analytics.Managers.ReportManager.Instance().dataHelper().getAsync(imgurl).then(function (response) {
  175. if (response != null && response != "" && response != undefined) {
  176. if (response.file != null && response.file != "" && response.file != undefined) {
  177. let src = 'data:image/png;base64,' + response.file;
  178. imgelement.attr('src', src);
  179. }
  180. }
  181. });
  182. };
  183. tester.src = checkPath;
  184. }
  185. imgelement.attr('data-loaded', 1); // change data-loaded attr to 1 so that this method dont hit second time
  186. }
  187. }
  188. window.addEventListener("load", (event) => {
  189. if (bl_index.isAndroid()) bl_index.setMobileHelper(1);
  190. else if (bl_index.isIOs()) bl_index.setMobileHelper(2);
  191. else if (bl_index.isFlutter()) bl_index.setMobileHelper(3);
  192. else bl_index.init();
  193. window.addEventListener('message', function (e) {
  194. //if we get post support message from stage change in help module
  195. if (e.data === 'supportmsg') {
  196. $('#div_Footer').toggleClass('hidden');
  197. if ($('#div_Footer').hasClass('hidden')) {
  198. $('#div_def_body').css('max-height', '100vh')
  199. }
  200. else {
  201. const footerHeight = $("#div_Footer").outerHeight(true);
  202. $('#div_def_body').css('max-height', `calc(100vh - ${footerHeight}px)`);
  203. }
  204. } else {
  205. $('#btn_CloseSupport').click();
  206. if (e == 'ld-frm-ifrme') {
  207. debugger;
  208. }
  209. }
  210. //do stuff
  211. });
  212. //window.setInterval(function () {
  213. // if (feather != null && feather != undefined) { feather.replace(); }
  214. //}, 1000);
  215. });
  216. </script>