]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/skins/default/templates/question_edit_tips.html
osqa-23
[osqa.git] / forum / skins / default / templates / question_edit_tips.html
index a391ecad8601c3c7087ead61845642755aa1ac56..7e1bafe217b82b3b3477e02e232380fe32c296d8 100644 (file)
@@ -1,5 +1,24 @@
 <!-- question_edit_tips.html -->
 {% load i18n %}
+{% block forejs %}
+        <script type="text/javascript">
+            var currentSideBar = 'div#title_side_bar';
+            function changeSideBar(enabled_bar) {
+                $(currentSideBar).hide();
+                currentSideBar = enabled_bar;
+                $(currentSideBar).fadeIn('slow');
+
+            }
+            $(function () {
+                $('div#editor_side_bar').hide();
+                $('div#tags_side_bar').hide();
+
+                $('input#id_title').focus(function(){changeSideBar('div#title_side_bar')});
+                $('textarea#editor').focus(function(){changeSideBar('div#editor_side_bar')});
+                $('input#id_tags').focus(function(){changeSideBar('div#tags_side_bar')});
+            });
+        </script>
+{% endblock %}
 <div class="boxC" id="title_side_bar">
     <p class="subtitle darkred">{% trans "Title Tips" %}</p>
     <div>
@@ -57,7 +76,7 @@
 </div>
 
 <div class="boxC" id="tags_side_bar" align="left">
-    <p class="subtitle darkred">{% trans "What Are Tabs" %}</p>
+    <p class="subtitle darkred">{% trans "What Are Tags" %}</p>
     <ul class="list-item">
         <li>
             {% trans "Tags are words that will tell others what this question proteins to." %}