From 8c130eede386bd2c5aa06cb3a2798900c0a821ed Mon Sep 17 00:00:00 2001 From: D Ruth Bavousett Date: Fri, 5 Apr 2013 12:41:25 +0300 Subject: [PATCH] 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. Signed-off-by: Karam Qubsi Signed-off-by: Katrin Fischer Amended patch, putting back author and adding sign off. Signed-off-by: Chris Cormack Signed-off-by: Katrin Fischer Signed-off-by: Jared Camins-Esakov --- .../prog/en/css/right-to-left.css | 270 ++++++++++++++++++ .../prog/en/includes/doc-head-close.inc | 3 + .../prog/en/modules/cataloguing/addbiblio.tt | 3 +- .../prog/en/modules/cataloguing/additem.tt | 3 +- .../prog/en/modules/members/member-flags.tt | 2 +- 5 files changed, 278 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 0000000000..b76665869c --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/css/right-to-left.css @@ -0,0 +1,270 @@ +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 8afc4e3649..7c9722c706 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 @@ -8,6 +8,9 @@ [% ELSE %] [% 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 3b13f3a3f6..eddc21c794 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' %] @@ -286,7 +287,7 @@ function Changefwk(FwkList) { //]]> - + 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 f01c6829b6..1731856f7a 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 46ae7df581..b9cddb462e 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 permissions for [% surname %], [% firstname %] -[% INCLUDE 'doc-head-close.inc' %] +[% INCLUDE 'doc-head-close.inc' %]