From f31e7478fdff7e3a8dd946a95fa162fa3b04d301 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 22 Feb 2019 17:29:36 +0000 Subject: [PATCH] Bug 22399: Improve responsive behavior of the basic marc editor This patch makes markup and style changes to the basic MARC editor in order to improve the page's handling of smaller browser widths. It adds Bootstrap grid markup to the form to help accomplish this. To test, apply the patch and load a record for editing in the basic MARC editor. Adjust your browser width and confirm that the form adjusts well to various widths. --- koha-tmpl/intranet-tmpl/prog/css/addbiblio.css | 48 ++++------------------ .../prog/en/modules/cataloguing/addbiblio.tt | 38 ++++++++++------- 2 files changed, 30 insertions(+), 56 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/css/addbiblio.css b/koha-tmpl/intranet-tmpl/prog/css/addbiblio.css index 03dd04b..15169af 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/addbiblio.css +++ b/koha-tmpl/intranet-tmpl/prog/css/addbiblio.css @@ -40,24 +40,21 @@ a.expandfield { .tag { border-bottom: 2px solid #D5E6E9; - clear: both; padding: .7em 0; } +.tag .row { + margin-left: 0; + margin-right: 0; +} + div.subfield_line { padding-bottom: .3em; - float: left; - clear: left; - width: 100%; } div.subfield_line label { font-size:89%; - float: left; - padding-right : .4em; - width: 16em; text-align: left; - clear:left; } .subfieldcode img { @@ -86,23 +83,12 @@ a.tagnum { .subfield { color : #00698a; - float: left; - width: 10em; text-align:right; } -.subfieldcode { - display: block; - float: left; -} - -.labelsubfield { - float:left; -} - .input_marceditor { - float:left; - width:30em; + float:left; + width: 70%; } .indicator { @@ -263,29 +249,9 @@ tbody tr.active td { } @media (min-width: 768px) { - div.subfield_line label { - width: 20em; - } - .input_marceditor { - width: 50em; - } - - .subfield { - width: 14em; - } } @media (min-width: 1200px) { - div.subfield_line label { - width: 25em; - } - - .input_marceditor { - width: 60em; - } - .subfield { - width: 16em; - } } 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 70ee70d..32d71b3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt @@ -422,7 +422,9 @@ function Changefwk() { [% INCLUDE 'select2.inc' %] @@ -633,8 +635,9 @@ function Changefwk() { [% END %] [% FOREACH innerloo IN BIG_LOO.innerloop %] [% IF ( innerloo.tag ) %] -
-
+
+
+
[% IF advancedMARCEditor %] [% innerloo.tag | html %] [% ELSE %] @@ -689,18 +692,22 @@ function Changefwk() { -
- +
+
[% FOREACH subfield_loo IN innerloo.subfield_loop %] +
- [% UNLESS advancedMARCEditor %] +
+ [% UNLESS advasmedMARCEditor %] [% IF ( subfield_loo.fixedfield ) %] [% END %] - +
+
[% SET mv = subfield_loo.marc_value %] [% IF ( mv.type == 'text' ) %] [% IF ( mv.readonly == 1 ) %] - + [% ELSE %] - + [% END %] [% IF ( mv.authtype ) %] Tag editor [% END %] [% ELSIF ( mv.type == 'text_complex' ) %] - + [% IF mv.noclick %] @@ -747,7 +754,7 @@ function Changefwk() { [% mv.javascript | $raw %] [% ELSIF ( mv.type == 'hidden' ) %] - + [% ELSIF ( mv.type == 'textarea' ) %] [% ELSIF ( mv.type == 'select' ) %] @@ -772,12 +779,13 @@ function Changefwk() { [% END %] - -
+
+
+
[% END %] -
+ [% END %] [% END %] -- 2.1.4