Commit 0022744e authored by flothoni's avatar flothoni Committed by Mathieu Giraud

ajax_indicator; move the server message at the side of spinner

link to #3535
parent e406f31b
......@@ -302,8 +302,9 @@
</div></div>
</div>
<div style="float: right; margin: 5px;" id='live-ajax'>
<div class="active-container">
<img src="images/ajax-loader.gif" />
<div style="float: right; margin: 5px;" id='live-ajax-icon'>
</div>
<div style="float: right; margin: 5px;" id='live-ajax-msg'>
</div>
</div>
......
......@@ -1094,8 +1094,8 @@ Database.prototype = {
*/
ajax_indicator_start: function() {
if (!(this.uploader.is_uploading())) {
var tgt = $('#live-ajax');
tgt.empty();
$('#live-ajax-icon').empty();
$('#live-ajax-msg').empty();
$('body').css('cursor', 'wait');
}
},
......@@ -1105,10 +1105,8 @@ Database.prototype = {
*/
ajax_indicator_long: function() {
if (!(this.uploader.is_uploading())) {
var tgt = $('#live-ajax');
tgt.empty();
$('<img/>', {src: 'images/ajax-loader.gif'}).appendTo($('<div/>', {class: 'active-container'}).appendTo(tgt));
$('body').css('cursor', 'wait');
var live_icon = document.getElementById("live-ajax-icon")
$('<img/>', {src: 'images/ajax-loader.gif'}).appendTo(live_icon)
}
},
......@@ -1118,16 +1116,15 @@ Database.prototype = {
*/
ajax_indicator_msg: function(message) {
if (!(this.uploader.is_uploading())) {
var tgt = $('#live-ajax');
tgt.empty();
if (message == undefined) { message = "The page waiting the answer of the server. Please wait and don't reclick (server overload)"}
console.log({"type": "flash", "msg": message , "priority": 2});
if (message == undefined) { message = "Waiting the answer of the server"}
var div_msg = document.getElementById("live-ajax-msg")
div_msg.innerHTML = message
}
},
ajax_indicator_stop: function() {
var tgt = $('#live-ajax');
tgt.empty();
$('#live-ajax-icon').empty();
$('#live-ajax-msg').empty();
$('body').css('cursor', 'default');
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment