@@ -, +, @@ HoldsSplitQueue HoldsSplitQueueNumbering --- .../prog/en/includes/holds_table.inc | 31 ++++------------ .../prog/en/modules/reserve/request.tt | 35 ++++--------------- 2 files changed, 14 insertions(+), 52 deletions(-) --- a/koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc @@ -27,18 +27,6 @@ [%- SET found_holds = 0 -%] [%- SET last_priority = holds.last.priority -%] - [% BLOCK priority_dropdown %] - [%- SET loop_priority = 1 -%] - [%- WHILE loop_priority <= last_priority -%] - [%- IF this_priority == loop_priority -%] - - [%- ELSE -%] - - [%- END -%] - [%- loop_priority = loop_priority + 1- %] - [%- END -%] - [% END %] - [% FOREACH hold IN holds %] [%- IF !hold.found && first_priority == 0 -%] [%- first_priority = hold.priority -%] @@ -56,29 +44,24 @@ [% IF Koha.Preference('HoldsSplitQueue') == "nothing" && !hold.found %] - [% ELSE %] - + [% END %] - - [% ELSE %] - - [% IF ( hold.found ) %] [% IF ( hold.found == 'T' ) %] - + In transit [% ELSIF ( hold.found == 'P' ) %] - + In processing [% ELSE %] - + Waiting [% END %] [% ELSE %] - + [% END %] - [% END %] [%- IF ( CAN_user_reserveforothers_modify_holds_priority ) -%] --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt @@ -933,18 +933,6 @@

Existing holds

-
- [% SET hold_cancellation = AuthorisedValues.GetAuthValueDropbox('HOLD_CANCELLATION') %] - [% IF hold_cancellation %] - - - [% END %] -
[% FOREACH biblioloo IN biblioloop %] @@ -1181,14 +1169,6 @@ $.fn.select2.defaults.set("dropdownAutoWidth", true ); $(document).ready(function() { - $('#cancellation-reason-fieldset').hide(); - $('.rank-request').on('change', function() { - if ( $(".rank-request option:selected[value='del']").length ) { - $('#cancellation-reason-fieldset').show(); - } else { - $('#cancellation-reason-fieldset').hide(); - } - }); [% SET active = clubs ? 1 : 0 %] $('#circ_holds_select').tabs({ @@ -1450,13 +1430,12 @@ } }); var prev_rank_request; - $("select[name=rank-request]").on("focus", function() { - prev_rank_request = $(this).val(); - var row = $(this).parents("tr:first"); - }).change(function() { + $("input[name=rank-request]").change(function() { + prev_rank_request = $(this).data('current_value'); var row = $(this).parents("tr:first"); var value = parseInt($(this).val()); - var found_holds = $("select[name='rank-request'][disabled='disabled']").length ; //Count how many are found + var found_holds = $("input[name='rank-request'].found").length ; //Count how many are found + console.log( found_holds); if( !isNaN(value) ) { //If moved to 'del' var after = row.parent().find("tr:nth-child("+(value+1+found_holds )+")"); //Go to the row 1 after the new value (and skip found holds) if (prev_rank_request > value) { @@ -1467,9 +1446,9 @@ } var next_priority = 1; - $("select[name=rank-request]").each(function () { - if( isNaN( $(this).val() ) ){ return true; } //Don't reset found or del holds - $(this).val(next_priority); + $("input[name=rank-request]").each(function () { + if( isNaN( $(this).val() ) || $(this).val() == 0 ){ return true; } //Don't reset found or del holds + $(this).val(next_priority).data('current_value',next_priority); next_priority++; }); }); --