Bugzilla – Attachment 29680 Details for
Bug 12572
Use jQueryUI Accordion to display message transport types
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12572 - Use jQueryUI Accordion to display message transport types
Bug-12572---Use-jQueryUI-Accordion-to-display-mess.patch (text/plain), 7.35 KB, created by
Owen Leonard
on 2014-07-14 14:45:03 UTC
(
hide
)
Description:
Bug 12572 - Use jQueryUI Accordion to display message transport types
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2014-07-14 14:45:03 UTC
Size:
7.35 KB
patch
obsolete
>From e69298a3843abbea5d526c61aa187a1d5c05a867 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Mon, 14 Jul 2014 10:32:11 -0400 >Subject: [PATCH] Bug 12572 - Use jQueryUI Accordion to display message > transport types >Content-Type: text/plain; charset="utf-8" > >The notice edit view has separate sections for each of the various >message transport types. This patch groups them in a jQueryUI accordion >to simplify the view. > >Also changed: Some label/id pairs have been changed to eliminate >duplicate ids. > >To test, apply the patch an edit any notice under Tools -> Notices & >Slips. > >- The message transport type fields for email, feed, phone, etc. should > be correctly grouped in a collapsed accordion. The acccordion should > look correct and work correctly. >- Clicking the label for any form field should correctly highlight the > corresponding field. >- Submitting updates to the notice should work correctly for all message > transport types. >--- > .../intranet-tmpl/prog/en/css/staff-global.css | 12 ++++++ > .../intranet-tmpl/prog/en/modules/tools/letter.tt | 42 ++++++++++---------- > 2 files changed, 33 insertions(+), 21 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css >index f7678f0..3b4d768 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css >+++ b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css >@@ -2426,6 +2426,18 @@ div.authorizedheading { > font-weight: bold; font-size : 110%; > } > >+fieldset.rows.ui-accordion-content { >+ border-top-left-radius: 0; >+ border-top-right-radius: 0; >+ margin: 0; >+ padding: 0; >+ width: auto; >+} >+ >+fieldset.rows.ui-accordion-content table { >+ margin : 0; >+} >+ > video { > width: 480px; > } >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 7964e41..08d3ec5 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt >@@ -93,6 +93,7 @@ $(document).ready(function() { > $("#sms_counter").css("color", "black"); > } > }); >+ $( "#transport-types" ).accordion({ collapsible: true, active:false, animate: 200 }); > }); > [% IF add_form or copy_form %] > >@@ -338,26 +339,18 @@ $(document).ready(function() { > [% IF copying %] > You must change this code to reflect the copy. > [% END %] >- <input type="hidden" id="code" name="oldcode" value="[% oldcode %]" /> >+ <input type="hidden" name="oldcode" value="[% oldcode %]" /> > </li> > <li> > <label for="name" class="required">Name:</label> > <input type="text" id="name" name="name" size="60" value="[% letter_name %]" required="required" /> > <span class="required">Required</span> >- </li> >- >+ </li> >+ </ol> >+ </fieldset> >+ <div id="transport-types" style="clear:both"> > [% FOREACH letter IN letters %] >- <li> >- [% IF letter.message_transport_type == "sms" and not Koha.Preference("SMSSendDriver") %] >- <fieldset class="rows mtt" id="[% letter.message_transport_type %]" disabled="disabled"> >- <div class="dialog message">You should enable the SMSSendDriver preference to use the SMS templates.</div> >- [% ELSIF letter.message_transport_type == "phone" and not Koha.Preference("TalkingTechItivaPhoneNotification") %] >- <fieldset class="rows mtt" id="[% letter.message_transport_type %]" disabled="disabled"> >- <div class="dialog message">You should enable the TalkingTechItivaPhoneNotification preference to use the phone templates.</div> >- [% ELSE %] >- <fieldset class="rows mtt" id="[% letter.message_transport_type %]"> >- [% END %] >- <legend> >+ <h3> > [% SWITCH letter.message_transport_type %] > [% CASE 'email' %] > Email >@@ -372,7 +365,16 @@ $(document).ready(function() { > [% CASE %] > [% letter.message_transport_type %] > [% END %] >- </legend> >+ </h3> >+ [% IF letter.message_transport_type == "sms" and not Koha.Preference("SMSSendDriver") %] >+ <fieldset class="rows mtt" id="[% letter.message_transport_type %]" disabled="disabled"> >+ <div class="dialog message">You should enable the SMSSendDriver preference to use the SMS templates.</div> >+ [% ELSIF letter.message_transport_type == "phone" and not Koha.Preference("TalkingTechItivaPhoneNotification") %] >+ <fieldset class="rows mtt" id="[% letter.message_transport_type %]" disabled="disabled"> >+ <div class="dialog message">You should enable the TalkingTechItivaPhoneNotification preference to use the phone templates.</div> >+ [% ELSE %] >+ <fieldset class="rows mtt" id="[% letter.message_transport_type %]"> >+ [% END %] > <ol> > <li> > <input type="hidden" name="message_transport_type" value="[% letter.message_transport_type %]" /> >@@ -384,17 +386,17 @@ $(document).ready(function() { > [% END %] > </li> > <li> >- <label for="title">Message subject:</label><input type="text" id="title" name="title" size="60" value="[% letter.title %]" /> >+ <label for="title_[% letter.message_transport_type %]">Message subject:</label><input type="text" id="title_[% letter.message_transport_type %]" name="title" size="60" value="[% letter.title %]" /> > </li> > <li> >- <label for="SQLfieldname">Message body:</label> >+ <label for="SQLfieldname_[% letter.message_transport_type %]">Message body:</label> > [% IF letter.message_transport_type == 'sms' %] > <span id="sms_counter">[% IF letter.content.length > 0 %][% letter.content.length %][% ELSE %]0[% END %]/160 characters</span> > [% END %] > <table> > <tr> > <td> >- <select name="SQLfieldname" multiple="multiple" size="9"> >+ <select name="SQLfieldname" id="SQLfieldname_[% letter.message_transport_type %]" multiple="multiple" size="9"> > [% FOREACH SQLfieldnam IN SQLfieldname %] > <option value="[% SQLfieldnam.value %]">[% SQLfieldnam.text %]</option> > [% END %] >@@ -407,12 +409,10 @@ $(document).ready(function() { > </li> > </ol> > </fieldset> >- </li> > [% END %] >- </ol> >+ </div> <!-- / #transport-types --> > > [% IF code.search('DGST') %] <span class="overdue">Warning, this is a template for a Digest, as such, any references to branch data ( e.g. branches.branchname ) will refer to the borrower's home branch.</span> [% END %] >- </fieldset> > <fieldset class="action"><input type="submit" id="submit_form" value="Submit" class="button" /> <a class="cancel" href="/cgi-bin/koha/tools/letter.pl">Cancel</a></fieldset> > <input type="hidden" name="searchfield" value="[% searchfield %]" /> > </form> >-- >1.7.9.5
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 12572
:
29680
|
29896
|
29919
|
29920