Commits

Roger Haase committed ab98b41

fix for #191 part 2 - fix bugs created by eliminating html validation errors on Global Index page

Comments (0)

Files changed (5)

MoinMoin/static/js/index_action.js

     "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");
         }
     });

MoinMoin/templates/forms.html

        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">

MoinMoin/templates/index.html

                 <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") }}"/>

MoinMoin/themes/foobar/templates/index.html

                     {{ 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() }}
                 <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") }}"/>

MoinMoin/themes/modernized/static/css/common.css

 .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; }
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.