Bug 8061: RTL CSS overrides (staff client)
authorD Ruth Bavousett <druthb@gmail.com>
Fri, 5 Apr 2013 09:41:25 +0000 (12:41 +0300)
committerJared Camins-Esakov <jcamins@cpbibliography.com>
Sun, 7 Apr 2013 16:51:54 +0000 (12:51 -0400)
This patch tweaks a few templates, and enables right-to-left
flipping via CSS in the staff client.

Signed-off-by: Karam Qubsi <karamqubsi@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Amended patch, putting back author and adding sign off.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>

koha-tmpl/intranet-tmpl/prog/en/css/right-to-left.css [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt
koha-tmpl/intranet-tmpl/prog/en/modules/members/member-flags.tt

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 (file)
index 0000000..b766658
--- /dev/null
@@ -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;
+}
index 8afc4e3..7c9722c 100644 (file)
@@ -8,6 +8,9 @@
 [% ELSE %]
     <link rel="stylesheet" type="text/css" href="[% themelang %]/css/staff-global.css" />
 [% END %]
+[% IF ( bidi ) %]
+   <link rel="stylesheet" type="text/css" href="[% themelang %]/css/right-to-left.css" />
+[% END %]
 [% IF ( IntranetUserCSS ) %]<style type="text/css">[% IntranetUserCSS %]</style>[% END %]
 <script type="text/javascript" src="[% interface %]/lib/jquery/jquery.js"></script>
 <script type="text/javascript" src="[% interface %]/lib/jquery/jquery-ui.js"></script>
index 3b13f3a..eddc21c 100644 (file)
@@ -1,5 +1,6 @@
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Cataloging &rsaquo; [% IF ( biblionumber ) %]Editing [% title |html %] (Record number [% biblionumber %])[% ELSE %]Add MARC record[% END %]</title>
+<link type="text/css" rel="stylesheet" href="[% themelang %]/css/addbiblio.css" />
 [% INCLUDE 'doc-head-close.inc' %]
 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.fixFloat.js"></script>
 <script type="text/javascript" src="[% themelang %]/js/cataloging.js"></script>
@@ -286,7 +287,7 @@ function Changefwk(FwkList) {
 
 //]]>
 </script>
-<link type="text/css" rel="stylesheet" href="[% themelang %]/css/addbiblio.css" />
+
 </head>
 <body id="cat_addbiblio" class="cat">
 
index f01c682..1731856 100644 (file)
@@ -1,5 +1,6 @@
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Cataloging &rsaquo; [% title |html %] [% IF ( author ) %] by [% author %][% END %] (Record #[% biblionumber %]) &rsaquo; Items</title>
+<link type="text/css" rel="stylesheet" href="[% themelang %]/css/addbiblio.css" />
 [% INCLUDE 'doc-head-close.inc' %]
 <script type="text/javascript" src="[% themelang %]/js/cataloging.js"></script>
 <script type="text/javascript">
@@ -93,7 +94,7 @@ $(document).ready(function() {
 });
 //]]>
 </script>
-<link type="text/css" rel="stylesheet" href="[% themelang %]/css/addbiblio.css" />
+
 </head>
 <body id="cat_additem" class="cat">
 [% INCLUDE 'header.inc' %]
index 46ae7df..b9cddb4 100644 (file)
@@ -1,7 +1,7 @@
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Patrons &rsaquo; Set permissions for [% surname %], [% firstname %]</title>
-[% INCLUDE 'doc-head-close.inc' %]
 <link rel="stylesheet" type="text/css" href="[% themelang %]/css/treeview/jquery.treeview.css"/>
+[% INCLUDE 'doc-head-close.inc' %]
 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.treeview.pack.js"></script>
 <!-- set up tree -->
 <script type="text/javascript">