Bugzilla – Attachment 82887 Details for
Bug 20935
Redesign system preferences interface
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20935: Add in-page links to the sidebar
Bug-20935-Add-in-page-links-to-the-sidebar.patch (text/plain), 17.65 KB, created by
Owen Leonard
on 2018-12-05 19:12:43 UTC
(
hide
)
Description:
Bug 20935: Add in-page links to the sidebar
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2018-12-05 19:12:43 UTC
Size:
17.65 KB
patch
obsolete
>From 17352ff89e308bc6636ba31550fb537c8961f5b2 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Wed, 5 Dec 2018 18:34:42 +0000 >Subject: [PATCH] Bug 20935: Add in-page links to the sidebar > >This patch adds links to the sidebar menu which allow the user to jump >to a section within the page. >--- > koha-tmpl/intranet-tmpl/prog/css/preferences.css | 42 +++-- > .../intranet-tmpl/prog/en/includes/prefs-menu.inc | 191 +++++++++++++++++++-- > .../prog/en/modules/admin/preferences.tt | 13 +- > .../intranet-tmpl/prog/js/pages/preferences.js | 25 +-- > 4 files changed, 218 insertions(+), 53 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/css/preferences.css b/koha-tmpl/intranet-tmpl/prog/css/preferences.css >index da27393..76b7531 100644 >--- a/koha-tmpl/intranet-tmpl/prog/css/preferences.css >+++ b/koha-tmpl/intranet-tmpl/prog/css/preferences.css >@@ -27,13 +27,6 @@ a.collapse-textarea { > font-weight: bold; > } > >-dl { >- margin-left : 1em; >-} >-dt { >- padding : .1em; >-} >- > h2 { > background-color: #e6f0f2; > font-size: 150%; >@@ -80,28 +73,45 @@ span.overridden { > background: #FFF none; > border: 0; > color: #004D99; >- font-weight: normal; > font-size: 100%; >+ hyphens: auto; > margin: 0; > padding: .2em .5em; > text-align: right; >- text-decoration: underline; > } > >-dl.name-row { >- border-bottom: 1px solid #EEE; >- margin: .3em 0; >- margin-left: 1em; >- padding: .3em 0; >+#menu ul ul { >+ padding-left: 0; > } > >-.name-cell label { >+.name-row label { > font-weight: bold; > font-size: 130%; > color: #336699; > } > >+dl { >+ margin-left : 1em; >+} >+ >+dt { >+ padding : .1em; >+} >+ >+ > dd { >+ border-bottom: 1px solid #EEE; >+ line-height: 2em; >+ margin-bottom: 1em; >+ max-width: 75em; >+ padding: 0 0 1em 3em; > text-indent: 0; >- margin-left: 3em; >+} >+ >+dd li { >+ line-height: 1.5em; >+} >+ >+.modified-warning { >+ color: #006600; > } >\ No newline at end of file >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/prefs-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/prefs-menu.inc >index 3b2e2f7..413c389 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/prefs-menu.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/prefs-menu.inc >@@ -1,20 +1,175 @@ > <div id="menu"> >-<ul> >-[% IF ( acquisitions ) %]<li class="active">[% ELSE %]<li>[% END %]<a title="Acquisitions" href="/cgi-bin/koha/admin/preferences.pl?tab=acquisitions">Acquisitions</a></li> >-[% IF ( admin ) %]<li class="active">[% ELSE %]<li>[% END %]<a title="Administration" href="/cgi-bin/koha/admin/preferences.pl?tab=admin">Administration</a></li> >-[% IF ( authorities ) %]<li class="active">[% ELSE %]<li>[% END %]<a title="Authority Control" href="/cgi-bin/koha/admin/preferences.pl?tab=authorities">Authorities</a></li> >-[% IF ( cataloguing ) %]<li class="active">[% ELSE %]<li>[% END %]<a title="Cataloging" href="/cgi-bin/koha/admin/preferences.pl?tab=cataloguing">Cataloging</a></li> >-[% IF ( circulation ) %]<li class="active">[% ELSE %]<li>[% END %]<a title="Circulation" href="/cgi-bin/koha/admin/preferences.pl?tab=circulation">Circulation</a></li> >-[% IF ( enhanced_content ) %]<li class="active">[% ELSE %]<li>[% END %]<a title="Enhanced content settings" href="/cgi-bin/koha/admin/preferences.pl?tab=enhanced_content">Enhanced content</a></li> >-[% IF ( i18n_l10n ) %]<li class="active">[% ELSE %]<li>[% END %]<a title="Internationalization and localization" href="/cgi-bin/koha/admin/preferences.pl?tab=i18n_l10n">I18N/L10N</a></li> >-[% IF ( local_use ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/admin/systempreferences.pl">Local use</a></li> >-[% IF ( logs ) %]<li class="active">[% ELSE %]<li>[% END %]<a title="Transaction logs" href="/cgi-bin/koha/admin/preferences.pl?tab=logs">Logs</a></li> >-[% IF ( opac ) %]<li class="active">[% ELSE %]<li>[% END %]<a title="Online Public Access Catalog" href="/cgi-bin/koha/admin/preferences.pl?tab=opac">OPAC</a></li> >-[% IF ( patrons ) %]<li class="active">[% ELSE %]<li>[% END %]<a title="Patrons" href="/cgi-bin/koha/admin/preferences.pl?tab=patrons">Patrons</a></li> >-[% IF ( searching ) %]<li class="active">[% ELSE %]<li>[% END %]<a title="Searching" href="/cgi-bin/koha/admin/preferences.pl?tab=searching">Searching</a></li> >-[% IF ( serials ) %]<li class="active">[% ELSE %]<li>[% END %]<a title="Serials" href="/cgi-bin/koha/admin/preferences.pl?tab=serials">Serials</a></li> >-[% IF ( staff_client ) %]<li class="active">[% ELSE %]<li>[% END %]<a title="Staff client" href="/cgi-bin/koha/admin/preferences.pl?tab=staff_client">Staff client</a></li> >-[% IF ( tools ) %]<li class="active">[% ELSE %]<li>[% END %]<a title="Tools" href="/cgi-bin/koha/admin/preferences.pl?tab=tools">Tools</a></li> >-[% IF ( web_services ) %]<li class="active">[% ELSE %]<li>[% END %]<a title="Web services" href="/cgi-bin/koha/admin/preferences.pl?tab=web_services">Web services</a></li> >-</ul> >+ <ul> >+ [% IF ( acquisitions ) %] >+ <li class="active"> >+ <a title="Acquisitions" href="/cgi-bin/koha/admin/preferences.pl?tab=acquisitions">Acquisitions</a> >+ [% PROCESS subtabs %] >+ [% ELSE %] >+ <li> >+ <a title="Acquisitions" href="/cgi-bin/koha/admin/preferences.pl?tab=acquisitions">Acquisitions</a> >+ [% END %] >+ </li> >+ >+ [% IF ( admin ) %] >+ <li class="active"> >+ <a title="Administration" href="/cgi-bin/koha/admin/preferences.pl?tab=admin">Administration</a> >+ [% PROCESS subtabs %] >+ [% ELSE %] >+ <li> >+ <a title="Administration" href="/cgi-bin/koha/admin/preferences.pl?tab=admin">Administration</a> >+ [% END %] >+ </li> >+ >+ [% IF ( authorities ) %] >+ <li class="active"> >+ <a title="Authority Control" href="/cgi-bin/koha/admin/preferences.pl?tab=authorities">Authorities</a> >+ [% PROCESS subtabs %] >+ [% ELSE %] >+ <li> >+ <a title="Authority Control" href="/cgi-bin/koha/admin/preferences.pl?tab=authorities">Authorities</a> >+ [% END %] >+ </li> >+ >+ [% IF ( cataloguing ) %] >+ <li class="active"> >+ <a title="Cataloging" href="/cgi-bin/koha/admin/preferences.pl?tab=cataloguing">Cataloging</a> >+ [% PROCESS subtabs %] >+ [% ELSE %] >+ <li> >+ <a title="Cataloging" href="/cgi-bin/koha/admin/preferences.pl?tab=cataloguing">Cataloging</a> >+ [% END %] >+ </li> >+ >+ [% IF ( circulation ) %] >+ <li class="active"> >+ <a title="Circulation" href="/cgi-bin/koha/admin/preferences.pl?tab=circulation">Circulation</a> >+ [% PROCESS subtabs %] >+ [% ELSE %] >+ <li> >+ <a title="Circulation" href="/cgi-bin/koha/admin/preferences.pl?tab=circulation">Circulation</a> >+ [% END %] >+ </li> >+ >+ [% IF ( enhanced_content ) %] >+ <li class="active"> >+ <a title="Enhanced content settings" href="/cgi-bin/koha/admin/preferences.pl?tab=enhanced_content">Enhanced content</a> >+ [% PROCESS subtabs %] >+ [% ELSE %] >+ <li> >+ <a title="Enhanced content settings" href="/cgi-bin/koha/admin/preferences.pl?tab=enhanced_content">Enhanced content</a> >+ [% END %] >+ </li> >+ >+ [% IF ( i18n_l10n ) %] >+ <li class="active"> >+ <a title="Internationalization and localization" href="/cgi-bin/koha/admin/preferences.pl?tab=i18n_l10n">I18N/L10N</a> >+ [% PROCESS subtabs %] >+ [% ELSE %] >+ <li> >+ <a title="Internationalization and localization" href="/cgi-bin/koha/admin/preferences.pl?tab=i18n_l10n">I18N/L10N</a> >+ [% END %] >+ </li> >+ >+ [% IF ( local_use ) %] >+ <li class="active"> >+ <a href="/cgi-bin/koha/admin/systempreferences.pl">Local use</a> >+ [% PROCESS subtabs %] >+ [% ELSE %] >+ <li> >+ <a href="/cgi-bin/koha/admin/systempreferences.pl">Local use</a> >+ [% END %] >+ </li> >+ >+ [% IF ( logs ) %] >+ <li class="active"> >+ <a title="Transaction logs" href="/cgi-bin/koha/admin/preferences.pl?tab=logs">Logs</a> >+ [% PROCESS subtabs %] >+ [% ELSE %] >+ <li> >+ <a title="Transaction logs" href="/cgi-bin/koha/admin/preferences.pl?tab=logs">Logs</a> >+ [% END %] >+ </li> >+ >+ [% IF ( opac ) %] >+ <li class="active"> >+ <a title="Online Public Access Catalog" href="/cgi-bin/koha/admin/preferences.pl?tab=opac">OPAC</a> >+ [% PROCESS subtabs %] >+ [% ELSE %] >+ <li> >+ <a title="Online Public Access Catalog" href="/cgi-bin/koha/admin/preferences.pl?tab=opac">OPAC</a> >+ [% END %] >+ </li> >+ >+ [% IF ( patrons ) %] >+ <li class="active"> >+ <a title="Patrons" href="/cgi-bin/koha/admin/preferences.pl?tab=patrons">Patrons</a> >+ [% PROCESS subtabs %] >+ [% ELSE %] >+ <li> >+ <a title="Patrons" href="/cgi-bin/koha/admin/preferences.pl?tab=patrons">Patrons</a> >+ [% END %] >+ </li> >+ >+ [% IF ( searching ) %] >+ <li class="active"> >+ <a title="Searching" href="/cgi-bin/koha/admin/preferences.pl?tab=searching">Searching</a> >+ [% PROCESS subtabs %] >+ [% ELSE %] >+ <li> >+ <a title="Searching" href="/cgi-bin/koha/admin/preferences.pl?tab=searching">Searching</a> >+ [% END %] >+ </li> >+ >+ [% IF ( serials ) %] >+ <li class="active"> >+ <a title="Serials" href="/cgi-bin/koha/admin/preferences.pl?tab=serials">Serials</a> >+ [% PROCESS subtabs %] >+ [% ELSE %] >+ <li> >+ <a title="Serials" href="/cgi-bin/koha/admin/preferences.pl?tab=serials">Serials</a> >+ [% END %] >+ </li> >+ >+ [% IF ( staff_client ) %] >+ <li class="active"> >+ <a title="Staff client" href="/cgi-bin/koha/admin/preferences.pl?tab=staff_client">Staff client</a> >+ [% PROCESS subtabs %] >+ [% ELSE %] >+ <li> >+ <a title="Staff client" href="/cgi-bin/koha/admin/preferences.pl?tab=staff_client">Staff client</a> >+ [% END %] >+ </li> >+ >+ [% IF ( tools ) %] >+ <li class="active"> >+ <a title="Tools" href="/cgi-bin/koha/admin/preferences.pl?tab=tools">Tools</a> >+ [% PROCESS subtabs %] >+ [% ELSE %] >+ <li> >+ <a title="Tools" href="/cgi-bin/koha/admin/preferences.pl?tab=tools">Tools</a> >+ [% END %] >+ </li> >+ >+ [% IF ( web_services ) %] >+ <li class="active"> >+ <a title="Web services" href="/cgi-bin/koha/admin/preferences.pl?tab=web_services">Web services</a> >+ [% PROCESS subtabs %] >+ [% ELSE %] >+ <li> >+ <a title="Web services" href="/cgi-bin/koha/admin/preferences.pl?tab=web_services">Web services</a> >+ [% END %] >+ </li> >+ </ul> > </div> >+ >+[% BLOCK subtabs %] >+ [% FOREACH TAB IN TABS %] >+ <ul> >+ [% FOREACH LINE IN TAB.LINES %] >+ [% IF ( LINE.is_group_title ) %] >+ <li><a class="pref_sublink" href="#[% LINE.title | html %]">[% LINE.title | html %]</a></li> >+ [% END %] >+ [% END %] >+ </ul> >+ [% END %] >+[% END %] >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 d27b39d..435bb64 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt >@@ -36,15 +36,14 @@ > <h1>You searched for: [% searchfield | html %]</h1> > [% END %] > [% IF ( searchfield && !search_not_found ) %] >- <p> >+ <div id="toolbar"> > Results in sections: > [% FOREACH TAB IN TABS %] > <a href="#[% TAB.tab_title %]">[% TAB.tab_title %]</a>[% UNLESS ( loop.last ) %] • [% END %] > [% END %] >- </p> >- [% END %] >- [% IF ( searchfield ) %] >- <label for="keyword_filter">Filter: <input type="text" size="10" name="keyword_filter" id="keyword_filter" /> <a href="#" id="clear_filter" style="display:none;"><i class="fa fa-remove"></i></a></label> >+ • <label for="keyword_filter">Filter: <input type="text" size="10" name="keyword_filter" id="keyword_filter" /> <a href="#" id="clear_filter" style="display:none;"><i class="fa fa-remove"></i></a></label> >+ </div> >+ > [% END %] > [% FOREACH TAB IN TABS %] > <div class="prefs-tab"> >@@ -54,7 +53,7 @@ > [% UNLESS ( searchfield ) %] > <div id="toolbar"> > <button class="save-all submit" type="submit">Save all [% TAB.tab_title | html %] preferences</button> >- <label for="keyword_filter">Filter: <input type="text" size="10" name="keyword_filter" id="keyword_filter" /> <a href="#" id="clear_filter" style="display:none;"><i class="fa fa-remove"></i></a></label> >+ • <label for="keyword_filter">Filter: <input type="text" size="10" name="keyword_filter" id="keyword_filter" /> <a href="#" id="clear_filter" style="display:none;"><i class="fa fa-remove"></i></a></label> > </div> > [% END %] > <input type="hidden" name="op" value="save" /> >@@ -62,7 +61,7 @@ > [% FOREACH LINE IN TAB.LINES %] > [% IF ( LINE.is_group_title ) %] > [% UNLESS ( loop.first ) %][% END %] >- <h3 class="name-row">[% LINE.title | html %]</h3> >+ <h3 id="[% LINE.title | html %]" class="name-row">[% LINE.title | html %]</h3> > [% UNLESS ( loop.last ) %][% END %] > [% ELSE %] > [% IF ( loop.first ) %][% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/js/pages/preferences.js b/koha-tmpl/intranet-tmpl/prog/js/pages/preferences.js >index 2cb1ac1..ae4c2c7 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/pages/preferences.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/pages/preferences.js >@@ -1,5 +1,6 @@ >-// We can assume 'KOHA' exists, as we depend on KOHA.AJAX >+/* global KOHA to_highlight search_jumped MSG_NOTHING_TO_SAVE MSG_SAVING MSG_SAVED_PREFERENCE MSG_MODIFIED MSG_MADE_CHANGES MSG_FILTER_NOT_FOUND humanMsg */ > >+// We can assume 'KOHA' exists, as we depend on KOHA.AJAX > KOHA.Preferences = { > Save: function ( form ) { > modified_prefs = $( form ).find( '.modified' ); >@@ -11,7 +12,7 @@ KOHA.Preferences = { > unserialized.push($(this)); > } > }); >- data = modified_prefs.serialize(); >+ var data = modified_prefs.serialize(); > $(unserialized).each(function(){ > data += '&' + $(this).attr('name') + '='; > }); >@@ -23,8 +24,8 @@ KOHA.Preferences = { > KOHA.AJAX.Submit( { > data: data, > url: '/cgi-bin/koha/svc/config/systempreferences/', >- success: function ( data ) { KOHA.Preferences.Success( form ) }, >- complete: function () { KOHA.AJAX.MarkDone( $( form ).find( '.save-all' ) ) } >+ success: function () { KOHA.Preferences.Success( form ); }, >+ complete: function () { KOHA.AJAX.MarkDone( $( form ).find( '.save-all' ) ); } > } ); > }, > Success: function ( form ) { >@@ -48,7 +49,7 @@ $( document ).ready( function () { > function mark_modified() { > $( this.form ).find( '.save-all' ).prop('disabled', false); > $( this ).addClass( 'modified' ); >- var name_cell = $( this ).parents( '.name-row' ).find( '.name-cell' ); >+ var name_cell = $( this ).parent(); > if ( !name_cell.find( '.modified-warning' ).length ) > name_cell.append( '<em class="modified-warning">('+MSG_MODIFIED+')</em>' ); > KOHA.Preferences.Modified = true; >@@ -74,8 +75,8 @@ $( document ).ready( function () { > return false; > }); > >- $("dl.sortable").sortable(); >- $("dl.sortable").on( "sortchange", function( event, ui ) { >+ $(".sortable").sortable(); >+ $(".sortable").on( "sortchange", function( event, ui ) { > // This is not exact but we just need to trigger a change > $(ui.item.find('input:first')).change(); > } ); >@@ -84,9 +85,9 @@ $( document ).ready( function () { > if ( KOHA.Preferences.Modified ) { > return MSG_MADE_CHANGES; > } >- } >+ }; > >- $( '.prefs-tab .action .cancel' ).click( function () { KOHA.Preferences.Modified = false } ); >+ $( '.prefs-tab .action .cancel' ).click( function () { KOHA.Preferences.Modified = false; } ); > > $( '.prefs-tab .save-all' ).prop('disabled', true).click( function () { > KOHA.Preferences.Save( this.form ); >@@ -118,8 +119,8 @@ $( document ).ready( function () { > > > // Filtering by mark.js >- var keyword_filter = $("#keyword_filter"), >- context = $(".name-row"); >+ var keyword_filter = $("#keyword_filter"); >+ var context = $(".name-row"); > $("#clear_filter").on("click", function(e){ > e.preventDefault(); > keyword_filter.val("").trigger("input"); >@@ -136,7 +137,7 @@ $( document ).ready( function () { > $("#filter_empty").remove(); > } > }, >- noMatch: function(term){ >+ noMatch: function(){ > if( $("#filter_empty").length < 1 ){ > $("main").prepend("<div id=\"filter_empty\" class=\"dialog alert\">" + MSG_FILTER_NOT_FOUND + "</div>"); > } >-- >2.1.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 20935
:
76039
|
76040
|
76041
|
76097
|
76106
|
76548
|
76664
|
76754
|
76755
|
77163
|
77165
|
77166
|
77167
|
77707
|
77708
|
77709
|
77844
|
77845
|
77846
|
79177
|
79178
|
79179
|
82884
|
82885
|
82886
|
82887
|
82888
|
86784
|
86785
|
86786
|
86787
|
86788
|
86833
|
86834
|
86835
|
86836
|
86837
|
89936
|
89937
|
89938
|
89939
|
89940