Bug 9052 - rewrite the YUI links to use the system library
authorRobin Sheat <robin@catalyst.net.nz>
Fri, 14 Dec 2012 02:45:40 +0000 (15:45 +1300)
committerJared Camins-Esakov <jcamins@cpbibliography.com>
Mon, 17 Dec 2012 14:03:36 +0000 (09:03 -0500)
This uses libjs-yui to provide the skin.css and reset-fonts-grids.css
files from YUI. It patches the CSS files to point to the right location
for the files.

To test:
* Build a package with this patch included
* Install it
* Look at the OPAC and note that things no longer look terrible, and
  that there are no 404's coming from bad CSS URLs.

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
I created a package of 3.10+9052, installed and tested.
I confirm that the OPAC does not look broken anymore
and I could not find 404 errors with Firebug.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
I also created a package of 3.10+9052 and removed libchi-* from the
debian/control file. The OPAC shows no problems using those packages,
layout, pictures and colors seem to all be in place.
Also the OPAC on master with patch applied still works as expected.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
debian/rules
koha-tmpl/opac-tmpl/prog/en/css/opac.css
koha-tmpl/opac-tmpl/prog/en/includes/doc-head-close.inc

index cb2eee3..0b75d09 100755 (executable)
@@ -92,10 +92,12 @@ override_dh_auto_install:
                $(TMP)/usr/share/koha/opac/htdocs/opac-tmpl/prog/en/css
        install -m 0644 koha-tmpl/intranet-tmpl/prog/en/lib/yui/sprite.png  \
                $(TMP)/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/css
+       sed -i -e 's:url(.*/reset-fonts-grids.css.*):url("/opac-tmpl/lib/yui/reset-fonts-grids/reset-fonts-grids.css"):' \
+                  -e 's:url(.*/skin.css.*):url("/opac-tmpl/lib/yui/assets/skins/sam/skin.css"):' \
+               $(TMP)/usr/share/koha/opac/htdocs/opac-tmpl/prog/en/css/opac.css \
+               $(TMP)/usr/share/koha/opac/htdocs/opac-tmpl/prog/en/css/sco.css
        sed -i -e 's:url(.*/reset-fonts-grids.css.*):url(reset-fonts-grids.css):' \
                   -e 's:url(.*/skin.css.*):url(skin.css):' \
-               $(TMP)/usr/share/koha/opac/htdocs/opac-tmpl/prog/en/css/opac.css \
-               $(TMP)/usr/share/koha/opac/htdocs/opac-tmpl/prog/en/css/sco.css \
                $(TMP)/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/css/staff-global*.css
        mkdir -p $(TMP)/debian/tmp_docbook
        xsltproc --output $(TMP)/debian/tmp_docbook/ \
index 4530275..d14ea50 100644 (file)
@@ -1,3 +1,6 @@
+@import url("/opac-tmpl/lib/yui/reset-fonts-grids.css");
+@import url("/opac-tmpl/lib/yui/skin.css");
+
 a {
        font-weight : bold;
 }
index 4f0e540..1bc9eb3 100644 (file)
@@ -3,8 +3,6 @@
 <meta name="generator" content="Koha [% Version %]" /> <!-- leave this for stats -->
 <link rel="shortcut icon" href="[% IF ( OpacFavicon ) %][% OpacFavicon %][% ELSE %][% themelang %]/includes/favicon.ico[% END %]" type="image/x-icon" />
 <link rel="stylesheet" type="text/css" href="[% themelang %]/lib/jquery/jquery-ui.css" />
-<link rel="stylesheet" type="text/css" href="/opac-tmpl/lib/yui/reset-fonts-grids.css" />
-<link rel="stylesheet" type="text/css" href="/opac-tmpl/lib/yui/skin.css" />
 [% SET opaclayoutstylesheet='opac.css' UNLESS opaclayoutstylesheet %]
 [% IF (opaclayoutstylesheet.match('^https?:|^\/')) %]
     <link rel="stylesheet" type="text/css" href="[% opaclayoutstylesheet %]" />