html validation
authorRadek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>
Wed, 21 Dec 2011 13:52:21 +0000 (14:52 +0100)
committerRadek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>
Wed, 21 Dec 2011 13:52:21 +0000 (14:52 +0100)
21 files changed:
apps/catalogue/forms.py
apps/catalogue/models/image.py
apps/catalogue/templates/catalogue/base.html
apps/catalogue/templates/catalogue/book_list/book_list.html
apps/catalogue/templates/catalogue/document_upload.html
apps/catalogue/templates/catalogue/image_table.html
apps/catalogue/templates/catalogue/wall.html
apps/wiki/templates/wiki/document_details_base.html
apps/wiki/templates/wiki/revert_dialog.html
apps/wiki/templates/wiki/save_dialog.html
apps/wiki/templates/wiki/tabs/annotations_view.html
apps/wiki/templates/wiki/tabs/annotations_view_item.html
apps/wiki/templates/wiki/tabs/gallery_view.html
apps/wiki/templates/wiki/tabs/summary_view.html
apps/wiki_img/templates/wiki_img/base.html
apps/wiki_img/templates/wiki_img/document_details_base.html
apps/wiki_img/templates/wiki_img/tabs/motifs_editor.html
apps/wiki_img/templates/wiki_img/tabs/objects_editor.html
redakcja/static/js/wiki_img/view_editor_motifs.js
redakcja/static/js/wiki_img/view_editor_objects.js
redakcja/templates/base.html

index f59b356..26d14aa 100644 (file)
@@ -144,7 +144,7 @@ class ReadonlyBookForm(BookForm):
     def __init__(self, *args, **kwargs):
         ret = super(ReadonlyBookForm, self).__init__(*args, **kwargs)
         for field in self.fields.values():
-            field.widget.attrs.update({"readonly": True})
+            field.widget.attrs.update({"disabled": "disabled"})
         return ret
 
 
@@ -179,5 +179,5 @@ class ReadonlyImageForm(ImageForm):
     def __init__(self, *args, **kwargs):
         ret = super(ReadonlyImageForm, self).__init__(*args, **kwargs)
         for field in self.fields.values():
-            field.widget.attrs.update({"readonly": True})
+            field.widget.attrs.update({"disabled": "disabled"})
         return ret
index 797d27d..558f4c1 100755 (executable)
@@ -84,8 +84,8 @@ class Image(dvcs_models.Document):
             raise AssertionError(_('Invalid Dublin Core') + ': ' + str(e))
 
         valid_about = self.correct_about()
-        assert (picture.picture_info.about == valid_about,
-                _("rdf:about is not") + " " + valid_about)
+        assert picture.picture_info.about == valid_about, \
+                _("rdf:about is not") + " " + valid_about
 
     def accessible(self, request):
         return self.public or request.user.is_authenticated()
index f3ebcd9..65bbf33 100644 (file)
@@ -12,7 +12,7 @@
 <div id="tabs-nav">
 
     <a href="{% url catalogue_document_list %}">
-        <img id="logo" src="{{ STATIC_URL }}img/wl-orange.png" />
+        <img id="logo" src="{{ STATIC_URL }}img/wl-orange.png" alt="Platforma" />
     </a>
 
     <div id="tabs-nav-left">
index 73811ca..f8d18d5 100755 (executable)
@@ -2,7 +2,7 @@
 {% load pagination_tags %}
 
 
-<form name='filter' action=''>
+<form name='filter' action='{{ request.path }}'>
 <input type='hidden' name="title" value="{{ request.GET.title }}" />
 <input type='hidden' name="stage" value="{{ request.GET.stage }}" />
 {% if not viewed_user %}
@@ -45,6 +45,8 @@
                         {% endif %}value="{{ user.username }}">{{ user.first_name }} {{ user.last_name }} ({{ user.count }})</option>
                 {% endfor %}
             </select></th>
+        {% else %}
+            <th style='display: none'></th>
         {% endif %}
 
         <th><select name="status" class="filter">
@@ -70,7 +72,7 @@
             {% endif %}
         {% endwith %}
     {% endfor %}
-    <tr><th class='paginator' colspan="5">
+    <tr><th class='paginator' colspan="6">
         {% paginate %}
         {% blocktrans count c=cnt %}{{c}} book{% plural %}{{c}} books{% endblocktrans %}</th></tr>
     </tbody>
index 87e93e0..a2e8513 100644 (file)
@@ -11,7 +11,7 @@
 {% trans "Please submit a ZIP with UTF-8 encoded XML files. Files not ending with <code>.xml</code> will be ignored." %}
 </p>
 
-<form enctype="multipart/form-data" method="POST" action="">
+<form enctype="multipart/form-data" method="POST" action="{{ request.path }}">
 {% csrf_token %}
 {{ form.as_p }}
 <p><button type="submit">{% trans "Upload" %}</button></p>
index 68293e7..b152946 100755 (executable)
@@ -2,7 +2,7 @@
 {% load pagination_tags %}
 
 
-<form name='filter' action=''>
+<form name='filter' action='{{ request.path }}'>
 <input type='hidden' name="title" value="{{ request.GET.title }}" />
 <input type='hidden' name="stage" value="{{ request.GET.stage }}" />
 {% if not viewed_user %}
index 9227ba1..c277f94 100755 (executable)
@@ -7,7 +7,8 @@
     <li class="{{ item.tag }}{% if not item.user %} anonymous{% endif %}">
         <div class='gravatar'>
             {% if item.get_email %}
-                {% gravatar_img_for_email item.get_email 32 %}
+                <img src="{% gravatar_for_email item.get_email 32 %}"
+                    height="32" width="32" alt='Avatar' />
                 <br/>
             {% endif %}
         </div>
index dbbe7a1..9ef0c33 100644 (file)
@@ -8,7 +8,7 @@
 {% endblock %}
 
 {% block extrabody %}
-<script type="text/javascript" charset="utf-8">
+<script type="text/javascript">
     var STATIC_URL = '{{STATIC_URL}}';
 </script>
 {% compressed_js 'detail' %}
@@ -27,7 +27,7 @@
 </div>
 
 <div id="header">
-    <h1><a href="{% url catalogue_document_list %}"><img src="{{STATIC_URL}}icons/go-home.png"/><a href="{% url catalogue_document_list %}">Strona<br>główna</a></h1>
+    <h1><a href="{% url catalogue_document_list %}"><img src="{{STATIC_URL}}icons/go-home.png" alt="Home" /></a><a href="{% url catalogue_document_list %}">Strona<br/>główna</a></h1>
     <div id="tools">
         <a href="{{ REDMINE_URL }}projects/wl-publikacje/wiki/Pomoc" target="_blank">
         {% trans "Help" %}</a>
index c2fc155..6f1793b 100644 (file)
@@ -1,6 +1,6 @@
 {% load i18n %}
 <div id="revert_dialog" class="dialog" data-ui-jsclass="RevertDialog">
-       <form method="POST" action="">
+       <form method="POST" action="#">
     {% csrf_token %}
        <p>{{ forms.text_revert.comment.label }}</p>
        <p class="help_text">
@@ -36,7 +36,7 @@
        <p data-ui-error-for="__all__"> </p>
 
        <p class="action_area">
-               <button type="submit" class"ok" data-ui-action="revert">{% trans "Revert" %}</button>
+               <button type="submit" class="ok" data-ui-action="revert">{% trans "Revert" %}</button>
                <button type="button" class="cancel" data-ui-action="cancel">{% trans "Cancel" %}</button>
        </p>
        </form>
index 31c5b01..b133045 100644 (file)
@@ -1,6 +1,6 @@
 {% load i18n %}
 <div id="save_dialog" class="dialog" data-ui-jsclass="SaveDialog">
-       <form method="POST" action="">
+       <form method="POST" action="#">
     {% csrf_token %}
        <p>{{ forms.text_save.comment.label }}</p>
        <p class="help_text">
@@ -52,7 +52,7 @@
        <p data-ui-error-for="__all__"> </p>
 
        <p class="action_area">
-               <button type="submit" class"ok" data-ui-action="save">Zapisz</button>
+               <button type="submit" class="ok" data-ui-action="save">Zapisz</button>
                <button type="button" class="cancel" data-ui-action="cancel">Anuluj</button>
        </p>
        </form>
index f7a0851..8e54242 100644 (file)
@@ -15,6 +15,6 @@
     <div class="annotations-list">
     </div>
     <div class="spinner">
-        <img src='/media/static/img/spinner.gif' />
+        <img src='/media/static/img/spinner.gif' alt="Loading" />
     </div>
 </div>
index f478e12..c6165fc 100644 (file)
@@ -1,4 +1,4 @@
 {% load i18n %}
 <li id="AnnotationsPerspective" data-ui-related="side-annotations" data-ui-jsclass="AnnotationsPerspective">
-    <super title="{% trans "Annotations" %}">[1]</super>
+    <sup title="{% trans "Annotations" %}">[1]</sup>
 </li>
index 1176797..03aed93 100644 (file)
@@ -7,7 +7,7 @@
                alt="{% trans "Previous" %}" title="{% trans "Previous" %}"/>
         </button>
         <input type="text" size="3" maxlength="3" value="0" class="page-number" />
-        <span id="imagesCount" id="">/0</span>
+        <span id="imagesCount">/0</span>
         <button class="next-page">
             <img src="{{STATIC_URL}}icons/go-next.png"
                alt="{% trans "Next" %}" title="{% trans "Next" %}"/>
@@ -20,6 +20,6 @@
     <div class="error_message">
     </div>
     <div class="gallery-image">
-        <img src="{{MEDIA_URL}}images/empty.png" />
+        <img src="{{MEDIA_URL}}images/empty.png" alt="no image" />
     </div>
 </div>
index bcea34d..a23b890 100644 (file)
@@ -3,10 +3,10 @@
     <!-- <div class="toolbar">
     </div> -->
     <div id="summary-view">
-               <img class="book-cover" src="{{ STATIC_URL }}img/sample_cover.png">
+               <img class="book-cover" src="{{ STATIC_URL }}img/sample_cover.png" alt="Sample cover" />
 
                <h2>
-                       <label for="title">{% trans "Title" %}:</label>
+                       <label>{% trans "Title" %}:</label>
                        <span data-ui-editable="true" data-edit-target="meta.displayTitle"
                        >{{ chunk.pretty_name }}</span>
                </h2>
                <p>
                        <label>{% trans "Current version" %}:</label>
                        {{ chunk.revision }} ({{ chunk.head.created_at }})
+               </p>
                <p>
                        <label>{% trans "Last edited by" %}:</label>
                        {{ chunk.head.author }}
                </p>
                <p>
-                       <label for="gallery">{% trans "Link to gallery" %}:</label>
+                       <label>{% trans "Link to gallery" %}:</label>
                        <span data-ui-editable="true" data-edit-target="meta.galleryLink"
                        >{{ chunk.book.gallery }}</span>
                </p>
index f88fac3..e512e8d 100644 (file)
@@ -12,7 +12,7 @@
 {% endblock %}
 
 {% block maincontent %}
-<h1><img src="{{ STATIC_URL }}img/logo.png">{% trans "Platforma Redakcyjna" %}</h1>
+<h1><img src="{{ STATIC_URL }}img/logo.png" alt="Home">{% trans "Platforma Redakcyjna" %}</h1>
 <div id="wiki_layout_left_column">
        {% block leftcolumn %}
        {% endblock leftcolumn %}
index 8cba7bf..93c267c 100644 (file)
@@ -8,7 +8,7 @@
 {% endblock %}
 
 {% block extrabody %}
-<script type="text/javascript" charset="utf-8">
+<script type="text/javascript">
     var STATIC_URL = '{{STATIC_URL}}';
 </script>
 {% compressed_js 'wiki_img' %}
@@ -25,7 +25,7 @@
 </div>
 
 <div id="header">
-    <h1><a href="{% url catalogue_document_list %}"><img src="{{STATIC_URL}}icons/go-home.png"/><a href="{% url catalogue_document_list %}">Strona<br>główna</a></h1>
+    <h1><a href="{% url catalogue_document_list %}"><img alt="Home" src="{{STATIC_URL}}icons/go-home.png"/></a><a href="{% url catalogue_document_list %}">Strona<br/>główna</a></h1>
     <div id="tools">
         <a href="{{ REDMINE_URL }}projects/wl-publikacje/wiki/Pomoc" target="_blank">
         {% trans "Help" %}</a>
index b5b6588..c064505 100644 (file)
@@ -1,10 +1,10 @@
 {% load i18n %}
 <div id="motifs-editor" class="editor" style="display: none">
     <div class="toolbar">
-        <input id='tag-name' title='{% trans "Motifs" %}' />
-        <button id='add'>{% trans "Add" %}</button>
+        <input class='tag-name' title='{% trans "Motifs" %}' />
+        <button class='add'>{% trans "Add" %}</button>
 
-        <span id="objects-list">
+        <span class="objects-list">
         </span>
 
         <div class="toolbar-end">
@@ -12,6 +12,6 @@
     </div>
 
     <div class='scrolled'>
-        <img src="{{ document.image.url }}" class='area-selectable' />
+        <img src="{{ document.image.url }}" class='area-selectable' alt="Tagged image" />
     </div>
 </div>
index 686cfa2..b4149e2 100644 (file)
@@ -1,10 +1,10 @@
 {% load i18n %}
 <div id="objects-editor" class="editor" style="display: none">
     <div class="toolbar">
-        <input id='tag-name' title='{% trans "Object name" %}' />
-        <button id='add'>{% trans "Add" %}</button>
+        <input class='tag-name' title='{% trans "Object name" %}' />
+        <button class='add'>{% trans "Add" %}</button>
 
-        <span id="objects-list">
+        <span class="objects-list">
         </span>
 
         <div class="toolbar-end">
@@ -12,6 +12,6 @@
     </div>
 
     <div class='scrolled'>
-        <img src="{{ document.image.url }}" class='area-selectable' />
+        <img src="{{ document.image.url }}" class='area-selectable' alt="Tagged image" />
     </div>
 </div>
index 3b6f45d..11cbef0 100644 (file)
@@ -7,7 +7,7 @@
         options.callback = function(){
             var self = this;
 
-            self.$tag_name = $('#motifs-editor #tag-name');
+            self.$tag_name = $('#motifs-editor .tag-name');
             withThemes(function(canonThemes){
                 self.$tag_name.autocomplete(canonThemes, {
                     autoFill: true,
@@ -17,7 +17,7 @@
                 });
             })
 
-            self.$objects_list = $('#motifs-editor #objects-list');
+            self.$objects_list = $('#motifs-editor .objects-list');
 
             self.x1 = null;
             self.x2 = null;
@@ -26,7 +26,7 @@
 
             if (!CurrentDocument.readonly) {
                 self.ias = $('#motifs-editor img.area-selectable').imgAreaSelect({ handles: true, onSelectEnd: self._fillCoords(self), instance: true });
-                $('#motifs-editor #add').click(self._addObject(self));
+                $('#motifs-editor .add').click(self._addObject(self));
 
                 $('.delete', self.$objects_list).live('click', function() {
                     $(this).prev().trigger('click');
index 97d4ba2..5cf014f 100644 (file)
@@ -7,8 +7,8 @@
         options.callback = function(){
             var self = this;
 
-            self.$tag_name = $('#objects-editor #tag-name');
-            self.$objects_list = $('#objects-editor #objects-list');
+            self.$tag_name = $('#objects-editor .tag-name');
+            self.$objects_list = $('#objects-editor .objects-list');
 
             self.x1 = null;
             self.x2 = null;
@@ -17,7 +17,7 @@
 
             if (!CurrentDocument.readonly) {
                 self.ias = $('#objects-editor img.area-selectable').imgAreaSelect({ handles: true, onSelectEnd: self._fillCoords(self), instance: true });
-                $('#objects-editor #add').click(self._addObject(self));
+                $('#objects-editor .add').click(self._addObject(self));
 
                 $('.delete', self.$objects_list).live('click', function() {
                     $(this).prev().trigger('click');
index 3e725d4..4f40b29 100644 (file)
@@ -1,9 +1,8 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
-    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<!DOCTYPE html >
 {% load i18n %}
-<html xmlns="http://www.w3.org/1999/xhtml">
+<html>
     <head>
-        <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
+        <meta charset="utf-8" />
         <title>{% block title %}{% trans "Platforma Redakcyjna" %}{% block subtitle %}{% endblock subtitle %}{% endblock title%}</title>
         {% block extrahead %}
         {% endblock %}
@@ -12,7 +11,7 @@
 
     <div id="loading-overlay">
        <div id="loading-message">
-               <img src="{{STATIC_URL}}img/spinner.gif" />
+               <img src="{{STATIC_URL}}img/spinner.gif" alt="Loading" />
                <p>{% trans "Loading" %}</p>
        </div>
        </div>