]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/skins/default/media/js/osqa.admin.js
Shows user diamonds in some missing spots, and adds some improvements to module decor...
[osqa.git] / forum / skins / default / media / js / osqa.admin.js
index 634f4c8fcfb8694739e24bf54e28b5f69c36f9be..b7e6a1c2395462fc40466577bd44860cb79e9eb3 100644 (file)
@@ -41,4 +41,21 @@ $(function() {
             }\r
         }\r
     });\r
+\r
+    $('.url_field').each(function() {\r
+        var $input = $(this);\r
+        var $anchor = $input.parent().find('.url_field_anchor');\r
+        var app_url = $anchor.attr('href');\r
+\r
+        function rewrite_anchor() {\r
+            var val = app_url + '/' +  $input.val();\r
+\r
+            $anchor.attr('href', val);\r
+            $anchor.html(val);\r
+\r
+        }\r
+\r
+        $input.keyup(rewrite_anchor);\r
+        rewrite_anchor();        \r
+    });\r
 });
\ No newline at end of file