Bugzilla – Attachment 75715 Details for
Bug 15766
Give label and patron card batches a description
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15766: (follow-up) Correct merge errors
Bug-15766-follow-up-Correct-merge-errors.patch (text/plain), 10.57 KB, created by
Owen Leonard
on 2018-05-31 16:59:26 UTC
(
hide
)
Description:
Bug 15766: (follow-up) Correct merge errors
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2018-05-31 16:59:26 UTC
Size:
10.57 KB
patch
obsolete
>From 37f36f51e646c9bc5dea180d6517bcdd885845bd Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Thu, 31 May 2018 16:54:43 +0000 >Subject: [PATCH] Bug 15766: (follow-up) Correct merge errors > >This patch corrects some problems applying this on current master and >removes an old merge conflict marker. >--- > .../prog/en/modules/patroncards/edit-batch.tt | 213 +++------------------ > 1 file changed, 26 insertions(+), 187 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-batch.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-batch.tt >index 37861c8..7965a91 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-batch.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-batch.tt >@@ -4,193 +4,6 @@ > <title>Koha › Tools › Patron card creator › Batches › [% IF batch_id %]Edit ([% batch_id %])[% ELSE %]New[% END %]</title> > [% INCLUDE 'doc-head-close.inc' %] > [% Asset.css("css/datatables.css") %] >- [% INCLUDE 'greybox.inc' %] >- <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" /> >- [% INCLUDE 'datatables.inc' %] >- <script type="text/javascript"> >- //<![CDATA[ >- function DeleteConfirm() { >- var msg = _("Are you sure you want to delete batch %s?").format("[% batch_id %]"); >- var answer = confirm(msg); >- if (answer) { >- window.location = "/cgi-bin/koha/patroncards/manage.pl?op=delete&card_element=batch&element_id=[% batch_id %]"; >- } >- else { >- return; // abort delete >- } >- }; >- function Remove() { >- items = new Array; >- >- if(document.items.action.length > 0) { >- for (var i=0; i < document.items.action.length; i++) { >- if (document.items.action[i].checked) { >- items.push("label_id=" + document.items.action[i].value); >- } >- } >- getstr = items.join("&"); >- var msg = _("Are you sure you want to remove the selected patron(s) from this batch?"); >- } else if (document.items.action.checked) { >- alert(_("Deletion of patron from a batch with only one patron will delete the batch.") + "\n\n" + _("If this is what you want, select the 'Delete batch' option from the toolbar")); >- return; // no deletion for single item batch >- } >- else { >- alert(_("Please select at least one patron to delete.")); >- return; // no item selected >- } >- var answer = confirm(msg); >- if (answer) { >- window.location = "/cgi-bin/koha/patroncards/edit-batch.pl?op=remove&batch_id=[% batch_id %]&" + getstr; >- } >- else { >- return; // abort delete >- } >- }; >- function Add() { >- var bor_nums = document.getElementById("bor_num_list"); >- if (bor_nums.value == '') { >- window.open("/cgi-bin/koha/patroncards/add_user_search.pl", >- 'PatronPopup', >- 'width=840,height=500,location=yes,toolbar=no,' >- + 'scrollbars=yes,resize=yes'); >- } >- else { >- document.forms["add_by_bor_num"].submit(); >- } >- }; >- >- function add_user(borrowernumber) { >- $("#bor_num_list").val($("#bor_num_list").val()+borrowernumber+"\r\n"); >- } >- >- function DeDuplicate() { >- window.location = "/cgi-bin/koha/patroncards/edit-batch.pl?op=de_duplicate&batch_id=[% batch_id %]"; >- }; >- function Xport(mode) { >- if (mode == 'label') { >- patroncards= new Array; >- if(document.items.action.length > 0) { >- for (var i=0; i < document.items.action.length; i++) { >- if (document.items.action[i].checked) { >- patroncards.push("label_id=" + document.items.action[i].value); >- } >- } >- if (patroncards.length < 1) { >- alert(_("Please select at least one card to export.")); >- return; // no batch selected >- } >- getstr = patroncards.join("&"); >- } >- else if (document.items.action.checked) { >- getstr = document.items.action.value; >- } >- else { >- alert(_("Please select at least one card to export.")); >- return; // no batch selected >- } >- return GB_showCenter(_("Export patron cards"), "/cgi-bin/koha/patroncards/print.pl?batch_id=[% batch_id %]&" + getstr, 400, 800); >- } >- else if (mode == 'batch') { >- return GB_showCenter(_("Export patron cards"), "/cgi-bin/koha/patroncards/print.pl?batch_id=[% batch_id %]", 400, 800); >- } >- else { >- // some pass-thru error trapping just in case... >- } >- }; >- function selected_layout() { >- if (document.items.action.length) { >- for (i=0;i<document.items.action.length;i++){ >- if (document.items.action[i].checked==true){ >- return(document.items.action[i].value); >- } >- }; >- } >- else { >- if (document.items.action.checked){ >- return(document.items.action.value); >- } >- }; >- alert(_("Please select at least one item.")); >- return (-1); >- }; >- >- $(document).ready(function() { >- [% IF table_loop %] >- $("#description").show(); >- [% ELSE %] >- $("#description").hide(); >- [% END %] >- $("#batcht").dataTable($.extend(true, {}, dataTablesDefaults, { >- "aoColumnDefs": [ >- { "aTargets": [ -2, -1 ], "bSortable": false, "bSearchable": false } >- ], >- "aaSorting": [[ 0, "asc" ]], >- "sPaginationType": "four_button", >- "autoWidth": false >- })); >- $("#additems").click(function(){ >- Add(); >- return false; >- }); >- $("#removeitems").click(function(){ >- Remove(); >- return false; >- }); >- $("#deletebatch").click(function(){ >- DeleteConfirm(); >- return false; >- }); >- $("#deduplicate").click(function(){ >- DeDuplicate(); >- return false; >- }); >- $("#exportitems").click(function(){ >- Xport('label'); >- return false; >- }); >- $("#exportbatch").click(function(){ >- Xport('batch'); >- return false; >- }); >- $(".delete").on("click", function(){ >- return confirmDelete( _("Are you sure you want to delete this patron from the card batch?") ); >- }); >- $(".export").on("click", function(e){ >- e.preventDefault(); >- var label_id = $(this).data("label-id"); >- var batch_id = $(this).data("batch-id"); >- GB_showCenter( _("Export single card"),'/cgi-bin/koha/patroncards/print.pl?batch_id='+batch_id+'&label_id='+label_id, 400, 800); >- }); >- $("#savedesc").click(function(event){ >- var newdescription = $(this).siblings('input[name="description"]').val(); >- var batch_id = $(this).data('batch_id'); >- var ajaxData = { >- 'newdescription': newdescription, >- 'batch_id': batch_id, >- 'card_element': "batch", >- 'creator': "patroncard", >- }; >- >- $.ajax({ >- url: '/cgi-bin/koha/svc/creator_batches', >- type: 'POST', >- dataType: 'json', >- data: ajaxData, >- }) >- >- .done(function(data){ >- if (data.status == 'success') { >- $("input[name='description']").text(data.newdesc); >- $("#change-status").text(_("Saved")); >- } else { >- $("#change-status").text(_("Unable to save description")); >- } >- }); >- }); >- }); >- //]]> >- </script> >->>>>>>> Bug 15766: Adding descriptions to patron card batches > </head> > > <body id="pcard_edit-batch" class="tools pcard"> >@@ -457,6 +270,32 @@ > var batch_id = $(this).data("batch-id"); > GB_showCenter( _("Export single card"),'/cgi-bin/koha/patroncards/print.pl?batch_id='+batch_id+'&label_id='+label_id, 400, 800); > }); >+ $("#savedesc").click(function(event){ >+ var newdescription = $(this).siblings('input[name="description"]').val(); >+ var batch_id = $(this).data('batch_id'); >+ var ajaxData = { >+ 'newdescription': newdescription, >+ 'batch_id': batch_id, >+ 'card_element': "batch", >+ 'creator': "patroncard", >+ }; >+ >+ $.ajax({ >+ url: '/cgi-bin/koha/svc/creator_batches', >+ type: 'POST', >+ dataType: 'json', >+ data: ajaxData, >+ }) >+ >+ .done(function(data){ >+ if (data.status == 'success') { >+ $("input[name='description']").text(data.newdesc); >+ $("#change-status").text(_("Saved")); >+ } else { >+ $("#change-status").text(_("Unable to save description")); >+ } >+ }); >+ }); > }); > </script> > [% END %] >-- >2.1.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 15766
:
59994
|
59998
|
59999
|
61462
|
61463
|
61464
|
63221
|
63222
|
63223
|
66515
|
67305
|
67862
|
68282
|
68359
|
68360
|
68361
|
68362
|
75213
|
75214
|
75215
|
75216
|
75715
|
75843
|
79839
|
79840
|
79841
|
79842
|
79843
|
79844
|
79845
|
79846
|
80446
|
80447
|
80448
|
80449
|
80450
|
80451
|
81070
|
81084
|
81086