X-Git-Url: https://git.openstreetmap.org./osqa.git/blobdiff_plain/a9eef437702d5df7a2f97010e6798c689371808c..410bfa05ee36ed1d99356c443a5f3f6aa3ee9578:/forum/skins/default/templates/ask.html diff --git a/forum/skins/default/templates/ask.html b/forum/skins/default/templates/ask.html index 083b01d..35a6c2c 100644 --- a/forum/skins/default/templates/ask.html +++ b/forum/skins/default/templates/ask.html @@ -4,9 +4,6 @@ {% load extra_tags %} {% block title %}{% spaceless %}{% trans "Ask a question" %}{% endspaceless %}{% endblock %} {% block forejs %} - - - @@ -16,10 +13,6 @@ $("#nav_ask").attr('className',"on"); $('#editor').TextAreaResizer(); - //highlight code synctax when editor has new text - $("#editor").typeWatch({highlight: false, wait: 3000, - captureLength: 5, callback: lanai.highlightSyntax}); - //toggle preview of editor //todo remove copy-paste var display = true; @@ -33,25 +26,27 @@ }); //Tags autocomplete action - var tags = {{ tags|safe }}; - $("#id_tags").autocomplete(tags, { + $("#id_tags").autocomplete("/matching_tags", { minChars: 1, matchContains: true, max: 20, multiple: true, multipleSeparator: " ", - formatItem: function(row, i, max) { + /*formatItem: function(row, i, max) { return row.n + " ("+ row.c +")"; }, formatResult: function(row, i, max){ return row.n; + }*/ + formatItem: function(row, i, max, value) { + return row[1].split(".")[0] + " (" + row[1].split(".")[1] + ")"; + }, + + formatResult: function(row, i, max, value){ + return row[0]; } }); - - setupFormValidation("#fmask", CPValidator.getQuestionFormRules(), CPValidator.getQuestionFormMessages()); - lanai.highlightSyntax(); - }); {% endblock %} @@ -88,7 +83,7 @@
- {{ form.wiki }} {{ form.wiki.label_tag }} + | + {{ form.wiki }} {{ form.wiki.label_tag }} | {% endif %} @@ -116,9 +111,9 @@ {{ form.tags.help_text }} {% if not request.user.is_authenticated %} - + {% else %} - + {% endif %}