Bugzilla – Attachment 117766 Details for
Bug 5697
Automatic linking in guided reports
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 5697: (follow-up) Save the user's choice to show or hide auto-links
Bug-5697-follow-up-Save-the-users-choice-to-show-o.patch (text/plain), 3.90 KB, created by
Katrin Fischer
on 2021-03-04 21:11:30 UTC
(
hide
)
Description:
Bug 5697: (follow-up) Save the user's choice to show or hide auto-links
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2021-03-04 21:11:30 UTC
Size:
3.90 KB
patch
obsolete
>From 7202ef2a47d37c78c6b1664e2866efdeed96682f Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Thu, 4 Mar 2021 15:50:14 +0000 >Subject: [PATCH] Bug 5697: (follow-up) Save the user's choice to show or hide > auto-links > >This patch adds local storage of the user's selection when they click >the "Show/hide data menus" control. The selection persists until the >user logs out. > >To test, apply the patch and run an SQL report which will return >borrowernumber, cardnumber, itemnumber, or biblionumber. > >- When the results display, confirm that these numbers are shown with > the auto-link menu. >- Click the "Hide data menus" link. The text should change to "Show data > menus" and the menus should disappear. >- Navigate away from the page and re-run the report. >- The menus should be automatically hidden in the results. >- Log out of the staff client, return to saved reports, and run the > report again. >- The auto-link menus should appear. > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > .../prog/en/modules/reports/guided_reports_start.tt | 15 +++++++++++++-- > koha-tmpl/intranet-tmpl/prog/js/staff-global.js | 1 + > 2 files changed, 14 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt >index b91f2d2445..edae45d55a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt >@@ -1006,10 +1006,11 @@ > [% END %] > </ul> <!-- /.dropdown-menu --> > </div> <!-- /.dropdown --> >- <a href="#" id="toggle_auto_links"> >+ <a href="#" class="btn btn-link" id="toggle_auto_links"> > <i class="fa fa-eye autolink" style="display:none"></i> > <i class="fa fa-eye-slash autolink"></i> >- Toggle data menus >+ <span class="autolink" style="display:none">Show data menus</span> >+ <span class="autolink">Hide data menus</span> > </a> > </p> > [% END # /IF ( batch_biblionumbers || batch_itemnumbers || batch_cardnumbers ) %] >@@ -1903,8 +1904,18 @@ > } > $("#toggle_auto_links").on("click", function(e){ > e.preventDefault(); >+ if( $(".data-plain").is(":visible") ){ >+ /* if a data-plain element is visible, this click hides it and shows auto-links */ >+ localStorage.removeItem("reports_auto_link_off"); >+ } else { >+ /* if a data-plain element is hidden, this click shows it and hides auto-links */ >+ localStorage.setItem("reports_auto_link_off", 1); >+ } > $(".data-plain,.autolink").toggle(); > }); >+ if ( localStorage.getItem("reports_auto_link_off") == 1 ){ >+ $("#toggle_auto_links").click(); >+ } > }); > > function tabsInit( ui, rtable ){ >diff --git a/koha-tmpl/intranet-tmpl/prog/js/staff-global.js b/koha-tmpl/intranet-tmpl/prog/js/staff-global.js >index 4f06af9465..98aa77b208 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/staff-global.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/staff-global.js >@@ -198,6 +198,7 @@ function logOut(){ > clearHoldFor(); > removeLastBorrower(); > localStorage.removeItem("sql_reports_activetab"); >+ localStorage.removeItem("reports_auto_link_off"); > localStorage.removeItem("searches"); > } > >-- >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 5697
:
110075
|
110668
|
110697
|
117096
|
117755
|
117765
|
117766
|
117988
|
118022
|
127484
|
128252
|
128277