Skip to content

Commit

Permalink
Loading screen added for test connection
Browse files Browse the repository at this point in the history
  • Loading branch information
coderscom committed Mar 15, 2017
1 parent e167b1d commit 5fd41cb
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
15 changes: 15 additions & 0 deletions admin/js/wp-odoo-form-integrator-admin-settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,19 @@
return urlregex.test(textval);
}

$(document).on({
ajaxSend: function(event, request, settings) {
if (settings['data']){
if (settings['data'].match('action=test_odoo_connection')){
if (!$('#loading_gif').hasClass("modal")){
$('#loading_gif').addClass("modal");
}
}
}
},
ajaxStop: function() {
$('#loading_gif').removeClass("modal");
}
});

})( jQuery );
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,5 @@
</table>

</form>
</div>
</div>
<div id="loading_gif"><!-- Place at bottom of page --></div>

0 comments on commit 5fd41cb

Please sign in to comment.