]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/skins/default/templates/question.html
osqa-5:
[osqa.git] / forum / skins / default / templates / question.html
index 0a75abae5fc4cd4a9baa6e0cfdc7c46762866322..47e654a68d70168209ba70fc75d7da6178f87c34 100644 (file)
             $("#" + answer_sort_tab).attr('className',"on");\r
 \r
             $('#editor').TextAreaResizer();\r
+            \r
+            //toggle preview of editor\r
+            var display = true;\r
+            var txt = "[{% trans "hide preview" %}]";\r
+            $('#pre-collapse').text(txt);\r
+            $('#pre-collapse').bind('click', function(){\r
+                txt = display ? "[{% trans "show preview" %}]" : "[{% trans "hide preview" %}]";\r
+                display = !display;\r
+                $('#previewer').toggle();\r
+                $('#pre-collapse').text(txt);\r
+            });\r
         });\r
         </script>\r
         <noscript>\r