2020-11-02 Fred Gleason <fredg@paravelsystems.com>

* Added a 'donut-spinner' indicator to Webget.

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason 2020-11-02 10:57:33 -05:00
parent 7a14cf44b2
commit 7d87f6e93f
6 changed files with 13 additions and 6 deletions

View File

@ -20536,3 +20536,5 @@
'text/html'.
2020-11-01 Fred Gleason <fredg@paravelsystems.com>
* Incremented the package version to 3.4.1int3.
2020-11-02 Fred Gleason <fredg@paravelsystems.com>
* Added a 'donut-spinner' indicator to Webget.

View File

@ -22,6 +22,7 @@
install-exec-am:
mkdir -p $(DESTDIR)@libexecdir@
cp donut-spinner.gif $(DESTDIR)@libexecdir@
cp greencheckmark.png $(DESTDIR)@libexecdir@
cp redx.png $(DESTDIR)@libexecdir@
cp blueball.png $(DESTDIR)@libexecdir@
@ -187,6 +188,7 @@ install-exec-am:
cp rivendell-32x32.xpm $(DESTDIR)@prefix@/share/X11/fvwm2/pixmaps/rivendell.xpm
uninstall-local:
rm -f $(DESTDIR)@libexecdir@/donut-spinner.gif
rm -f $(DESTDIR)@libexecdir@/greencheckmark.png
rm -f $(DESTDIR)@libexecdir@/redx.png
rm -f $(DESTDIR)@libexecdir@/blueball.png
@ -275,6 +277,8 @@ EXTRA_DIST = admin.xpm\
checkmark.xpm\
cover_art_default-60x60.xcf\
cover_art_default-60x60.xpm\
donut-spinner.gif\
donut-spinner.xcf\
download.xpm\
ex.xpm\
fillstart.xpm\

BIN
icons/donut-spinner.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
icons/donut-spinner.xcf Normal file

Binary file not shown.

View File

@ -500,7 +500,7 @@ void MainObject::ServeForm()
printf(" </td>\n");
printf(" </tr>\n");
printf(" <tr>\n");
printf(" <td>&nbsp;</td>\n");
printf(" <td style=\"text-align: right\" id=\"get_spinner\">&nbsp;</td>\n");
printf(" <td><input type=\"button\" value=\"OK\" id=\"get_button\" onclick=\"ProcessGet()\" disabled></td>\n");
printf(" </tr>\n");
@ -541,7 +541,7 @@ void MainObject::ServeForm()
printf(" </td>\n");
printf(" </tr>\n");
printf(" <tr>\n");
printf(" <td>&nbsp;</td>\n");
printf(" <td style=\"text-align: right\" id=\"put_spinner\">&nbsp;</td>\n");
printf(" <td><input type=\"button\" value=\"OK\" id=\"put_button\" onclick=\"ProcessPut()\" disabled></td>\n");
printf(" </tr>\n");

View File

@ -32,7 +32,7 @@ function ProcessGet()
form.append('title',Id('title').value);
form.append('preset',Id('preset').value);
SendForm(form,"webget.cgi");
SendForm(form,'webget.cgi','get_spinner');
}
@ -46,11 +46,11 @@ function ProcessPut()
form.append('group',Id('group').value);
form.append('filename',Id('filename').files[0]);
SendForm(form,"webget.cgi");
SendForm(form,'webget.cgi','put_spinner');
}
function SendForm(form,url)
function SendForm(form,url,spinner_id)
{
var http=new XMLHttpRequest();
if(http==null) {
@ -60,6 +60,7 @@ function SendForm(form,url)
//
// Send the form
//
Id(spinner_id).innerHTML='<img src="/rd-bin/donut-spinner.gif">';
http.open("POST",url,true);
http.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
http.responseType='blob';
@ -69,7 +70,7 @@ function SendForm(form,url)
// Process the response
//
http.onload=function(e) {
Id(spinner_id).innerHTML='';
var blob=new Blob([this.response],
{type: http.getResponseHeader('content-type')});
var f0=blob.type.split(';');