Bugzilla – Attachment 51489 Details for
Bug 1859
Notice fields: can't select multiple fields at once
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 1859 - Notice fields: can't select multiple fields at once
Bug-1859---Notice-fields-cant-select-multiple-fiel.patch (text/plain), 5.17 KB, created by
Jonathan Druart
on 2016-05-13 21:05:00 UTC
(
hide
)
Description:
Bug 1859 - Notice fields: can't select multiple fields at once
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2016-05-13 21:05:00 UTC
Size:
5.17 KB
patch
obsolete
>From a006692d3f0019fbe26ecf56fa92ab45896cc6cd Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Thu, 12 May 2016 20:35:01 -0400 >Subject: [PATCH] Bug 1859 - Notice fields: can't select multiple fields at > once > >When selecting database fields to appear in a notice, selecting multiple >fields at once doesn't work correctly. The selected fields are grouped >together between << and >> instead of each being bracketed separately. > >This patch corrects this problem. Also changed: Removal of 'onclick'; >Conversion of 'insert' button to a Bootstrap buttons styled with a Font >Awesome icon; HTML validation error fixes. > >To test, apply the patch and go to Tools -> Notices & Slips. > >- Edit any notice. >- Select a notice version to edit (Email, Print, etc.). >- Confirm that the "Insert" button looks correct. >- Using ctrl+click, select multiple database fields to add to the > notice. Confirm that clicking the "Insert" button adds the fields > correctly. >- Confirm that there are no HTML validation errors. > >Signed-off-by: Nicole C Engard <nengard@bywatersolutions.com> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > .../intranet-tmpl/prog/en/modules/tools/letter.tt | 33 +++++++++++++--------- > 1 file changed, 19 insertions(+), 14 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt >index 4b81dd1..8ed7a52 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt >@@ -97,7 +97,11 @@ $(document).ready(function() { > } > }); > $( "#transport-types" ).accordion({ collapsible: true, active:false, animate: 200 }); >-}); >+ $(".insert").on("click",function(){ >+ var containerid = $(this).data("containerid"); >+ insertValueQuery( containerid ); >+ }) >+}); > [% IF add_form or copy_form %] > > function cancel(f) { >@@ -129,17 +133,11 @@ $(document).ready(function() { > var myListBox = $(fieldset).find('select[name="SQLfieldname"]'); > > if($(myListBox).find('option').length > 0) { >- var chaineAj = ""; >- var NbSelect = 0; > $(myListBox).find('option').each( function (){ > if ( $(this).attr('selected') ) { >- NbSelect++; >- if (NbSelect > 1) >- chaineAj += ", "; >- chaineAj += $(this).val(); >+ $(myQuery).insertAtCaret("<<" + $(this).val() + ">>"); > } >- } ); >- $(myQuery).insertAtCaret("<<" + chaineAj + ">>"); >+ }); > } > } > [% END %] >@@ -274,8 +272,8 @@ $(document).ready(function() { > [% ELSE %] > <li> > >- <label for="branch">Library:</label> > [% IF adding %] >+ <label for="branch">Library:</label> > <select name="branchcode" id="branch" style="width:20em;"> > <option value="">All libraries</option> > [% FOREACH branchloo IN branchloop %] >@@ -283,8 +281,13 @@ $(document).ready(function() { > [% END %] > </select> > [% ELSE %] >+ <span class="label">Library:</span> > <input type="hidden" id="branch" name="branchcode" value="[% branchcode %]" /> >- [% Branches.GetName( branchcode ) %] >+ [% IF ( branchcode ) %] >+ [% Branches.GetName( branchcode ) %] >+ [% ELSE %] >+ All libraries >+ [% END %] > [% END %] > </li> > [% END %] >@@ -349,8 +352,8 @@ $(document).ready(function() { > <input type="text" id="code" name="code" size="20" maxlength="20" value="" required="required"/> > <span class="required">Required</span> > [% ELSE %] >- <label for="code">Code:</label> >- <input type="hidden" id="code" name="code" size="20" maxlength="20" value="[% code %]" required="required"/> >+ <span class="label">Code:</span> >+ <input type="hidden" id="code" name="code" value="[% code %]" /> > [% code %] > [% END %] > </li> >@@ -415,7 +418,9 @@ $(document).ready(function() { > [% END %] > </select> > </td> >- <td><input type="button" name="insert" value=">>" onclick="insertValueQuery('[% letter.message_transport_type %]')" title="Insert" /></td> >+ <td class="actions"> >+ <button type="button" data-containerid="[% letter.message_transport_type %]" class="btn btn-small insert">Insert <i class="fa fa-long-arrow-right"></i></button> >+ </td> > <td><textarea name="content" id="content_[% letter.message_transport_type %]" cols="80" rows="15">[% letter.content %]</textarea></td> > </tr> > </table> >-- >2.7.0
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 1859
:
51464
|
51465
| 51489 |
51490