Bugzilla – Attachment 18787 Details for
Bug 10405
User-editable sections should have ids
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10405: add IDs for custom regions
Bug-10405-add-IDs-for-custom-regions.patch (text/plain), 8.92 KB, created by
Jared Camins-Esakov
on 2013-06-09 20:13:39 UTC
(
hide
)
Description:
Bug 10405: add IDs for custom regions
Filename:
MIME Type:
Creator:
Jared Camins-Esakov
Created:
2013-06-09 20:13:39 UTC
Size:
8.92 KB
patch
obsolete
>From 02b6f0da140988aff16a3c6e7b34abdddacf410d Mon Sep 17 00:00:00 2001 >From: Jared Camins-Esakov <jcamins@cpbibliography.com> >Date: Sat, 8 Jun 2013 16:16:07 -0400 >Subject: [PATCH] Bug 10405: add IDs for custom regions > >This patch adds unique IDs for: >opaccredits >opacheader >OPACMobileUserCSS >OpacNavBottom >OpacUserCSS >opacuserjs > >This is most useful for previewing changes you make in the OPAC >preferences using the following javascript in your IntranetUserJS: > >function showPreview(url) { > $('#preview-loading').show(); > document.getElementById('opac-preview').src = url; > $('#opac-preview').load(function () { > $('#opac-preview').show(); > $('#region-opaccredits', $('#opac-preview').contents()).html($('#pref_opaccredits').val()); > $('#region-opacheader', $('#opac-preview').contents()).html($('#pref_opacheader').val()); > $('#opacmainuserblock', $('#opac-preview').contents()).html($('#pref_OpacMainUserBlock').val()); > $('#opacmainuserblockmobile', $('#opac-preview').contents()).html($('#pref_OpacMainUserBlockMobile').val()); > $('#region-opacnav', $('#opac-preview').contents()).html($('#pref_OpacNav').val()); > $('#region-opacnavbottom', $('#opac-preview').contents()).html($('#pref_OpacNavBottom').val()); > $('#opacrightsidebar', $('#opac-preview').contents()).html($('#pref_OpacNavRight').val()); > $('#noresultsfound', $('#opac-preview').contents()).html($('#pref_OPACNoResultsFound').val()); > $('#opacresultssidebar', $('#opac-preview').contents()).html($('#pref_OPACResultsSidebar').val()); > $('#region-opacusercss', $('#opac-preview').contents()).replaceWith('<style id="region-opacusercss" type="text/css">' + $('#pref_OPACUserCSS').val() + '</style>'); > > $('#region-opacuserjs', $('#opac-preview').contents()).replaceWith('<script id="region-opacuserjs" type="text/javascript">' + $('#pref_opacuserjs').val() + '</script>'); > $('#preview-loading').hide(); > }); >} > >$(document).ready(function () { > if ($('#pref_OpacNav').size() > 0) { > $('#doc3').after('<div class="navbar navbar-fixed-bottom" style="z-index: 10000;"><div id="preview-pane" class="navbar-inner"><h4 style="float: left; margin-right: 2em;">Preview changes</h4><div class="btn-group" data-toggle="buttons-radio"><button type="button" class="btn" id="preview-main">Main page</button><button type="button" class="btn" id="preview-results">Results</button><button type="button" class="btn" id="preview-details">Details</button><button type="button" class="btn active" id="preview-hide">Hide</button></div><img id="preview-loading" style="display: none;" src="/intranet-tmpl/prog/img/loading-small.gif"><iframe id="opac-preview" style="height: 20em; width: 100%; display: none;"></iframe></div></div>'); > > $('#preview-main').click(function () { > showPreview('/cgi-bin/koha/opac/opac-main.pl'); > }); > $('#preview-results').click(function () { > showPreview('/cgi-bin/koha/opac/opac-search.pl?idx=&q=pqf%3D%40attr+1%3D_ALLRECORDS+%40attr+2%3D103+%22%22&branch_group_limit='); > }); > $('#preview-details').click(function () { > showPreview('/cgi-bin/koha/opac/opac-detail.pl?biblionumber=1'); > }); > $('#preview-hide').click(function () { > $('#opac-preview').hide(); > $('#preview-loading').hide(); > }); > } >}); >--- > .../opac-tmpl/prog/en/includes/doc-head-close.inc | 12 ++++++++---- > koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc | 8 +++----- > .../opac-tmpl/prog/en/includes/navigation.inc | 5 ++++- > .../opac-tmpl/prog/en/includes/opac-bottom.inc | 8 +++----- > .../opac-tmpl/prog/en/includes/opac-facets.inc | 3 --- > koha-tmpl/opac-tmpl/prog/en/modules/opac-main.tt | 6 +++--- > 6 files changed, 21 insertions(+), 21 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/prog/en/includes/doc-head-close.inc b/koha-tmpl/opac-tmpl/prog/en/includes/doc-head-close.inc >index 147b82c..1ccf24e 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/includes/doc-head-close.inc >+++ b/koha-tmpl/opac-tmpl/prog/en/includes/doc-head-close.inc >@@ -23,11 +23,11 @@ > [% IF persona %] > <link rel="stylesheet" type="text/css" href="[% themelang %]/css/persona-buttons.css" /> > [% END %] >-[% IF ( OPACMobileUserCSS ) %]<style type="text/css" media="screen and (max-width:700px)">[% OPACMobileUserCSS %]</style>[% END %] >+<style id="region-opacmobileusercss" type="text/css" media="screen and (max-width:700px)">[% OPACMobileUserCSS %]</style> > [% IF ( bidi ) %] > <link rel="stylesheet" type="text/css" href="[% themelang %]/css/right-to-left.css" /> > [% END %] >-[% IF ( OPACUserCSS ) %]<style type="text/css">[% OPACUserCSS %]</style>[% END %] >+<style id="region-opacusercss" type="text/css">[% OPACUserCSS %]</style> > <!-- yui js --> > <script type="text/javascript" src="[% yuipath %]/utilities/utilities.js"></script> > <script type="text/javascript" src="[% yuipath %]/container/container-min.js"></script> >@@ -94,8 +94,12 @@ > [% IF ( SyndeticsCoverImages ) %]$(window).load(function() { > verify_images(); > });[% END %] >- [% IF ( opacuserjs ) %][% opacuserjs %][% END %] >- //]]> >+ //]]> >+</script> >+<script id="region-opacuserjs" type="text/javascript"> >+ [% opacuserjs %] >+</script> >+<script type="text/javascript"> > [% IF ( opacbookbag ) %]</script><script type="text/javascript" src="[% themelang %]/js/basket.js"> > [% ELSIF ( virtualshelves ) %]</script><script type="text/javascript" src="[% themelang %]/js/basket.js"> > [% ELSE %]</script><script type="text/javascript">var readCookie;[% END %]</script> >diff --git a/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc b/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc >index 651e669..c4dedea 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc >+++ b/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc >@@ -14,9 +14,9 @@ > </ul> > [% END %] > </div> >- [% IF ( opacheader ) %] >- [% opacheader %] >- [% END %] >+<div id="region-opacheader"> >+ [% opacheader %] >+</div> > <div id="opac-main-search" class="yui-g"> > [% IF ( opacsmallimage ) %] > <h1 id="libraryname" style="background-image: url('[% opacsmallimage %]');"> >@@ -202,11 +202,9 @@ > You did not specify any search criteria. > [% END %] > </p> >-[% IF ( OPACNoResultsFound ) %] > <div id="noresultsfound"> > [% OPACNoResultsFound %] > </div> >-[% END %] > > </div> > [% END %]</p>[% END %]</div> >diff --git a/koha-tmpl/opac-tmpl/prog/en/includes/navigation.inc b/koha-tmpl/opac-tmpl/prog/en/includes/navigation.inc >index 9cd2c12..c3c25e6 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/includes/navigation.inc >+++ b/koha-tmpl/opac-tmpl/prog/en/includes/navigation.inc >@@ -1,6 +1,9 @@ >+<div id="region-opacnav"> > [% OpacNav %] >+</div> > [% IF IsPatronPage %] > [% INCLUDE usermenu.inc %] > [% END %] >+<div id="region-opacnavbottom"> > [% OpacNavBottom %] >- >+</div> >diff --git a/koha-tmpl/opac-tmpl/prog/en/includes/opac-bottom.inc b/koha-tmpl/opac-tmpl/prog/en/includes/opac-bottom.inc >index 7020673..ec17f80 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/includes/opac-bottom.inc >+++ b/koha-tmpl/opac-tmpl/prog/en/includes/opac-bottom.inc >@@ -1,8 +1,6 @@ >-[% IF ( opaccredits ) %] >- <div class="ft"> >- [% opaccredits %] >- </div> >-[% END %] >+<div id="region-opaccredits" class="ft"> >+ [% opaccredits %] >+</div> > </div> > > [% IF ( opaclanguagesdisplay || OpacKohaUrl ) %] >diff --git a/koha-tmpl/opac-tmpl/prog/en/includes/opac-facets.inc b/koha-tmpl/opac-tmpl/prog/en/includes/opac-facets.inc >index fbb7c55..f575da9 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/includes/opac-facets.inc >+++ b/koha-tmpl/opac-tmpl/prog/en/includes/opac-facets.inc >@@ -27,10 +27,7 @@ > [% END %] > </ul> > </div> >-[% IF ( OPACResultsSidebar ) %] > <div id="opacresultssidebar"> >-[% OPACResultsSidebar %] > </div> > [% END %] > [% END %] >-[% END %] >diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-main.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-main.tt >index 3844fc5..604c4be 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-main.tt >+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-main.tt >@@ -36,8 +36,8 @@ > <div id="daily-quote" class="container"><h1>Quote of the Day</h1><div><span id="daily-quote-text">[% daily_quote.text %]</span><span id="daily-quote-sep"> ~ </span><span id="daily-quote-source">[% daily_quote.source %]</span></div></div> > [% END %] > >- [% IF ( OpacMainUserBlock ) %]<div id="opacmainuserblock" class="container">[% OpacMainUserBlock %]</div>[% END %] >- [% IF ( OpacMainUserBlockMobile ) %]<div id="opacmainuserblockmobile" class="container">[% OpacMainUserBlockMobile %]</div>[% END %] >+<div id="opacmainuserblock" class="container">[% OpacMainUserBlock %]</div> >+<div id="opacmainuserblockmobile" class="container">[% OpacMainUserBlockMobile %]</div> > > </div> > >@@ -68,7 +68,7 @@ > [% END %] > [% END %] > [% END %] >- [% IF ( OpacNavRight ) %]<div id="opacrightsidebar" class="container">[% OpacNavRight %]</div>[% END %] >+ <div id="opacrightsidebar" class="container">[% OpacNavRight %]</div> > </div> > [% END %] > </div> >-- >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 10405
:
18787
|
18788
|
18831
|
19051