From eac6dc6e27aaf13b625bb0ee93e91fb9883205fa Mon Sep 17 00:00:00 2001 From: Julian Maurice Date: Thu, 21 Mar 2013 12:15:36 +0000 Subject: [PATCH] Bug 9044: (follow-up) Add a blank option + add missing 'for' attributes Signed-off-by: Pierre Angot et Leila Arkab Signed-off-by: Bernardo Gonzalez Kriegel Signed-off-by: Katrin Fischer Signed-off-by: Galen Charlton --- .../prog/en/modules/catalogue/detail.tt | 37 +++++++++++-------- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt index 062e413f46..1f8274bd2c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -86,18 +86,22 @@ function verify_images() { }); if (itemnumbers.length > 0) { var action = $('select[name="itemselection_action"]', div).val(); - var del = (action == 'delete') ? 1 : 0; - var url = '/cgi-bin/koha/tools/batchMod.pl?op=show'; - if (action == 'delete') { - url += '&del=1'; - } - url += '&itemnumber=' + itemnumbers.join('&itemnumber='); - url += '&src=' + '[% "/cgi-bin/koha/catalogue/detail.pl?biblionumber=$biblionumber" |uri %]'; - new_window = $("input[name='new_window']", div).attr('checked'); - if (new_window) { - window.open(url); + if (action.length > 0) { + var del = (action == 'delete') ? 1 : 0; + var url = '/cgi-bin/koha/tools/batchMod.pl?op=show'; + if (action == 'delete') { + url += '&del=1'; + } + url += '&itemnumber=' + itemnumbers.join('&itemnumber='); + url += '&src=' + '[% "/cgi-bin/koha/catalogue/detail.pl?biblionumber=$biblionumber" |uri %]'; + new_window = $("input[name='new_window']", div).attr('checked'); + if (new_window) { + window.open(url); + } else { + window.location.href = url; + } } else { - window.location.href = url; + alert(_("Please choose an action")); } } else { alert(_("Please select at least one item.")); @@ -436,13 +440,16 @@ function verify_images() { [% IF ( HTML5MediaEnabled ) %][% IF ( HTML5MediaSets ) %]
  • Play media
  • [% END %][% END %] +[% items_table_block_iter = 0 %] [% BLOCK items_table %] + [% items_table_block_iter = items_table_block_iter + 1 %] [% IF (StaffDetailItemSelection) %] Select all | Deselect all |
    - - + [% IF CAN_user_tools_items_batchdel %] [% END %] @@ -451,8 +458,8 @@ function verify_images() { [% END %] - - + +
    [% END %] -- 2.39.5