From e13046d178da70aeae4bc4b9272fce656b9e0d01 Mon Sep 17 00:00:00 2001 From: D Ruth Bavousett Date: Mon, 14 May 2012 22:45:45 -0700 Subject: [PATCH 2/2] Bug 8061: RTL CSS overrides (staff client) This patch tweaks a few templates, and enables right-to-left flipping via CSS in the staff client --- .../intranet-tmpl/prog/en/css/right-to-left.css | 271 ++++++++++++++++++++ .../prog/en/includes/doc-head-close.inc | 3 + .../prog/en/modules/cataloguing/addbiblio.tt | 2 +- .../prog/en/modules/cataloguing/additem.tt | 2 +- .../prog/en/modules/members/member-flags.tt | 2 +- 5 files changed, 277 insertions(+), 3 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/en/css/right-to-left.css diff --git a/koha-tmpl/intranet-tmpl/prog/en/css/right-to-left.css b/koha-tmpl/intranet-tmpl/prog/en/css/right-to-left.css new file mode 100644 index 0000000..177e5e4 --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/css/right-to-left.css @@ -0,0 +1,271 @@ +fieldset.rows ol.radio label, fieldset.rows li.radio label { float: right; margin: 0 1em 0 0.3em; } + + +/* Adjust text directions */ + +a.yuimenuitemlabel, +body, +caption, +div#toolbar, +div.rows span.label, +div.subfield_line label, +fieldset.rows.left label, +fieldset.rows.left span.label, +h1, +h2, +h3, +h4, +h5, +h6, +legend, +th, +odoc, +p, +ul li, +ul.toolbar, +#doc2, +#doc3, +#doc4, +.autocomplete .sample-result, +.ui-tabs-panel, +.yui-t1, +.yui-t2, +.yui-t3, +.yui-t4 +.yui-t5, +.yui-t6, +.yui-t7 +{ + text-align: right; +} + +#issuest th, +.column-tool +{ + text-align: center; +} + +/* Swap floats */ + +div.lang, +div.rows span.label, +div.subfield_line label, +div#header_search, +fieldset.action, +fieldset.rows, +fieldset.rows input, +fieldset.rows div.hint, +fieldset.rows img, +fieldset.rows label, +fieldset.rows li, +fieldset.rows ol.radio label.radio, +fieldset.rows select, +fieldset.rows span.label, +fieldset.rows textarea, +ol.bibliodetails, +ol.bibliodetails span.label, +p label, +span.required, +#marcDocsSelect, +#toplevelnav, +.treeview .hitarea, +.ui-tabs-nav li, +.yui-g div.first, +.yui-g p, +.yui-gb div.first, +.yui-gc div.first, +.yui-gc div.first div.first, +.yui-gd div.first, +.yui-ge div.first, +.yui-gf div.first, +.yui-t1 .yui-b, +.yui-t2 .yui-b, +.yui-t3 .yui-b +{ + float: right; +} + +a.buttondot +{ + float: left; +} + +ul li, +input, +.input_marceditor +{ + float: none; +} + +div.sysprefs div.hint, +.yui-g .yui-u, +.yui-t1 #yui-main, +.yui-t2 #yui-main, +.yui-t3 #yui-main, +.yui-t1 #yui-main .yui-b +{ + float: left; +} + +/* Adjust margins, padding, alignment and table-element widths */ + +.yui-t1 #yui-main, +.yui-t2 #yui-main, +.yui-t3 #yui-main +{ + margin-left: 0; +} + +.yui-t1 #yui-main .yui-b, +.yui-t2 #yui-main .yui-b +{ + margin-left: 0; + margin-right: 13em; +} + +.treeview .hitarea +{ + margin-left: 0; + margin-right: -16px; +} + +div#menu li a +{ + margin-left: -1px; +} + +div#menu, +div.patroninfo ul, +div.patroninfo h5, +#guarantorsearch, +.yui-g input +{ + margin-left: 0.5em; +} +fieldset.rows img, +span.required +{ + margin-right: 0.5em; +} + +fieldset.rows div.hint +{ + margin-right:1em; + margin-left:0; +} + +div#header_search +{ + margin-right:200px; +} + +.yui-g .yui-u +{ + padding-right: 0; +} + +body +{ + padding-right: 1.5em; +} + +.yui-u +{ + padding-right: 0.5em; +} + +ul +{ + padding-left: 0; + padding-right: 1.1em; +} + +.yui-b +{ + padding-bottom: 5em; +} + +.treeview li { + padding: 3px 16px 3px 16px; +} + +#login +{ + left: 0.5em; +} + +#koha_url +{ + left: 2em; +} + +#login, +#koha_url +{ + right:auto; +} + +div.listgroup, +.yui-g p +{ + clear:right; +} + +.yui-t2 #yui-main +{ + width: 75%; +} + +.yui-t3 #yui-main +{ + width: 70%; +} + +#borrowerautocomplete +{ + width: auto; +} + +.holdcount +{ + line-height: 150%; +} + +.yui-t1 .yui-b, +.yui-t2 .yui-b +{ + display:inline; +} +/* Borders */ + +div#menu, +div.patroninfo ul, +div.patroninfo h5 +{ + border-left: 1px solid #000; + border-right: none; +} + +#menu ul li.active a +{ + border-right: 1px solid #000; + border-left: 0; +} + +/* flip over images */ + +.treeview li, +.treeview li.last +{ + background-position-x: right !important; +} +/* TODO - Can we find ways to avoid this? */ + +h1#logo, +#koha_url, +#login, +.yui-t1 .yui-b +{ + position: absolute; +} + diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc index 6a2dae0..5eb7e4e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc @@ -25,6 +25,9 @@ [% END %] [% END %] +[% IF ( bidi ) %] + +[% END %] [% IF ( IntranetUserCSS ) %][% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt index 62f5d87..fcddd23 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt @@ -1,5 +1,6 @@ [% INCLUDE 'doc-head-open.inc' %] Koha › Cataloging › [% IF ( biblionumber ) %]Editing [% title |html %] (Record Number [% biblionumber %])[% ELSE %]Add MARC Record[% END %] + [% INCLUDE 'doc-head-close.inc' %] @@ -637,7 +638,6 @@ function unHideSubfield(index,labelindex) { // FIXME :: is it used ? } //]]> -
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt index 91c2d48..5b14374 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt @@ -1,5 +1,6 @@ [% INCLUDE 'doc-head-open.inc' %] Koha › Cataloging › [% title |html %] [% IF ( author ) %] by [% author %][% END %] (Record #[% biblionumber %]) › Items + [% INCLUDE 'doc-head-close.inc' %] - [% INCLUDE 'header.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-flags.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-flags.tt index 32a8421..19a15e8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-flags.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-flags.tt @@ -1,7 +1,7 @@ [% INCLUDE 'doc-head-open.inc' %] Koha › Patrons › Set Privileges for [% surname %], [% firstname %] -[% INCLUDE 'doc-head-close.inc' %] +[% INCLUDE 'doc-head-close.inc' %]