Bugzilla – Attachment 91637 Details for
Bug 23278
Reopen last panel upon "Save and continue" in notices
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23278: Reopen last panel upon "Save and continue" in notices
Bug-23278-Reopen-last-panel-upon-Save-and-continue.patch (text/plain), 3.87 KB, created by
Nick Clemens (kidclamp)
on 2019-07-19 11:34:44 UTC
(
hide
)
Description:
Bug 23278: Reopen last panel upon "Save and continue" in notices
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2019-07-19 11:34:44 UTC
Size:
3.87 KB
patch
obsolete
>From 8e78a75a128dccf302dcd82c6b727936bacf77b1 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Fri, 5 Jul 2019 17:28:06 +0000 >Subject: [PATCH] Bug 23278: Reopen last panel upon "Save and continue" in > notices > >This patch modifies the Notices edit process so that if the user chooses >the "Save and continue" option the page reloads with the same panel open >which they were previously editing in. > >To test, apply the patch and go to Tools -> Notices and Slips. > > - Open a notice for editing. > - Expand one of the sections. > - Choose "Save and continue" from the button menu in the toolbar. > - When the page reloads, the section you expanded should be open > again. > - Test each section and test with no sections expanded. > >Signed-off-by: Maryse Simard <maryse.simard@inlibro.com> > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt | 1 + > koha-tmpl/intranet-tmpl/prog/js/letter.js | 14 +++++++++++++- > tools/letter.pl | 7 +++++-- > 3 files changed, 19 insertions(+), 3 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 086978561a..1f4c8f20e8 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt >@@ -409,6 +409,7 @@ > [% END %] > > <input type="hidden" id="redirect" name="redirect" value="" /> >+ <input type="hidden" id="section" name="section" value="[% section | html %]" /> > <input type="hidden" name="searchfield" value="[% searchfield | html %]" /> > </form> > [% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/js/letter.js b/koha-tmpl/intranet-tmpl/prog/js/letter.js >index cdaf5557b4..f4824abab3 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/letter.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/letter.js >@@ -136,7 +136,19 @@ $(document).ready(function() { > } > }); > >- $( ".transport-types" ).accordion({ collapsible: true, active:false, animate: 200 }); >+ $( ".transport-types" ).accordion({ >+ collapsible: true, >+ active: parseInt( $("#section").val(), 10), >+ animate: 200, >+ activate: function() { >+ var active = $( ".transport-types" ).accordion( "option", "active" ); >+ if( active === false ){ >+ $("#section").val(""); >+ } else { >+ $("#section").val( active ); >+ } >+ } >+ }); > > $(".insert").on("click",function(){ > var containerid = $(this).data("containerid"); >diff --git a/tools/letter.pl b/tools/letter.pl >index f1a234bf40..a673fa96a9 100755 >--- a/tools/letter.pl >+++ b/tools/letter.pl >@@ -66,7 +66,9 @@ my $code = $input->param('code'); > my $module = $input->param('module') || ''; > my $content = $input->param('content'); > my $op = $input->param('op') || ''; >-my $redirect = $input->param('redirect'); >+my $redirect = $input->param('redirect'); >+my $section = $input->param('section'); >+ > my $dbh = C4::Context->dbh; > > our ( $template, $borrowernumber, $cookie, $staffflags ) = get_template_and_user( >@@ -90,13 +92,14 @@ $template->param( > script_name => $script_name, > searchfield => $searchfield, > branchcode => $branchcode, >+ section => $section, > action => $script_name > ); > > if ( $op eq 'add_validate' or $op eq 'copy_validate' ) { > add_validate(); > if( $redirect eq "just_save" ){ >- print $input->redirect("/cgi-bin/koha/tools/letter.pl?op=add_form&branchcode=$branchcode&module=$module&code=$code&redirect=done"); >+ print $input->redirect("/cgi-bin/koha/tools/letter.pl?op=add_form&branchcode=$branchcode&module=$module&code=$code&redirect=done§ion=$section"); > exit; > } else { > $op = q{}; # we return to the default screen for the next operation >-- >2.11.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 23278
:
91407
|
91509
| 91637