Skip to content

Commit

Permalink
Version 262:
Browse files Browse the repository at this point in the history
* If UI3 hasn't finished loading after about 3 seconds, a button appears in the loading status box to allow the user to "Open UI Settings".
  • Loading branch information
bp2008 committed Dec 7, 2023
1 parent 4805a98 commit 945b8e4
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ui3.htm
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
};
</script>
<script type="text/javascript">
var ui_version = "261";
var ui_version = "262";
var bi_version = "%%VERSION%%";
var appPath_raw = "%%VIRTDIR%%";
var local_bi_session = "%%SESSION%%";
Expand Down Expand Up @@ -116,7 +116,7 @@
<div id="svgContainer" style="display: none;"></div>
<div id="loadingmsgwrapper" style="position:absolute;width:100%;height:100%;background-color:rgba(0,0,0,0.75);z-index:99999;font-family:Consolas, monospace, Sans-Serif">
<div style="position: absolute;left:50%;top:50%;overflow:visible;white-space:nowrap;">
<div style="position:relative;transform: translate(-50%, -50%);border:2px solid #444444;color:#666666;background-color:#212325;padding:5px;text-align:center;border-radius:10px;">
<div class="loadingmsgcontent" style="position:relative;transform: translate(-50%, -50%);border:2px solid #444444;color:#666666;background-color:#212325;padding:5px;text-align:center;border-radius:10px;">
<div style="margin-bottom:5px;">
<img mysrc="ui3/ajax-loader-big.gif" alt="Loading ..." />
</div>
Expand Down
20 changes: 20 additions & 0 deletions ui3/ui3.js
Original file line number Diff line number Diff line change
Expand Up @@ -29621,6 +29621,7 @@ function LoadingHelper()
resized();
videoPlayer.Initialize();
ShowIEWarning();
BI_CustomEvent.RemoveListener("UI_Settings_Closing", uiSettingsClosingHandler);
BI_CustomEvent.Invoke("FinishedLoading");
}
this.DidLoadingFinish = function ()
Expand All @@ -29631,6 +29632,24 @@ function LoadingHelper()
{
return loadingFinishedAtServerTime;
}
function uiSettingsClosingHandler()
{
$("#loadingmsgwrapper").css("z-index", 99999);
$("body").addClass("uiIsLoading");
}
var loadingStallTimeout = setTimeout(function ()
{
BI_CustomEvent.AddListener("UI_Settings_Closing", uiSettingsClosingHandler);
var $btn = $('<div class="loadinglabel" style="text-align:center"><a href="javascript:void(0)" style="color:#8DF;padding:2px 0px">Open UI Settings</a></div>');
$btn.find("a").on("click", function ()
{
$("#loadingmsgwrapper").css("z-index", 999);
$("body").removeClass("uiIsLoading");
uiSettingsPanel.open();
});
$("#loadingmsgwrapper .loadingmsgcontent").append($btn);
}, 3000);

$(window).load(function ()
{
self.SetLoadedStatus("window");
Expand Down Expand Up @@ -31819,6 +31838,7 @@ function UISettingsPanel()
title: "UI Settings"
, overlayOpacity: 0.3
, closeOnOverlayClick: true
, onClosing: function () { BI_CustomEvent.Invoke("UI_Settings_Closing"); }
});

self.Refresh();
Expand Down

0 comments on commit 945b8e4

Please sign in to comment.