Bugzilla – Attachment 19914 Details for
Bug 9044
Allow to select items on catalogue/detail.pl and trigger actions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 9044 [Follow-up] Add a blank option + add missing 'for' attributes
Bug-9044-Follow-up-Add-a-blank-option--add-missing.patch (text/plain), 4.02 KB, created by
Julian Maurice
on 2013-07-24 06:41:29 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 9044 [Follow-up] Add a blank option + add missing 'for' attributes
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2013-07-24 06:41:29 UTC
Size:
4.02 KB
patch
obsolete
>From a359e0cd56b2e2feb6ca205df72d9be22feb5c9b Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >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 <tredok.pierre@gmail.com> >--- > .../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 989bc1a..200b7b6 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >@@ -68,18 +68,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.")); >@@ -401,13 +405,16 @@ function verify_images() { > [% IF ( HTML5MediaEnabled ) %][% IF ( HTML5MediaSets ) %]<li><a href="#html5media">Play media</a></li>[% END %][% END %] > </ul> > >+[% items_table_block_iter = 0 %] > [% BLOCK items_table %] >+ [% items_table_block_iter = items_table_block_iter + 1 %] > [% IF (StaffDetailItemSelection) %] > <a href="#" onclick="selectAllItems($(this).parent()); return false;">Select all</a> | > <a href="#" onclick="deselectAllItems($(this).parent()); return false;">Deselect all</a> | > <form onsubmit="itemSelectionExecuteAction($(this).parent()); return false;"> >- <label>Action:</label> >- <select name="itemselection_action"> >+ <label for="itemselection_action_[% items_table_block_iter %]">Action:</label> >+ <select id="itemselection_action_[% items_table_block_iter %]" name="itemselection_action"> >+ <option value=""></option> > [% IF CAN_user_tools_items_batchdel %] > <option value="delete">Delete selected items</option> > [% END %] >@@ -416,8 +423,8 @@ function verify_images() { > [% END %] > </select> > <input type="submit" value="Go" /> >- <input type="checkbox" name="new_window" /> >- <label>Open in new window</label> >+ <input type="checkbox" id="new_window_[% items_table_block_iter %]" name="new_window" /> >+ <label for="new_window_[% items_table_block_iter %]">Open in new window</label> > </form> > [% END %] > <table> >-- >1.7.10.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 9044
:
13344
|
13513
|
13933
|
14737
|
16612
|
16707
|
16708
|
16711
|
19060
|
19344
|
19913
|
19914
|
19915
|
19916
|
21324
|
21325
|
21326
|
21327
|
21561
|
21562
|
21563
|
21564
|
21591
|
21634
|
21683
|
21745
|
21746
|
21747
|
21748
|
21749