X-Git-Url: https://git.openstreetmap.org./osqa.git/blobdiff_plain/a9eef437702d5df7a2f97010e6798c689371808c..c020cb3ffd56949b581cd812d5ce445d4daf6e44:/forum/skins/default/templates/question_edit.html?ds=inline
diff --git a/forum/skins/default/templates/question_edit.html b/forum/skins/default/templates/question_edit.html
index fe71184..bcc1d48 100644
--- a/forum/skins/default/templates/question_edit.html
+++ b/forum/skins/default/templates/question_edit.html
@@ -4,9 +4,6 @@
{% load extra_tags %}
{% block title %}{% spaceless %}{% trans "Edit question" %}{% endspaceless %}{% endblock %}
{% block forejs %}
-
-
-
@@ -16,10 +13,7 @@
$("#nav_questions").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
var display = true;
var txt = "[{% trans "hide preview" %}]";
@@ -32,8 +26,7 @@
});
//Tags autocomplete action
- var tags = {{ tags|safe }};
- $("#id_tags").autocomplete(tags, {
+ $("#id_tags").autocomplete("/matching_tags", {
matchContains: true,
max: 20,
multiple: true,
@@ -41,22 +34,26 @@
highlightItem: true,
scroll: true,
scrollHeight: 300,
- 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("#fmedit", CPValidator.getQuestionFormRules(), CPValidator.getQuestionFormMessages());
-
+ });
+
$('#id_revision').unbind().change(function(){
$("#select_revision").click();
});
- lanai.highlightSyntax();
-
+
});
{% endblock %}