X-Git-Url: https://dev.renevier.net/gitweb.cgi?p=syp.git;a=blobdiff_plain;f=js%2Fadmin.js;h=259c914ae8c446165e8a5c613463687845c5612c;hp=e0a27ea58570c14b946ff4a84f6f7e85659f5e7d;hb=7bd8d49ee21cdbc107c8e3eb99a17d636b79dccd;hpb=fc2dd35ebd3dd2905f7ee24f6622d8dabd32b715 diff --git a/js/admin.js b/js/admin.js index e0a27ea..259c914 100644 --- a/js/admin.js +++ b/js/admin.js @@ -56,12 +56,10 @@ OpenLayers.Control.SypDragFeature = OpenLayers.Class (OpenLayers.Control.DragFea var Admin = { Settings: { - MARKER_ICON: "openlayers/img/marker-blue.png", - MARKER_ICON_HEIGHT: 25, - MARKER_SELECT_ICON: "openlayers/img/marker-green.png", - MARKER_SELECT_ICON_HEIGHT: 25, - MARKER_TEMPORARY_ICON: "openlayers/img/marker-gold.png", - MARKER_TEMPORARY_ICON_HEIGHT: 25 + MARKER_ICON: "media/marker-normal.png", + MARKER_SELECT_ICON: "media/marker-selected.png", + MARKER_TEMPORARY_ICON: "media/marker-temp.png", + MARKER_HEIGHT: 25 }, map: null, @@ -137,18 +135,15 @@ var Admin = { var styleMap = new OpenLayers.StyleMap ( {"default": { externalGraphic: this.Settings.MARKER_ICON, - graphicHeight: this.Settings.MARKER_ICON_HEIGHT - || 32 + graphicHeight: this.Settings.MARKER_HEIGHT || 32 }, "temporary": { externalGraphic: this.Settings.MARKER_TEMPORARY_ICON, - graphicHeight: this.Settings.MARKER_TEMPORARY_ICON_HEIGHT - || 32 + graphicHeight: this.Settings.MARKER_HEIGHT || 32 }, "select": { externalGraphic: this.Settings.MARKER_SELECT_ICON, - graphicHeight: this.Settings.MARKER_SELECT_ICON_HEIGHT - || 32 + graphicHeight: this.Settings.MARKER_HEIGHT || 32 }}); var layer = new OpenLayers.Layer.GML("KML", "items.php", @@ -362,7 +357,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 +385,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 +404,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":