X-Git-Url: https://git.openstreetmap.org./osqa.git/blobdiff_plain/410bfa05ee36ed1d99356c443a5f3f6aa3ee9578..07ab188d70f8e090ad79090fb467b7f1c1d72ef9:/forum/skins/default/templates/question.html?ds=sidebyside diff --git a/forum/skins/default/templates/question.html b/forum/skins/default/templates/question.html index b6300d5..466df6a 100644 --- a/forum/skins/default/templates/question.html +++ b/forum/skins/default/templates/question.html @@ -3,6 +3,7 @@ {% load node_tags %} {% load extra_tags %} {% load extra_filters %} +{% load general_sidebar_tags %} {% load smart_if %} {% load humanize %} {% load i18n %} @@ -22,9 +23,23 @@ $().ready(function(){ $("#nav_questions").attr('className',"on"); var answer_sort_tab = "{{ tab_id }}"; - $("#" + answer_sort_tab).attr('className',"on"); + + if (answer_sort_tab) { + $("#" + answer_sort_tab).attr('className',"on"); + } $('#editor').TextAreaResizer(); + + //toggle preview of editor + var display = true; + var txt = "[{% trans "hide preview" %}]"; + $('#pre-collapse').text(txt); + $('#pre-collapse').bind('click', function(){ + txt = display ? "[{% trans "show preview" %}]" : "[{% trans "hide preview" %}]"; + display = !display; + $('#previewer').toggle(); + $('#pre-collapse').text(txt); + }); });