]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/skins/default/media/js/osqa.admin.js
Adds the option to create static pages with several options to customize its behaviour.
[osqa.git] / forum / skins / default / media / js / osqa.admin.js
index 634f4c8fcfb8694739e24bf54e28b5f69c36f9be..cce64a5daa6acb962e69a2099fd48bffdd1a850a 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