]> dev.renevier.net Git - syj.git/blobdiff - public/js/syj.js
minor js cleanup
[syj.git] / public / js / syj.js
index 8c48c99e980bc844773f70dbc6af9a8f9d72b16e..5dc305957dd551b6432b657c7623099cd91c6c1d 100644 (file)
@@ -393,7 +393,7 @@ var SYJView = {
             this.map.updateSize();
             this.map.zoomToExtent(this.viewLayer.getDataExtent());
         } else {
-            this.initMaPos(gInitialPos);
+            this.initMapPos(gInitialPos);
         }
 
         $("map-overlay").hide();
@@ -503,7 +503,7 @@ var SYJView = {
         return control;
     },
 
-    initMaPos: function (aPos) {
+    initMapPos: function (aPos) {
         var extent = null, center = null, zoom = 0;
 
         if (aPos.hasOwnProperty('lon') && aPos.hasOwnProperty('lat') && aPos.hasOwnProperty('zoom')) {
@@ -674,6 +674,20 @@ var SYJView = {
           return;
       }
 
+        $('path-profile-content').select('img').each(function(img) {
+            var src = img.src;
+            var found = src.match('foo=bar(\\d*)');
+            var num;
+            if (found) {
+                num = parseInt(found[1], 10);
+                img.src = src.replace(found[0], 'foo=bar' + (num+1));
+            } else if (src.indexOf('?') === -1) {
+                img.src = img.src + '?foo=bar0';
+            } else {
+                img.src = img.src + '&foo=bar0';
+            }
+        });
+
       this.messenger.setMessage(SyjStrings.saveSuccess, "success");
       SYJDataUi.viewmode();
       document.title = $('geom_title').value;
@@ -839,11 +853,11 @@ var SYJUserClass = Class.create(SYJModalClass, {
                 $("termsofuseiframe").setAttribute("src", evt.target.href);
             }
             evt.stop();
-        }).bindAsEventListener(this);
+        }.bindAsEventListener(this));
 
         ["click", "keyup"].each(function (evtName) {
             $$("#user_termsofuse_anchor, #geom_termsofuse_anchor").invoke('observe', evtName, touevt);
-        })
+        });
 
         $$("#login_area_create > a").invoke('observe', 'click',
             function(evt) {