changeset 145:ee999b9f33f5

Add horizontal scrollbar to snippet history box So that when the history is too deeply nested, you can simply scroll to view the rest rather than them being extremely narrow
author dellsystem <ilostwaldo@gmail.com>
date Sun, 14 Oct 2012 16:12:55 -0400
parents 77babc4afe34
children 6573617409e2
files static/css/agora.css static/css/agora.less templates/snippet/snippet_details.djhtml
diffstat 3 files changed, 16 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/static/css/agora.css
+++ b/static/css/agora.css
@@ -39,7 +39,8 @@
 #non-sidebar{display:inline-block;zoom:1;*display:inline;width:710px;padding-right:20px;vertical-align:top;}
 .hint{border:1px solid #60cae1;background:#c3e9f5;padding:10px;margin-bottom:10px;}
 hr{border:0;border-top:1px solid #aaaaaa;margin:5px 0;}
-.tree ul{list-style-type:none;}
+#snippet-history{overflow-x:auto;}#snippet-history ul{white-space:nowrap;padding:0;list-style-type:none;}
+#snippet-history >ul{margin-left:0;}
 #diff{display:none;border:1px solid #e6e6e6;padding:10px;background:#fbfbfb;}#diff .code{white-space:pre-wrap;}
 #diff .gi{background:#DFD;}
 #diff .gu{color:#aaaaaa;}
--- a/static/css/agora.less
+++ b/static/css/agora.less
@@ -231,10 +231,18 @@
     margin: 5px 0;
 }
 
-.tree {
+#snippet-history {
+    overflow-x: auto;
+
     ul {
+        white-space: nowrap;
+        padding: 0;
         list-style-type: none;
     }
+
+    & > ul {
+        margin-left: 0;
+    }
 }
 
 #diff {
--- a/templates/snippet/snippet_details.djhtml
+++ b/templates/snippet/snippet_details.djhtml
@@ -115,7 +115,7 @@
         </p>
     {% else %}
     <form method="get" id="diffform" action="{% url snippet_diff %}">
-      <div class="tree">
+      <div id="snippet-history">
         {% for tree_item,structure in tree|tree_info %}
         {% if structure.new_level %}
         <ul>
@@ -151,10 +151,11 @@
         </ul>
         {% endfor %}
         {% endfor %}
-        <div class="submit">
-          <input type="submit" value="{% trans "Compare" %}"/>
-        </div><!-- closes the .submit div -->
       </div><!-- closes the .tree div -->
+      <br />
+      <div class="submit">
+        <input type="submit" value="{% trans "Compare" %}"/>
+      </div><!-- closes the .submit div -->
     </form>
     {% endif %}
     <br />