From de2e2005515a626c6eb0ab27ba30b24f25e28d2f Mon Sep 17 00:00:00 2001 From: Joshua Rubingh Date: Tue, 19 May 2020 15:24:08 +0200 Subject: [PATCH] Fix correct labeling and added mouse pointers for table sorting --- .../static/RUG_template/css/base.css | 4 ++ .../templates/schedule/schedule_new.html | 41 ++++++++----------- 2 files changed, 21 insertions(+), 24 deletions(-) diff --git a/polyclinic_scheduling/apps/RUG_template/static/RUG_template/css/base.css b/polyclinic_scheduling/apps/RUG_template/static/RUG_template/css/base.css index 6d048f3..b3fb220 100644 --- a/polyclinic_scheduling/apps/RUG_template/static/RUG_template/css/base.css +++ b/polyclinic_scheduling/apps/RUG_template/static/RUG_template/css/base.css @@ -31,6 +31,10 @@ table { width: 100%; } +.pointer { + cursor: pointer; +} + form#new_schedule_form input:not([type=checkbox]) { width: 100% } diff --git a/polyclinic_scheduling/apps/schedule/templates/schedule/schedule_new.html b/polyclinic_scheduling/apps/schedule/templates/schedule/schedule_new.html index 1b5c7d6..e0cdb1e 100644 --- a/polyclinic_scheduling/apps/schedule/templates/schedule/schedule_new.html +++ b/polyclinic_scheduling/apps/schedule/templates/schedule/schedule_new.html @@ -106,19 +106,6 @@ Aantal behandelkamers dat beschikbaar is per specialisatie - @@ -350,12 +337,12 @@ - - - - - - + + + + + + @@ -486,13 +473,18 @@ element = jQuery(element); var nr = counter; // We are starting with 0 so the amount is the new number element.find('label').first().text('Specialisatie ' + (nr + 1)); - element.find('select,input').each(function(index,selectitem){ + element.find('select,input,label').each(function(index,selectitem){ selectitem = jQuery(selectitem); - selectitem.prop('name',selectitem.prop('name').replace(/_\d+$/,'_' + nr)); - selectitem.prop('id',selectitem.prop('id').replace(/_\d+$/,'_' + nr)); + if (selectitem.is('label')) { + selectitem.prop('for',selectitem.prop('for').replace(/_\d+$/,'_' + nr)); + } else { + //console.log(selectitem,selectitem.prop('name'),selectitem.prop('id') ); + selectitem.prop('name',selectitem.prop('name').replace(/_\d+$/,'_' + nr)); + selectitem.prop('id',selectitem.prop('id').replace(/_\d+$/,'_' + nr)); - if (selectitem.attr('aria-describedby')) { - selectitem.attr('aria-describedby',selectitem.attr('aria-describedby').replace(/_\d+Help$/,'_' + nr + 'Help')); + if (selectitem.attr('aria-describedby')) { + selectitem.attr('aria-describedby',selectitem.attr('aria-describedby').replace(/_\d+Help$/,'_' + nr + 'Help')); + } } }); } @@ -1000,6 +992,7 @@ return false; }); + updateBehandelingen(); load_clone_data(); });
Naam behandelingDuur (in minuten)SpecialisatieMethodeNormaal aantalGewenst als op 30%Naam behandelingDuur (in minuten)SpecialisatieMethodeNormaal aantalGewenst als op 30%