projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b1294d1
)
wowzers! we can survive a server problem now. put the original div text back if...
author
Art Cancro
<ajc@citadel.org>
Wed, 14 Feb 2018 23:25:50 +0000
(18:25 -0500)
committer
Art Cancro
<ajc@citadel.org>
Wed, 14 Feb 2018 23:25:50 +0000
(18:25 -0500)
webcit-ng/static/js/views.js
patch
|
blob
|
history
diff --git
a/webcit-ng/static/js/views.js
b/webcit-ng/static/js/views.js
index 7e10e3668b5d3b79a2499d9e79a826c20adacfe5..12642210f40a46b3b65b7ecd6e3bc32c4347e038 100644
(file)
--- a/
webcit-ng/static/js/views.js
+++ b/
webcit-ng/static/js/views.js
@@
-52,6
+52,7
@@
function render_room_view(gt_msg, lt_msg)
//
function forum_readmessages(target_div, gt_msg, lt_msg)
{
//
function forum_readmessages(target_div, gt_msg, lt_msg)
{
+ original_text = document.getElementById(target_div).innerHTML; // in case we need to replace it after an error
document.getElementById(target_div).innerHTML =
"<i class=\"fas fa-spinner fa-spin\"></i> "
+ _("Loading messages from server, please wait") ;
document.getElementById(target_div).innerHTML =
"<i class=\"fas fa-spinner fa-spin\"></i> "
+ _("Loading messages from server, please wait") ;
@@
-130,8
+131,7
@@
function forum_readmessages(target_div, gt_msg, lt_msg)
}
else
{
}
else
{
- document.getElementById(target_div).innerHTML = "error put it back";
- alert("ERROR " + this.status + " retrieving messages from server");
+ document.getElementById(target_div).innerHTML = original_text; // this will make the link reappear so the user can try again
}
}
};
}
}
};