Bugzilla – Attachment 18218 Details for
Bug 9558
Customize CSS for mobile
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9558 - Customize CSS for mobile
Bug-9558---Customize-CSS-for-mobile.patch (text/plain), 2.90 KB, created by
Owen Leonard
on 2013-05-17 18:35:35 UTC
(
hide
)
Description:
Bug 9558 - Customize CSS for mobile
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2013-05-17 18:35:35 UTC
Size:
2.90 KB
patch
obsolete
>From 84fd062b54bae62924b8c1f1fe5bb4d1a88c1460 Mon Sep 17 00:00:00 2001 >From: Zachary Spalding <spalding@senylrc.org> >Date: Fri, 17 May 2013 14:11:05 -0400 >Subject: [PATCH] Bug 9558 - Customize CSS for mobile >Content-Type: text/plain; charset="utf-8" > >It is possible to use an environment variable to specify a custom >stylesheet for different libraries in a multi-library system: >$ENV{'OPAC_CSS_OVERRIDE'}. This patch adds an additional option to >override the CCSR theme's mobile stylesheet. > >To test: > >- Create a custom stylesheet and add it alongside CCSR's other CSS > files. >- Add a simple CSS rule which will be obvious in testing. For example: > > form#searchform { background-color: red; } > >- Modify the configuration file for your OPAC to add a line > specifying a new custom stylesheet: > > SetEnv OPAC_CSS_OVERRIDE_MOBILE <name of CSS file> > >- Restart Apache. > >- Switch the OPAC theme to 'CCSR' >- Clear your browser cache >- View any page in the OPAC. If you browser is wider than 700 pixels the > OPAC should appear normal. Below 700 pixels wide you should see your > custom CSS applied (a red background on the search bar if you used the > above example. > >The changes in this patch are courtesy Zachary Spalding as described in >Bug 9558. Patch and test plan created by Owen Leonard. >--- > C4/Auth.pm | 1 + > .../opac-tmpl/ccsr/en/includes/doc-head-close.inc | 3 +++ > 2 files changed, 4 insertions(+) > >diff --git a/C4/Auth.pm b/C4/Auth.pm >index ca061b5..ea269db 100644 >--- a/C4/Auth.pm >+++ b/C4/Auth.pm >@@ -416,6 +416,7 @@ sub get_template_and_user { > OPACBaseURL => ($in->{'query'}->https() ? "https://" : "http://") . $ENV{'SERVER_NAME'} . > ($ENV{'SERVER_PORT'} eq ($in->{'query'}->https() ? "443" : "80") ? '' : ":$ENV{'SERVER_PORT'}"), > opac_css_override => $ENV{'OPAC_CSS_OVERRIDE'}, >+ opac_css_override_mobile => $ENV{'OPAC_CSS_OVERRIDE_MOBILE'}, > opac_search_limit => $opac_search_limit, > opac_limit_override => $opac_limit_override, > OpacBrowser => C4::Context->preference("OpacBrowser"), >diff --git a/koha-tmpl/opac-tmpl/ccsr/en/includes/doc-head-close.inc b/koha-tmpl/opac-tmpl/ccsr/en/includes/doc-head-close.inc >index fcbab2a..eb71770 100644 >--- a/koha-tmpl/opac-tmpl/ccsr/en/includes/doc-head-close.inc >+++ b/koha-tmpl/opac-tmpl/ccsr/en/includes/doc-head-close.inc >@@ -18,6 +18,9 @@ > <link rel="stylesheet" type="text/css" href="[% themelang %]/css/[% opaccolorstylesheet %]" /> > [% END %] > [% END %] >+[% IF ( opac_css_override_mobile ) %] >+ <link rel="stylesheet" type="text/css" media="screen and (max-width:700px)" href="[% themelang %]/css/[% opac_css_override_mobile %]" /> >+ [% END %] > [% IF ( opac_css_override ) %] > <link rel="stylesheet" type="text/css" href="[% themelang %]/css/[% opac_css_override %]" /> > [% END %] >-- >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 9558
:
18218
|
18637