changeset 2407:b5c19850f8fd

dropdowns in history view now work without JS
author sharky93 <rishabhr123@gmail.com>
date Sat, 24 Aug 2013 01:11:09 +0530
parents 291f5510d650
children e0736d533b8f
files MoinMoin/templates/basic.js MoinMoin/themes/basic/static/css/common.css MoinMoin/themes/basic/static/css/custom.css MoinMoin/themes/basic/templates/history.html MoinMoin/themes/basic/templates/layout.html
diffstat 5 files changed, 40 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/templates/basic.js	Wed Aug 21 23:54:00 2013 +0530
+++ b/MoinMoin/templates/basic.js	Sat Aug 24 01:11:09 2013 +0530
@@ -12,4 +12,6 @@
     		return "You have unsaved changes!";
     	}
     }
+    $('div.dropup').removeClass('menu');
+    $('ul.dropdown-menu').removeClass('submenu');
 });
--- a/MoinMoin/themes/basic/static/css/common.css	Wed Aug 21 23:54:00 2013 +0530
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,9 +0,0 @@
-html{
-  overflow-y:scroll;
-}
-.moin-hist-rev {
-	text-align: center;
-}
-#moin-button-diff {
-	text-align: center;
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MoinMoin/themes/basic/static/css/custom.css	Sat Aug 24 01:11:09 2013 +0530
@@ -0,0 +1,17 @@
+html{
+  overflow-y:scroll;
+}
+.moin-hist-rev {
+	text-align: center;
+}
+#moin-button-diff {
+	text-align: center;
+}
+.menu .submenu {
+	display: none;
+	margin-bottom: 0px;
+}
+.menu:hover .submenu {
+	display: block;
+}
+
--- a/MoinMoin/themes/basic/templates/history.html	Wed Aug 21 23:54:00 2013 +0530
+++ b/MoinMoin/themes/basic/templates/history.html	Sat Aug 24 01:11:09 2013 +0530
@@ -54,20 +54,32 @@
                     <td class="moin-wordbreak">{{ doc.contenttype }}</td>
                     <td class="moin-wordbreak">{{ doc.comment }}</td>
                     <td>
-            <div class="btn-group dropup">
-                        <button class="btn btn-primary btn-sm dropdown-toggle" data-toggle="dropdown"> <span class="caret"></span></button>
-                <ul class="dropdown-menu pull-right"> 
-<li><a href="{{ url_for('frontend.show_item', item_name=doc.name[0], rev=doc.revid) }}" tabindex="-1" href="#">{{ _('show') }}</a></li>
-<li><a href="{{ url_for('frontend.show_item_meta', item_name=doc.name[0], rev=doc.revid) }}" tabindex="-1" href="#">{{ _('meta') }}</a></li>
-<li><a href="{{ url_for('frontend.download_item', item_name=doc.name[0], rev=doc.revid) }}" tabindex="-1" href="#">{{ _('download') }}</a></li>
+            <div class="btn-group dropup menu">
+                        <button class="btn btn-primary btn-sm dropdown-toggle" data-toggle="dropdown">
+                            <span class="caret"></span>
+                        </button>
+                <ul class="dropdown-menu pull-right submenu"> 
+<li>
+    <a href="{{ url_for('frontend.show_item', item_name=doc.name[0], rev=doc.revid) }}" tabindex="-1" href="#">{{ _('show') }}</a></li>
+<li>
+    <a href="{{ url_for('frontend.show_item_meta', item_name=doc.name[0], rev=doc.revid) }}" tabindex="-1" href="#">{{ _('meta') }}</a>
+</li>
+<li>
+    <a href="{{ url_for('frontend.download_item', item_name=doc.name[0], rev=doc.revid) }}" tabindex="-1" href="#">{{ _('download') }}</a>
+</li>
 <li>
     <a href="{{ url_for('frontend.highlight_item', item_name=doc.name[0], rev=doc.revid) }}" tabindex="-1" href="#">{{ _('highlight') }}</a>
 </li>
     {% if user.may.write(item_name) -%}
-    <li><a href="{{ url_for('frontend.revert_item', item_name=doc.name[0], rev=doc.revid) }}" tabindex="-1" href="#">{{ _('revert') }}</a></li>
+        <li>
+            <a href="{{ url_for('frontend.revert_item', item_name=doc.name[0], rev=doc.revid) }}" tabindex="-1" href="#">{{ _('revert') }}</a>
+        </li>
     {%- endif %}
     {% if user.may.destroy(item_name) -%}
-    <li><a href="{{ url_for('frontend.destroy_item', item_name=doc.name[0], rev=doc.revid) }}" tabindex="-1" href="#">{{ _('destroy') }}</a> </li>
+        <li>
+            <a href="{{ url_for('frontend.destroy_item', item_name=doc.name[0], rev=doc.revid) }}" tabindex="-1" href="#">{{ _('destroy') }}
+            </a> 
+        </li>
     {%- endif %}
         </tr>
         {% endfor %}
--- a/MoinMoin/themes/basic/templates/layout.html	Wed Aug 21 23:54:00 2013 +0530
+++ b/MoinMoin/themes/basic/templates/layout.html	Sat Aug 24 01:11:09 2013 +0530
@@ -16,6 +16,7 @@
 {% block head %}
     {{ super() }}
     <link media="all" rel="stylesheet" href="{{ theme_static('css/basic.css') }}" />
+    <link media="all" rel="stylesheet" href="{{ theme_static('css/custom.css') }}" />
 {% endblock %}
 
 {% block layout %}