Bugzilla – Attachment 9840 Details for
Bug 8163
Click to populate XSLT preferences with "default" or empty values
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 8163 - Click to populate XSLT preferences with "default" or empty values
Bug-8163---Click-to-populate-XSLT-preferences-with.patch (text/plain), 5.93 KB, created by
Owen Leonard
on 2012-05-29 19:12:02 UTC
(
hide
)
Description:
Bug 8163 - Click to populate XSLT preferences with "default" or empty values
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2012-05-29 19:12:02 UTC
Size:
5.93 KB
patch
obsolete
>From d36178715654923f5756c5eae2871a4b4fd3c964 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Tue, 29 May 2012 15:07:32 -0400 >Subject: [PATCH] Bug 8163 - Click to populate XSLT preferences with "default" > or empty values >Content-Type: text/plain; charset="utf-8" > >This patch adds markup and JavaScript to the system preferences >interface so that the user can click "default" or "empty" to populate >an XSLT-related pref with those vaules. > >To test, open system preferences for the OPAC or staff client. In >the description for an XSLT-related preference click the "default" >link to populate the field with "default." Click the "leave empty" >link to empty the field. >--- > .../intranet-tmpl/prog/en/js/pages/preferences.js | 12 ++++++++++++ > .../prog/en/modules/admin/preferences/opac.pref | 4 ++-- > .../en/modules/admin/preferences/staff_client.pref | 4 ++-- > 3 files changed, 16 insertions(+), 4 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/pages/preferences.js b/koha-tmpl/intranet-tmpl/prog/en/js/pages/preferences.js >index 93dfaac..9f9f6f8 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/js/pages/preferences.js >+++ b/koha-tmpl/intranet-tmpl/prog/en/js/pages/preferences.js >@@ -59,6 +59,18 @@ $( document ).ready( function () { > mark_modified.call(this); > } ); > >+ $(".default").click(function(){ >+ var action = $(this).attr("id").split("_"); >+ $("#pref_"+action[1]).attr("value","default"); >+ return false; >+ }); >+ >+ $(".leaveempty").click(function(){ >+ var action = $(this).attr("id").split("_"); >+ $("#pref_"+action[1]).removeAttr("value"); >+ return false; >+ }); >+ > window.onbeforeunload = function () { > if ( KOHA.Preferences.Modified ) { > return MSG_MADE_CHANGES; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref >index e4ea15b..d4ed508 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref >@@ -59,12 +59,12 @@ OPAC: > - 'Display OPAC results using XSLT stylesheet at: ' > - pref: OPACXSLTResultsDisplay > class: file >- - '<br />Options:<br />- leave empty for "no xslt"<br />- enter "default" for the default one<br />- put a path to define a xslt file<br />- put an URL for an external specific stylesheet.<br />{langcode} will be replaced with current interface language' >+ - '<br />Options:<ul><li><a href="#" class="leaveempty" id="empty_OPACXSLTResultsDisplay">leave empty</a> for "no xslt"</li><li>enter "<a href="#" class="default" id="default_OPACXSLTResultsDisplay">default</a>" for the default one</li><li> put a path to define a xslt file</li><li>put an URL for an external specific stylesheet.</li></ul>{langcode} will be replaced with current interface language' > - > - 'Display OPAC details using XSLT stylesheet at: ' > - pref: OPACXSLTDetailsDisplay > class: file >- - '<br />Options:<br />- leave empty for "no xslt"<br />- enter "default" for the default one<br />- put a path to define a xslt file<br />- put an URL for an external specific stylesheet.<br />{langcode} will be replaced with current interface language' >+ - '<br />Options:<ul><li><a href="#" class="leaveempty" id="empty_OPACXSLTDetailsDisplay">leave empty</a> for "no xslt"</li><li>enter "<a href="#" class="default" id="default_OPACXSLTDetailsDisplay">default</a>" for the default one</li><li>put a path to define a xslt file</li><li>put an URL for an external specific stylesheet.</li></ul>{langcode} will be replaced with current interface language' > - > - On pages displayed with XSLT stylesheets on the OPAC, > - pref: DisplayOPACiconsXSLT >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_client.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_client.pref >index b93f8fd..715d9d6 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_client.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_client.pref >@@ -54,12 +54,12 @@ Staff Client: > - 'Display results in the staff client using XSLT stylesheet at: ' > - pref: XSLTResultsDisplay > class: file >- - '<br />Options:<br />- leave empty for "no xslt"<br />- enter "default" for the default one<br />- put a path to define a xslt file<br />- put an URL for an external specific stylesheet.<br />{langcode} will be replaced with current interface language' >+ - '<br />Options:<ul><li><a href="#" class="leaveempty" id="empty_XSLTResultsDisplay">leave empty</a> for "no xslt"</li><li>enter "<a href="#" class="default" id="default_XSLTResultsDisplay">default</a>" for the default one</li><li> put a path to define a xslt file</li><li>put an URL for an external specific stylesheet.</li></ul>{langcode} will be replaced with current interface language' > - > - 'Display details in the staff client using XSLT stylesheet at: ' > - pref: XSLTDetailsDisplay > class: file >- - '<br />Options:<br />- leave empty for "no xslt"<br />- enter "default" for the default one<br />- put a path to define a xslt file<br />- put an URL for an external specific stylesheet.<br />{langcode} will be replaced with current interface language' >+ - '<br />Options:<ul><li><a href="#" class="leaveempty" id="empty_XSLTDetailsDisplay">leave empty</a> for "no xslt"</li><li>enter "<a href="#" class="default" id="default_XSLTDetailsDisplay">default</a>" for the default one</li><li>put a path to define a xslt file</li><li>put an URL for an external specific stylesheet.</li></ul>{langcode} will be replaced with current interface language' > - > - Use the Yahoo UI libraries > - pref: yuipath >-- >1.7.9.5
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 8163
:
9840
|
11086
|
11107
|
11109
|
13181
|
13319