# HG changeset patch # User ymh # Date 1371438883 -7200 # Node ID ab84fda7d1f46b062cc1ffd2f9cc32464c0a3828 # Parent 001e8b9e6085b19e78a72f2aacc20035abc0d017 correct validation + css diff -r 001e8b9e6085 -r ab84fda7d1f4 src/jocondelab/static/jocondelab/css/style.css --- a/src/jocondelab/static/jocondelab/css/style.css Sun Jun 16 21:55:39 2013 +0200 +++ b/src/jocondelab/static/jocondelab/css/style.css Mon Jun 17 05:14:43 2013 +0200 @@ -422,6 +422,10 @@ text-align: right; } +#term-list-table td { + padding: 2px; +} + .term-list-label { width : 500px; } @@ -443,14 +447,40 @@ padding-right: 1px; } + +#wrapper { + width:1024px; + margin:0 auto 0 0; +} + #term-filter-top-container { margin-bottom: 20px; } #term-explorer-container { + width: 580px; float: left; + padding:10px; } #term-detail-container { - float: right; + width: 404px; + float: right; + padding:10px; +} + +#tags_commands { + margin-bottom: 10px; +} + +#term-table > tr > td:first-child { + padding-right:10px; +} + +#edition-wk > td > span { + margin-right:10px; +} + +#info-wk > td > span { + margin-right:10px; } \ No newline at end of file diff -r 001e8b9e6085 -r ab84fda7d1f4 src/jocondelab/static/jocondelab/js/jocondelab.js --- a/src/jocondelab/static/jocondelab/js/jocondelab.js Sun Jun 16 21:55:39 2013 +0200 +++ b/src/jocondelab/static/jocondelab/js/jocondelab.js Mon Jun 17 05:14:43 2013 +0200 @@ -57,18 +57,18 @@ } }); // Validate sheet management : the radiobutton name has is "'gr_validated' + datasheet.hda_id" - $("#validated").click(function(e){ + $("input[type='radio'][name='gr_validated']").click(function(e){ e.preventDefault(); - if(confirm("Confirmez-vous la validation de ce terme ?")){ - $.post(validate_term_url,{term_id: term_id, validation_val: 'True', csrfmiddlewaretoken: global_csrf_token},function(data) { - window.location.reload(true); - }); + console.log(e); + val = $("input[type='radio'][name='gr_validated']:checked").val(); + if(val === 'True') { + msg = "Confirmez-vous la validation de ce terme ?"; } - }); - $("#not_validated").click(function(e){ - e.preventDefault(); - if(confirm("Confirmez-vous l'invalidation de cette fiche ?")){ - $.post(validate_term_url,{term_id: term_id, validation_val: 'False', csrfmiddlewaretoken: global_csrf_token},function(data) { + else { + msg = "Confirmez-vous l'invalidation de cette fiche ?" + } + if(confirm(msg)) { + $.post(validate_term_url,{term_id: term_id, validation_val: val, csrfmiddlewaretoken: global_csrf_token},function(data) { window.location.reload(true); }); } @@ -130,4 +130,13 @@ }); } +function init_filter_events() { + $('#term-filter-form').submit(function(){ + var values = $('#term-filter-form').serialize(); + $('#term-explorer-container').load(term_list_table_url, values, function() { + $('#term-list-table #term-'+term_id).addClass('currenttermline'); + }); + return false; + }); +} diff -r 001e8b9e6085 -r ab84fda7d1f4 src/jocondelab/templates/jocondelab/term_edit.html --- a/src/jocondelab/templates/jocondelab/term_edit.html Sun Jun 16 21:55:39 2013 +0200 +++ b/src/jocondelab/templates/jocondelab/term_edit.html Mon Jun 17 05:14:43 2013 +0200 @@ -19,13 +19,7 @@ $(document).ready(function(){ init_term_events(); - $('#term-filter-form').submit(function(){ - var values = $('#term-filter-form').serialize(); - $('#term-explorer-container').load(term_list_table_url, values, function() { - $('#term-list-table #term-'+term_id).addClass('currenttermline'); - }); - return false; - }); + init_filter_events(); $('#term-filter-form').submit(); }); @@ -53,6 +47,7 @@ {% block content %} +
{% include "jocondelab/partial/filter.html" %}
@@ -60,9 +55,9 @@
-
-
En cours - Validé +
+
En cours + Validé {% if term.validated %} par {{term.validator.username}} le {{term.validation_date|date:"d/m/Y"}} {% endif %} @@ -70,52 +65,55 @@ {% csrf_token %}
- +
- + - + - + - - + + - - - - - - - - - + + + + + - - - - - - - -
{% trans 'Term label' %}{% trans 'label' %} {{term.label}}
{% trans 'Term id' %}{% trans 'id' %} {{term.id}}
{% trans 'Term uri' %}{% trans 'uri' %} {{term.uri}}
{% trans 'url wikipedia' %}
{% trans 'info wikipedia' %} + {% if term.wikipedia_url and term.wikipedia_url != "" %} - +  {{term.wp_label}} {% else %} {% endif %} -
{% trans 'Wikipedia revision id' %} + + {% if term.wikipedia_revision_id %} {% else %}   - {% endif %} -
{% trans 'DBpedia url' %} + {% endif %} + + {% if term.dbpedia_uri and term.dbpedia_uri != "" %} {% else %}   {% endif %} +
{% trans 'remove wikipedia link' %}{% trans 'Rech. joconde' %} + Recherche joconde +
{% trans 'Edition wk' %} + {% if term.wikipedia_url and term.wikipedia_url != "" %} {% if term.validated %} {{term.label}} @@ -125,26 +123,19 @@ {% else %}   {% endif %} + + + {% if term.validated %} + OK + {% else %} + OK + {% endif %} +
{% trans 'edit wikipedia link' %} - {% if term.validated %} - {% trans "Select Wikipedia page" %} : OK - {% else %} - {% trans "Select Wikipedia page" %} : OK - {% endif %} -
{% trans 'Recherche joconde' %} - Recherche joconde -
+
{% endblock %} \ No newline at end of file