Browser Steps - adding 'please wait' text while loading

jinja2-url-template-validate
dgtlmoon 2 years ago
parent 5b281f2c34
commit 0988bef2cd

@ -252,6 +252,7 @@ $(document).ready(function () {
}).done(function (data) { }).done(function (data) {
xpath_data = data.xpath_data; xpath_data = data.xpath_data;
$('#browsersteps-img').attr('src', data.screenshot); $('#browsersteps-img').attr('src', data.screenshot);
$("#loading-status-text").fadeIn();
// This should trigger 'Goto site' // This should trigger 'Goto site'
$('#browser_steps >li:first-child .apply').click(); $('#browser_steps >li:first-child .apply').click();
browserless_seconds_remaining = data.browser_time_remaining; browserless_seconds_remaining = data.browser_time_remaining;
@ -393,6 +394,7 @@ $(document).ready(function () {
400: function () { 400: function () {
// More than likely the CSRF token was lost when the server restarted // More than likely the CSRF token was lost when the server restarted
alert("There was a problem processing the request, please reload the page."); alert("There was a problem processing the request, please reload the page.");
$("#loading-status-text").hide();
} }
} }
}).done(function (data) { }).done(function (data) {
@ -404,12 +406,14 @@ $(document).ready(function () {
$("#browsersteps-img").css('opacity',1); $("#browsersteps-img").css('opacity',1);
$('ul#browser_steps li .control .apply').css('opacity',1); $('ul#browser_steps li .control .apply').css('opacity',1);
browserless_seconds_remaining = data.browser_time_remaining; browserless_seconds_remaining = data.browser_time_remaining;
$("#loading-status-text").hide();
}).fail(function (data) { }).fail(function (data) {
console.log(data); console.log(data);
if (data.responseText.includes("Browser session expired")) { if (data.responseText.includes("Browser session expired")) {
disable_browsersteps_ui(); disable_browsersteps_ui();
} }
apply_buttons_disabled=false; apply_buttons_disabled=false;
$("#loading-status-text").hide();
$('ul#browser_steps li .control .apply').css('opacity',1); $('ul#browser_steps li .control .apply').css('opacity',1);
$("#browsersteps-img").css('opacity',1); $("#browsersteps-img").css('opacity',1);
//$('#browsersteps-selector-wrapper .loader').fadeOut(2500); //$('#browsersteps-selector-wrapper .loader').fadeOut(2500);

@ -160,7 +160,7 @@ User-Agent: wonderbra 1.0") }}
<input type=checkbox id="include_text_elements" > <label for="include_text_elements">Turn on text finder</label> <input type=checkbox id="include_text_elements" > <label for="include_text_elements">Turn on text finder</label>
</div> </div>
<div id="loading-status-text" style="display: none;">Please wait, first browser step can take a little time to load..<div class="spinner"></div></div>
<div class="flex-wrapper" > <div class="flex-wrapper" >
<div id="browser-steps-ui" class="noselect" style="width: 100%; background-color: #eee; border-radius: 5px;"> <div id="browser-steps-ui" class="noselect" style="width: 100%; background-color: #eee; border-radius: 5px;">

Loading…
Cancel
Save