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>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 26447c5a68)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Katrin Fischer 2023-12-10 14:55:20 +00:00 committed by Fridolin Somers
parent c50442ac3a
commit b1025849ff
2 changed files with 9 additions and 9 deletions

View file

@ -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">

View file

@ -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>' +