X-Git-Url: https://dev.renevier.net/gitweb.cgi?a=blobdiff_plain;f=js%2Fadmin.js;h=c070ff2f8782991412b02fe7098df7ed2be7c3e0;hb=e57c166b46cf9c5961bca1b2241783944277cef5;hp=25e3e8c83c770ac0c8d5438da04fab9aeb4d0bd4;hpb=0feade23ffa41ac299b252a93be4da11bc2a16b7;p=syp.git diff --git a/js/admin.js b/js/admin.js index 25e3e8c..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; @@ -406,7 +409,9 @@ var FeatureMgr = { switch (xml.documentElement.getAttribute("reason")) { case "unauthorized": $("#login_area").show(); + $("#cookie_warning").show(); this.reset(); + Admin.cancelCurrentFeature(); Admin.reset(); break; case "server": @@ -529,10 +534,6 @@ var FeatureMgr = { commError: function (message) { $("#server_comm").text(message); $("#server_comm").removeClass().addClass("error"); - if (message.length) { - // this.move(Admin.currentFeature, Admin.currentFeatureLocation); - // Admin.reset(); - } } }