From 2e4b166add373d0a2edcbd8b81babfec7a1b3892 Mon Sep 17 00:00:00 2001 From: arno Date: Thu, 6 Aug 2009 14:48:44 +0200 Subject: [PATCH] add throbber when modifying something in admin editor + rename pwd throbber image --- COPYING.txt | 2 +- inc/templates_admin.php | 6 +++++- js/admin.js | 7 +++++-- .../{newimage_throbber.gif => editor-throbber.gif} | Bin media/{pwd_throbber.gif => pwd-throbber.gif} | Bin 5 files changed, 11 insertions(+), 4 deletions(-) rename media/{newimage_throbber.gif => editor-throbber.gif} (100%) rename media/{pwd_throbber.gif => pwd-throbber.gif} (100%) diff --git a/COPYING.txt b/COPYING.txt index ad60c4f..67f5285 100644 --- a/COPYING.txt +++ b/COPYING.txt @@ -8,7 +8,7 @@ - Jquery is available under both MIT and GPL licences. More informations can be found at http://docs.jquery.com/Licensing -- newimage_throbber.gif and pwd_throbber.gif files have been generated with +- editor-throbber.gif and pwd-throbber.gif files have been generated with http://ajaxload.info/ generator and are free for use. diff --git a/inc/templates_admin.php b/inc/templates_admin.php index c3500dc..3931aa0 100644 --- a/inc/templates_admin.php +++ b/inc/templates_admin.php @@ -135,6 +135,10 @@ if (!$usrtblexists || !$itemstblexists) { +

+ + +

- throbber + throbber

diff --git a/js/admin.js b/js/admin.js index 02c88e3..c070ff2 100644 --- a/js/admin.js +++ b/js/admin.js @@ -362,7 +362,8 @@ var FeatureMgr = { form.find('input[name="fid"]').val(feature.fid); AjaxMgr.add({ form: form, - oncomplete: OpenLayers.Function.bind(this.ajaxReply, this) + oncomplete: OpenLayers.Function.bind(this.ajaxReply, this), + onsend: function() { $("#editor_throbber").css("visibility", "visible"); } }); }, @@ -389,11 +390,13 @@ var FeatureMgr = { } AjaxMgr.add({ form: form, - oncomplete: OpenLayers.Function.bind(this.ajaxReply, this) + oncomplete: OpenLayers.Function.bind(this.ajaxReply, this), + onsend: function() { $("#editor_throbber").css("visibility", "visible"); } }); }, ajaxReply: function (data) { + $("#editor_throbber").css("visibility", "hidden"); if (!data) { this.commError(SypStrings.ServerError); return; diff --git a/media/newimage_throbber.gif b/media/editor-throbber.gif similarity index 100% rename from media/newimage_throbber.gif rename to media/editor-throbber.gif diff --git a/media/pwd_throbber.gif b/media/pwd-throbber.gif similarity index 100% rename from media/pwd_throbber.gif rename to media/pwd-throbber.gif -- 2.39.2