# HG changeset patch # User verrierj # Date 1314805967 -7200 # Node ID e6cd648f4f16004fe416f4a93cdf0362660e9f54 # Parent ed5e74f89be0266446fd58819f2f8c2d92c58ca9 Add checkbox to select/deselect project diff -r ed5e74f89be0 -r e6cd648f4f16 src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/create_ldt.html --- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/create_ldt.html Wed Aug 31 16:33:03 2011 +0200 +++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/create_ldt.html Wed Aug 31 17:52:47 2011 +0200 @@ -26,14 +26,14 @@ parent.$.nmTop().close(); }); - $("#check_all").click(function () { - $(".cellcheckbox input").attr('checked', true) + $("#check_projects").change(function () { + if ($("#check_projects").is(":checked")) { + $(".cellcheckbox input").attr('checked', 'true'); + } else { + $(".cellcheckbox input").removeAttr('checked'); + } }); - - $("#uncheck_all").click(function () { - $(".cellcheckbox input").attr('checked', false) - }); - + }); {% endblock %} @@ -46,8 +46,7 @@ {{form.title}} - - {% trans "Check all" %} / {% trans "Uncheck all" %} +
{% trans "name" %}
@@ -60,9 +59,14 @@ {% endfor %} - +
+ {% if not ldt_id %} + + {% endif %} +
+
{% if ldt_id %} diff -r ed5e74f89be0 -r e6cd648f4f16 src/ldt/ldt/locale/fr/LC_MESSAGES/django.po --- a/src/ldt/ldt/locale/fr/LC_MESSAGES/django.po Wed Aug 31 16:33:03 2011 +0200 +++ b/src/ldt/ldt/locale/fr/LC_MESSAGES/django.po Wed Aug 31 17:52:47 2011 +0200 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-08-31 16:29+0200\n" +"POT-Creation-Date: 2011-08-31 17:46+0200\n" "PO-Revision-Date: 2010-03-09 15:52+0100\n" "Last-Translator: Yves-Marie Haussonne \n" "Language-Team: LANGUAGE \n" @@ -337,7 +337,7 @@ msgstr "Le fichier média est en cours de traitement. Veuillez patienter." #: .\ldt_utils\templates\ldt\ldt_utils\create_content.html.py:124 -#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:67 +#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:71 #: .\ldt_utils\templates\ldt\ldt_utils\error_confirm.html.py:49 msgid "close_cancel" msgstr "Fermer" @@ -362,15 +362,7 @@ msgid "List of contents" msgstr "Liste de contenus" -#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:50 -msgid "Check all" -msgstr "Cocher tout" - -#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:50 -msgid "Uncheck all" -msgstr "Décocher tout" - -#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:52 +#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:51 #: .\ldt_utils\templates\ldt\ldt_utils\partial\contentslist.html.py:3 #: .\ldt_utils\templates\ldt\ldt_utils\partial\projectslist.html.py:3 #: .\ldt_utils\templates\ldt\ldt_utils\partial\publishedprojectslist.html.py:3 @@ -378,15 +370,15 @@ msgid "name" msgstr "nom" -#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:69 +#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:73 msgid "delete_project" msgstr "Effacer" -#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:70 +#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:74 msgid "update_project" msgstr "Mettre à jour" -#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:72 +#: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:76 msgid "create_project" msgstr "Créer un nouveau projet Ligne de Temps" @@ -1204,6 +1196,12 @@ "Nous vous avons envoyé par courriel les instructions pour activer le compte " "à l'adresse que vous avez indiquée. Vous devriez le recevoir rapidement." +#~ msgid "Check all" +#~ msgstr "Cocher tout" + +#~ msgid "Uncheck all" +#~ msgstr "Décocher tout" + #~ msgid "The language has been modified" #~ msgstr "La langue a été modifiée" diff -r ed5e74f89be0 -r e6cd648f4f16 src/ldt/ldt/static/ldt/css/ldtform.css --- a/src/ldt/ldt/static/ldt/css/ldtform.css Wed Aug 31 16:33:03 2011 +0200 +++ b/src/ldt/ldt/static/ldt/css/ldtform.css Wed Aug 31 17:52:47 2011 +0200 @@ -110,6 +110,11 @@ width: 70 px; } +.selectallprojects { + width: 35px; + text-align: center; +} + #contentslistheader { padding: 1px 10px 1px 36px; } diff -r ed5e74f89be0 -r e6cd648f4f16 src/ldt/ldt/static/ldt/js/projectscontents.js --- a/src/ldt/ldt/static/ldt/js/projectscontents.js Wed Aug 31 16:33:03 2011 +0200 +++ b/src/ldt/ldt/static/ldt/js/projectscontents.js Wed Aug 31 17:52:47 2011 +0200 @@ -243,12 +243,13 @@ nm.store.iframe.width(frameW); nm.store.iframe.height(frameH); }, - afterClose: function(nm) { - searchCallback($('#searchprojectsinput'), "#contentslistcontainer", searchprojectfilterurl); - }, close: function(nm) { // We don't do anything here, we hack the callback directly from the close function. }, + afterClose: function(nm) { + // Can't do that because searchprojectfilterurl is not defined in init_events_base params + searchCallback($('#searchprojectsinput'), "#projectslistcontainer", searchprojectfilterurl, 0); + } } });