Bugzilla – Attachment 17922 Details for
Bug 10182
Save and continue editing should be improved
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10182: Stay on the same tab after saving a biblio
Bug-10182-Stay-on-the-same-tab-after-saving-a-bibl.patch (text/plain), 3.34 KB, created by
Jonathan Druart
on 2013-05-03 09:56:05 UTC
(
hide
)
Description:
Bug 10182: Stay on the same tab after saving a biblio
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2013-05-03 09:56:05 UTC
Size:
3.34 KB
patch
obsolete
>From 0ded67a7dba2b544a49fa26d1bdee4faa24c434e Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Fri, 3 May 2013 11:53:10 +0200 >Subject: [PATCH] Bug 10182: Stay on the same tab after saving a biblio > >When editing a biblio, the bug 7883 introduces the "save and continue >editing" feature. >After saving, the page is loaded with the first tab selected. >This patch refresh the page with the same tab selected. > >Test plan: >1/ Edit a biblio. >2/ Clic on the 5th tab. >3/ Clic on the "Save and continue editing" button. >4/ You are redirected on the same page with the same tab selected >--- > cataloguing/addbiblio.pl | 6 ++++-- > .../intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt | 12 ++++++++++-- > 2 files changed, 14 insertions(+), 4 deletions(-) > >diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl >index fdbacd4..dc0a30a 100755 >--- a/cataloguing/addbiblio.pl >+++ b/cataloguing/addbiblio.pl >@@ -909,7 +909,8 @@ if ( $op eq "addbiblio" ) { > > } > elsif ($redirect eq "just_save"){ >- print $input->redirect("/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=$biblionumber&framework=$frameworkcode"); >+ my $tab = $input->param('current_tab'); >+ print $input->redirect("/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=$biblionumber&framework=$frameworkcode&tab=$tab"); > } > else { > $template->param( >@@ -990,7 +991,8 @@ $template->param( > popup => $mode, > frameworkcode => $frameworkcode, > itemtype => $frameworkcode, >- borrowernumber => $loggedinuser, >+ borrowernumber => $loggedinuser, >+ tab => $input->param('tab') > ); > > output_html_with_http_headers $input, $cookie, $template->output; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt >index ae80c6a..907120a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt >@@ -13,6 +13,10 @@ > $("#"+ui.panel.id+" input:eq(0)").focus(); > }); > >+ [% IF tab %] >+ $('#addbibliotabs').tabs('option', 'selected', "#[% tab %]"); >+ [% END %] >+ > /* check cookie to hide/show marcdocs*/ > if($.cookie("marcdocs_[% borrowernumber %]") == 'false'){ > hideMARCdocLinks(); >@@ -55,7 +59,10 @@ > }); > $("#saveandcontinue").click(function(){ > $(".btn-group").removeClass("open"); >- redirect("just_save"); >+ var tab = $("#addbibliotabs li.ui-tabs-selected:first a").attr('href'); >+ tab = tab.replace('#', ''); >+ $("#current_tab").val(tab); >+ redirect("just_save", tab); > return false; > }); > >@@ -352,7 +359,8 @@ function Changefwk(FwkList) { > [% ELSE %] > <form method="post" name="f" id="f" action="/cgi-bin/koha/cataloguing/addbiblio.pl" onsubmit="return Check();"> > <input type="hidden" value="[% IF ( biblionumber ) %]view[% ELSE %]items[% END %]" id="redirect" name="redirect" /> >- <input type="hidden" value="0" id="confirm_not_duplicate" name="confirm_not_duplicate" /> >+ <input type="hidden" value="" id="current_tab" name="current_tab" /> >+ <input type="hidden" value="0" id="confirm_not_duplicate" name="confirm_not_duplicate" /> > [% END %] > > <div id="toolbar" class="btn-toolbar"> >-- >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 10182
:
17922
|
18056
|
19017