changeset 1386:ab98b4172d5a

fix for #191 part 2 - fix bugs created by eliminating html validation errors on Global Index page
author Roger Haase <crosseyedpenguin@yahoo.com>
date Thu, 14 Jun 2012 07:14:21 -0700
parents 895720920d4f
children 3989635de0fb 339668f8ad06
files MoinMoin/static/js/index_action.js MoinMoin/templates/forms.html MoinMoin/templates/index.html MoinMoin/themes/foobar/templates/index.html MoinMoin/themes/modernized/static/css/common.css
diffstat 5 files changed, 9 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/static/js/index_action.js	Mon Jun 11 20:28:44 2012 -0700
+++ b/MoinMoin/static/js/index_action.js	Thu Jun 14 07:14:21 2012 -0700
@@ -106,11 +106,11 @@
     "use strict";
     $(".moin-contenttypes-wrapper").children("div").click(function () {
         var wrapper = $(this).parent();
-        if (wrapper.find("ul:visible").length) {
-            $(".moin-contenttypes-wrapper").find("ul").fadeOut(200);
+        if (wrapper.find("form:visible").length) {
+            $(".moin-contenttypes-wrapper").find("form").fadeOut(200);
             $(this).removeClass().addClass("ct-hide");
         } else {
-            $(".moin-contenttypes-wrapper").find("ul").fadeIn(200);
+            $(".moin-contenttypes-wrapper").find("form").fadeIn(200);
             $(this).removeClass().addClass("ct-shown");
         }
     });
--- a/MoinMoin/templates/forms.html	Mon Jun 11 20:28:44 2012 -0700
+++ b/MoinMoin/templates/forms.html	Thu Jun 14 07:14:21 2012 -0700
@@ -35,7 +35,7 @@
        to the input id attribute. This is needed so the id will match the for attribute
        in the matching label generated 2 lines below.
     #}
-    {{ gen.input(field, type=field_type, auto_value=False) }}
+    {{ gen.input(field, type=field_type, auto_value=False, checked="checked") }}
     {{ render_errors(field) }}
     {{ gen.label(field) }}
     <span class="helper-text">
--- a/MoinMoin/templates/index.html	Mon Jun 11 20:28:44 2012 -0700
+++ b/MoinMoin/templates/index.html	Thu Jun 14 07:14:21 2012 -0700
@@ -159,9 +159,9 @@
                 <form action={{ url_for('.ajaxmodify') }} method="post">
                     <label for="moin-newitem">{{ _("Item name") }}</label>
                     {% if item_name %}
-                        <input type="text" id="moin-newitem" placeholder="{{ _("Enter item name here") }}" value="{{ item_name }}/" required="required"/>
+                        <input type="text" id="moin-newitem" name="newitem" placeholder="{{ _("Enter item name here") }}" value="{{ item_name }}/" required="required"/>
                     {% else %}
-                        <input type="text" id="moin-newitem" placeholder="{{ _("Enter item name here") }}" required="required"/>
+                        <input type="text" id="moin-newitem" name="newitem" placeholder="{{ _("Enter item name here") }}" required="required"/>
                     {% endif %}
                     <br/>
                     <input type="submit" value="{{ _("Create") }}"/>
--- a/MoinMoin/themes/foobar/templates/index.html	Mon Jun 11 20:28:44 2012 -0700
+++ b/MoinMoin/themes/foobar/templates/index.html	Thu Jun 14 07:14:21 2012 -0700
@@ -56,7 +56,6 @@
                     {{ forms.render_filter_field(gen, form['video_items'], 'checkbox', contenttype_groups['video items']) }}
                     {{ forms.render_filter_field(gen, form['other_items'], 'checkbox', contenttype_groups['other items']) }}
                     {{ forms.render_filter_field(gen, form['unknown_items'], 'checkbox', unknown_items_label) }}
-
                 </ul>
                 {{ gen.input(form['submit'], type='submit') }}
                 {{ gen.form.close() }}
@@ -153,9 +152,9 @@
                 <form action={{ url_for('.ajaxmodify') }} method="post">
                     <label for="moin-newitem">{{ _("Item name") }}</label>
                     {% if item_name %}
-                        <input type="text" id="moin-newitem" placeholder="{{ _("Enter item name here") }}" value="{{ item_name }}/" required="required"/>
+                        <input type="text" id="moin-newitem" name="newitem" placeholder="{{ _("Enter item name here") }}" value="{{ item_name }}/" required="required"/>
                     {% else %}
-                        <input type="text" id="moin-newitem" placeholder="{{ _("Enter item name here") }}" required="required"/>
+                        <input type="text" id="moin-newitem" name="newitem" placeholder="{{ _("Enter item name here") }}" required="required"/>
                     {% endif %}
                     <br/>
                     <input type="submit" value="{{ _("Create") }}"/>
--- a/MoinMoin/themes/modernized/static/css/common.css	Mon Jun 11 20:28:44 2012 -0700
+++ b/MoinMoin/themes/modernized/static/css/common.css	Thu Jun 14 07:14:21 2012 -0700
@@ -256,7 +256,7 @@
 .moin-contenttypes-wrapper div { cursor: pointer; margin: 0.1em; padding: 0.5em 1.2em 0.5em 0.5em ; height: 1em; }
 div.ct-shown { background: #4477FF url("../img/moin-movedown.png") no-repeat center right; color: #FFFFFF; }
 div.ct-hide { background: transparent url("../img/moin-moveup.png") no-repeat center right; }
-.moin-contenttypes-wrapper ul { position: absolute; top: 1.9em; left: 0; display: none; margin: 0.3em 0; border-top: 1px solid #E5E5E5; z-index: 2; background: #FFFFFF; border: 1px solid #E5E5E5; }
+.moin-contenttypes-wrapper form { position: absolute; top: 1.9em; left: 0; display: none; margin: 0.3em 0; border-top: 1px solid #E5E5E5; z-index: 2; background: #FFFFFF; border: 1px solid #E5E5E5; }
 .moin-contenttypes-wrapper ul li { list-style-type: none; padding: 0.5em; min-width: 11.5em; }
 .moin-contenttypes-wrapper ul li label { margin-left: 0.5em; }
 .moin-contenttypes-wrapper ul li .helper-text { font-size: 0.7em; color: #6E6A6B; display: none; }