Bugzilla – Attachment 159954 Details for
Bug 35528
Avoid 'click' for links in system preferences
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35528: Remove 'click' from links in system preferences
Bug-35528-Remove-click-from-links-in-system-prefer.patch (text/plain), 6.21 KB, created by
Tomás Cohen Arazi (tcohen)
on 2023-12-18 11:51:59 UTC
(
hide
)
Description:
Bug 35528: Remove 'click' from links in system preferences
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2023-12-18 11:51:59 UTC
Size:
6.21 KB
patch
obsolete
>From 0b7b62f4b2f07d8e8add1baea14508b472bab43f Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <katrin.fischer.83@web.de> >Date: Sun, 10 Dec 2023 14:55:20 +0000 >Subject: [PATCH] Bug 35528: Remove 'click' from links in system preferences > >It's not necessary to label a link with 'click', it being >a link and being formatted as such is enough. > >This updates the occurences in the sytem preferences editor. > >To test: >* Go to system preferences like OpacUserCSS that allow editing > in a textarea >* Verify link descrptions for editing and collapsing the area >* For a section of grouped system preferences, hover over the > arrow and verify the text for collapsing/uncollapsing the area >* Apply patch, restart all >* Verify the links and tool tips have been updated > >Signed-off-by: David Nind <david@davidnind.com> >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > .../prog/en/modules/admin/preferences.tt | 6 +++--- > koha-tmpl/intranet-tmpl/prog/js/pages/preferences.js | 12 ++++++------ > 2 files changed, 9 insertions(+), 9 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt >index 56de788a6a4..deaaadb9826 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt >@@ -103,7 +103,7 @@ > [Overridden] > </span> > [% END %] >- </label> >+ </label> > [% UNLESS ( loop.last ) %]<br />[% END %] > [% END %] > </code> >@@ -154,9 +154,9 @@ > [% IF ( CHUNK.syntax == "text/html" && Koha.Preference('UseWYSIWYGinSystemPreferences') ) %] > <textarea name="pref_[% CHUNK.name | html %]" id="pref_[% CHUNK.name | html %]" class="preference preference-[% CHUNK.class or "short" | html %] mce" rows="20" cols="60">[% CHUNK.value | html %]</textarea> > [% ELSE %] >- <a class="expand-textarea" id="expand_[% CHUNK.name | html %]" data-target="[% CHUNK.name | html %]" data-syntax="[% CHUNK.syntax | html %]" href="#">Click to edit</a> >+ <a class="expand-textarea" id="expand_[% CHUNK.name | html %]" data-target="[% CHUNK.name | html %]" data-syntax="[% CHUNK.syntax | html %]" href="#">Edit</a> > <textarea style="display:none" name="pref_[% CHUNK.name | html %]" id="pref_[% CHUNK.name | html %]" class="preference preference-[% CHUNK.class or "short" | html %] codemirror" rows="10" cols="40">[% CHUNK.value | html %]</textarea> >- <a class="collapse-textarea" id="collapse_[% CHUNK.name | html %]" data-target="[% CHUNK.name | html %]" data-syntax="[% CHUNK.syntax | html %]" style="display:none" href="#">Click to collapse</br></a> >+ <a class="collapse-textarea" id="collapse_[% CHUNK.name | html %]" data-target="[% CHUNK.name | html %]" data-syntax="[% CHUNK.syntax | html %]" style="display:none" href="#">Collapse</br></a> > [% END %] > [% ELSIF ( CHUNK.type_languages ) %] > <ul class="sortable"> >diff --git a/koha-tmpl/intranet-tmpl/prog/js/pages/preferences.js b/koha-tmpl/intranet-tmpl/prog/js/pages/preferences.js >index 53a0db82eab..d13ec127c33 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/pages/preferences.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/pages/preferences.js >@@ -211,17 +211,17 @@ $( document ).ready( function () { > > addCollapseHandler(); > >- $("h3").attr("class", "expanded").attr("title", __("Click to collapse this section")); >+ $("h3").attr("class", "expanded").attr("title", __("Collapse this section")); > var collapsible = $(".collapsed,.expanded"); > > $(collapsible).on("click",function(){ > var h3Id = $(this).attr("id"); > var panel = $("#collapse_" + h3Id); > if(panel.is(":visible")){ >- $(this).addClass("collapsed").removeClass("expanded").attr("title", __("Click to expand this section") ); >+ $(this).addClass("collapsed").removeClass("expanded").attr("title", __("Expand this section") ); > panel.hide(); > } else { >- $(this).addClass("expanded").removeClass("collapsed").attr("title", __("Click to collapse this section") ); >+ $(this).addClass("expanded").removeClass("collapsed").attr("title", __("Collapse this section") ); > panel.show(); > } > }); >@@ -233,7 +233,7 @@ $( document ).ready( function () { > href = href.replace("#",""); > var panel = $("#collapse_" + href ); > if( panel.is(":hidden") ){ >- $("#" + href).addClass("expanded").removeClass("collapsed").attr("title", __("Click to collapse this section") ); >+ $("#" + href).addClass("expanded").removeClass("collapsed").attr("title", __("Collapse this section") ); > panel.show(); > } > }); >@@ -406,8 +406,8 @@ $( document ).ready( function () { > ' <div class="consentRow codeRow">' + > ' <textarea style="display:none;" id="pref_' + id + '" class="preference preference-code codemirror" rows="10" cols="40">' + code + '</textarea>' + > ' <div>' + >- ' <a id="expand_' + id + '" class="expand-textarea" data-target="' + id + '" data-syntax="javascript" href="#">' + __('Click to expand') + '</a>' + >- ' <a id="collapse_' + id + '" class="collapse-textarea" data-target="' + id + '" data-syntax="javascript" href="#" style="display:none">' + __('Click to collapse') + '</a>' + >+ ' <a id="expand_' + id + '" class="expand-textarea" data-target="' + id + '" data-syntax="javascript" href="#">' + __('Expand') + '</a>' + >+ ' <a id="collapse_' + id + '" class="collapse-textarea" data-target="' + id + '" data-syntax="javascript" href="#" style="display:none">' + __('Collapse') + '</a>' + > ' </div >' + > ' </div>' + > ' <a class="consentDelete" data-target="' + id + '" href="#">' + __('Delete') + '</a>' + >-- >2.43.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 35528
:
159699
|
159708
| 159954