X-Git-Url: https://dev.renevier.net/?a=blobdiff_plain;f=public%2Fjs%2Fsyj.js;h=0572fce71c7099bcad3f054c04690bf43d194803;hb=95727eb231968e25b764f99d899bf2e044664ab4;hp=5a5d5dbedc51d8895e5d80fe11f37b7081aa05fa;hpb=5fe9a5fef61308515cd1913f0bb7cc4a4ecf0253;p=syj.git diff --git a/public/js/syj.js b/public/js/syj.js index 5a5d5db..0572fce 100644 --- a/public/js/syj.js +++ b/public/js/syj.js @@ -40,6 +40,7 @@ var SyjSaveUI = { enableSubmit: function() { $("geom_submit").disabled = false; + $("geom_accept").disabled = false; this.status = "partial"; return this; }, @@ -47,19 +48,21 @@ var SyjSaveUI = { disableSubmit: function() { $("geom_submit").blur(); $("geom_submit").disabled = true; + $("geom_accept").blur(); + $("geom_accept").disabled = true; this.status = "partial"; return this; } }; -var SYJDataUi = function() { - var deck = null; - var getdeck = function() { +var SYJDataUi = (function() { + var deck = null, + getdeck = function() { if (!deck) { deck = new Deck("data_controls"); } return deck; - } + }; return { viewmode: function() { getdeck().setIndex(0); @@ -67,8 +70,8 @@ var SYJDataUi = function() { editmode: function() { getdeck().setIndex(1); } - } -}(); + }; +}()); OpenLayers.Handler.SyjModifiablePath = OpenLayers.Class(OpenLayers.Handler.ModifiablePath, { mouseup: function(evt) { @@ -227,10 +230,8 @@ var SYJView = { layerOptions = {format: OpenLayers.Format.WKT, projection: WGS84, - styleMap: styleMap.view}; - if (gLoggedInfo.creatorname) { - layerOptions.attribution = SyjStrings.routeBy + ' ' + '' + gLoggedInfo.creatorname + ''; - } + styleMap: styleMap.view, + attribution: SyjStrings.geomAttribution }; this.viewLayer = new OpenLayers.Layer.Vector("View Layer", layerOptions); this.map.addLayers([baseLayer, this.viewLayer]); @@ -260,7 +261,6 @@ var SYJView = { this.messenger.hide(); this.editMode(); this.mode = 'create'; - SyjSaveUI.enableSubmit(); }.bind(this)); } @@ -599,13 +599,15 @@ var SYJUserClass = Class.create(SYJModalClass, { $$("#user_termsofuse_anchor, #geom_termsofuse_anchor").invoke('observe', "click", function(evt) { if (!this.toubox) { - $("termsofusearea").show(); - $("termsofuseiframe").setAttribute("src", evt.target.href); this.toubox = new SimpleBox($("termsofusearea"), { closeMethods: ["onescapekey", "onouterclick", "onbutton"] }); } this.toubox.show(); + if (!$("termsofuseiframe").getAttribute("src")) { + $("termsofusearea").show(); + $("termsofuseiframe").setAttribute("src", evt.target.href); + } evt.stop(); }.bindAsEventListener(this));