allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jetm...@apache.org
Subject [45/50] allura git commit: [#7922] ticket:834 Change menu header to h3/link
Date Thu, 13 Aug 2015 18:07:12 GMT
[#7922] ticket:834 Change menu header to h3/link


Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/d8de1714
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/d8de1714
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/d8de1714

Branch: refs/heads/ib/7922
Commit: d8de17143566ebf3b7a97359c3428d04d2f8c03d
Parents: e7a08f8
Author: Igor Bondarenko <jetmind2@gmail.com>
Authored: Thu Aug 13 18:37:58 2015 +0300
Committer: Igor Bondarenko <jetmind2@gmail.com>
Committed: Thu Aug 13 18:37:58 2015 +0300

----------------------------------------------------------------------
 Allura/allura/app.py                            |  1 -
 Allura/allura/nf/allura/css/allura.css          |  4 ++-
 .../templates/jinja_master/sidebar_menu.html    | 35 ++++++--------------
 3 files changed, 14 insertions(+), 26 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/d8de1714/Allura/allura/app.py
----------------------------------------------------------------------
diff --git a/Allura/allura/app.py b/Allura/allura/app.py
index f060204..28ff19e 100644
--- a/Allura/allura/app.py
+++ b/Allura/allura/app.py
@@ -632,7 +632,6 @@ class Application(object):
         """Returns button for showing/hiding admin sidebar menu"""
         return SitemapEntry(
             label='Admin',
-            url='#',
             extra_html_attrs={
                 'id': 'sidebar-admin-menu-trigger',
             })

http://git-wip-us.apache.org/repos/asf/allura/blob/d8de1714/Allura/allura/nf/allura/css/allura.css
----------------------------------------------------------------------
diff --git a/Allura/allura/nf/allura/css/allura.css b/Allura/allura/nf/allura/css/allura.css
index 17ee342..2fb97ed 100644
--- a/Allura/allura/nf/allura/css/allura.css
+++ b/Allura/allura/nf/allura/css/allura.css
@@ -86,4 +86,6 @@ tr.rev div.markdown_content p {
 
 #phone_verification_overlay iframe {
     height: 320px;
-}
\ No newline at end of file
+}
+
+#sidebar-admin-header { cursor: pointer; }

http://git-wip-us.apache.org/repos/asf/allura/blob/d8de1714/Allura/allura/templates/jinja_master/sidebar_menu.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/jinja_master/sidebar_menu.html b/Allura/allura/templates/jinja_master/sidebar_menu.html
index 752440c..4505804 100644
--- a/Allura/allura/templates/jinja_master/sidebar_menu.html
+++ b/Allura/allura/templates/jinja_master/sidebar_menu.html
@@ -55,35 +55,22 @@
     {% endif %}
     {% if c.app %}
       {% if h.has_access(c.app, 'admin')() %}
-        <style>
-          #sidebar-admin-menu.hide ul li:not(:first-child) {
-            display: none;
-          }
-          #sidebar-admin-menu.hide ul li:first-child {
-            border-bottom: medium none;
-          }
-        </style>
-        <div id='sidebar-admin-menu' class='hide'>
-        {% for s in c.app.admin_menu() %}
-          {% if loop.first %}
+        {% if c.app.admin_menu() %}
+          <a id='sidebar-admin-header' onclick='$("#sidebar-admin-menu").toggleClass("hidden");'>
             {{sidebar_item(c.app.admin_menu_collapse_button)}}
-            <script>
-              $('#sidebar-admin-menu-trigger').click(function(e) {
-                e.preventDefault();
-                $(this).parents('li').toggleClass('active');
-                $('#sidebar-admin-menu').toggleClass('hide');
-              });
-            </script>
-          {% endif %}
-          {{sidebar_item(s)}}
-        {% endfor %}
-        {{sidebar_item(c.app.admin_menu_delete_button)}}
-        {{sidebar_item(None)}}
+          </a>
+          <div id='sidebar-admin-menu' class='hidden'>
+            {% for s in c.app.admin_menu() %}
+              {{sidebar_item(s)}}
+            {% endfor %}
+            {{sidebar_item(c.app.admin_menu_delete_button)}}
+            {{sidebar_item(None)}}
+          </div>
+        {% endif %}
         {{c.app.admin_modal.display()}}
         {% if c.app.admin_menu_delete_button %}
           {{c.app.admin_tool_delete_modal.display()}}
         {% endif %}
-        </div>
       {% endif %}
       {% for s in c.app.sidebar_menu() %}
         {{sidebar_item(s)}}


Mime
View raw message