From 92b585742e1c7da003c3536aae6d3b65e82d1e19 Mon Sep 17 00:00:00 2001 From: Elliott Davis Date: Fri, 5 Oct 2012 09:01:36 -0500 Subject: [PATCH] Bug 7882: Add ability to sort fields and subfields This patch incorporates jquery UI sortable to reorder fields when cataloging items in frameworks. To Test: Open Cataloging Choose to add an item using whatever framework you like Click and drag the arrowed fields around. Subfields should not be interchangeable between fields and fields should not be interchangable between tabs When you are done moving and adding information save your item You should notice the marc record saved in the order you arranged the fields. --- koha-tmpl/intranet-tmpl/prog/en/css/addbiblio.css | 120 ++++++----- .../prog/en/modules/cataloguing/addbiblio.tt | 243 ++++++++++---------- .../intranet-tmpl/prog/img/cursor_split_16.png | Bin 0 -> 3206 bytes 3 files changed, 188 insertions(+), 175 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/img/cursor_split_16.png diff --git a/koha-tmpl/intranet-tmpl/prog/en/css/addbiblio.css b/koha-tmpl/intranet-tmpl/prog/en/css/addbiblio.css index d35a471..b7990f8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/css/addbiblio.css +++ b/koha-tmpl/intranet-tmpl/prog/en/css/addbiblio.css @@ -1,51 +1,60 @@ #addbibliotabs { - margin-top : 1em; + margin-top : 1em; } - +ul li.tag { + list-style-type:none; + padding:0 0 0 25px; + background: url("../../img/cursor_split_16.png") no-repeat left top; +} +ul li, ul li li { + list-style-type:none; + margin: 0 5px 5px 5px; padding: 5px; height: 1.5em; +} +.ui-state-highlight { height: 1.5em; line-height: 1.2em; } #addbibliotabs .ui-tabs-panel { - float : left; + float : left; } .buttonPlus { - font-weight : bold; - text-decoration : none; + font-weight : bold; + text-decoration : none; } .buttonMinus { - font-weight : bold; - text-decoration : none; + font-weight : bold; + text-decoration : none; } a.expandfield { - text-decoration : none; + text-decoration : none; } #yui-cms-loading { - background : #FFFFFF; - color : #333333; - display : none; + background : #FFFFFF; + color : #333333; + display : none; } #yui-cms-loading #yui-cms-float { - text-align : center; - font-size : 175%; - background-image : url(../../img/loading.gif); - background-repeat : no-repeat; - background-position : top; - padding-top : 50px; + text-align : center; + font-size : 175%; + background-image : url(../../img/loading.gif); + background-repeat : no-repeat; + background-position : top; + padding-top : 50px; } - + #authoritytabs { - margin-top : 1em; - margin-bottom : 1em; + margin-top : 1em; + margin-bottom : 1em; } .toptabs .ui-tabs-nav li a { - padding : .2em 1.2em; + padding : .2em 1.2em; } -div.tag { +li.tag, li.subfield_line { clear: both; } @@ -56,10 +65,10 @@ div.subfield_line { width: 100%; } -div.subfield_line label { +li.subfield_line label { font-size:89%; float: left; - padding-right : .4em; + padding-right : .4em; width: 16em; text-align: left; clear:left; @@ -70,44 +79,45 @@ div.subfield_line label { } .tag_title { - font-size : 90%; - padding : .2em 0; + font-size : 90%; + padding : .2em 0; } .tagnum { - font-size : 110%; - font-weight : bold; - color : #000; - padding : .1em .3em .1em 0; + font-size : 110%; + font-weight : bold; + color : #000; + padding : .1em .3em .1em 0; } a.tagnum { - font-size : 110%; - font-weight : bold; - color : #000; - padding : .1em .3em .1em 0; - text-decoration : none; + font-size : 110%; + font-weight : bold; + color : #000; + padding : .1em .3em .1em 0; + text-decoration : none; } .subfield { - color : #00698a; - float: left; - width: 10em; - text-align:right; + color : #00698a; + float: left; + width: 10em; + text-align:right; + } .subfieldcode { - display: block; - float: left; + display: block; + float: left; } .labelsubfield { - float:left; + float:left; } .input_marceditor { - float:left; - width:30em; + float:left; + width:30em; } .indicator { @@ -115,23 +125,23 @@ a.tagnum { } *html .input_marceditor { - width : 15em; + width : 15em; } #cataloguing_additem_newitem fieldset.rows label, #cataloguing_additem_newitem fieldset.rows span.label { - font-size : 100%; - width : 25%; + font-size : 100%; + width : 25%; } #cataloguing_additem_newitem fieldset.rows li { - padding-bottom : 3px; + padding-bottom : 3px; } #cataloguing_additem_newitem .input_marceditor { - width : auto; + width : auto; } .mandatory_marker { - color: red; + color: red; } .linktools { display: block; white-space: nowrap; } .linktools a { font-size : 75%; display:block;text-decoration:none;} @@ -142,17 +152,17 @@ a.tagnum { .readonly { border-width : 1px; border-style: inset; padding-left : 15px; background: #EEE url(../../img/locked.png) center left no-repeat; width:29em; } #cataloguing_additem_itemlist { - margin-bottom : 1em; + margin-bottom : 1em; } .yui-gf div.first { - width : 19%; + width : 19%; } .yui-gf .yui-u { - width: 79.2%; + width: 79.2%; } /* Class to be added to toolbar when it starts being fixed at the top of the screen*/ .floating { - -webkit-box-shadow: 0px 3px 2px 0px rgba(0, 0, 0, .5); - box-shadow: 0px 3px 2px 0px rgba(0, 0, 0, .5); + -webkit-box-shadow: 0px 3px 2px 0px rgba(0, 0, 0, .5); + box-shadow: 0px 3px 2px 0px rgba(0, 0, 0, .5); } \ No newline at end of file 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 7d54142..a7f50e9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt @@ -7,30 +7,34 @@ @@ -310,21 +314,21 @@ function Changefwk(FwkList) { [% ELSE %]
- + [% END %] - +
- -
    -
  • -
  • -
  • -
  • +
  • +
  • + + [% END %] +
  • -
+
[% IF ( popup ) %] @@ -420,11 +424,11 @@ function Changefwk(FwkList) { [% FOREACH BIG_LOO IN BIG_LOOP %] -
+
    [% FOREACH innerloo IN BIG_LOO.innerloop %] [% IF ( innerloo.tag ) %] -
    +
  • [% UNLESS hide_marc %] [% IF advancedMARCEditor %] @@ -504,10 +508,10 @@ function Changefwk(FwkList) {
    - +
      [% FOREACH subfield_loo IN innerloo.subfield_loop %] -
      +
    • [% UNLESS advancedMARCEditor %] [% IF ( subfield_loo.fixedfield ) %]
    • + [% END %] -
  • - [% END %] - [% END %] -
-[% END %] - - + + [% END %] + [% END %] + + [% END %] + diff --git a/koha-tmpl/intranet-tmpl/prog/img/cursor_split_16.png b/koha-tmpl/intranet-tmpl/prog/img/cursor_split_16.png new file mode 100644 index 0000000000000000000000000000000000000000..dc6d31da4d557a413f132153e916ee5dc18a0423 GIT binary patch literal 3206 zcmd5-5E+CiAzuNroib+5B`vyW2I*(tQxx$;{p4x|5mo z&dnyf$W{~z1s~c~L@9^`A4PmnD5$hxWm}(o_Qe&YKDMO~g4(WUW|DNW8?{gnmu!+d z_nhzh&bjBFdvk7P`tZ)deS;jw?JP`Yi|{$@{Xe-4-uK_#&^d0$EGf;gxv8V7;nbqK z>6CG_Rjb21$0f&Gb=_FN43%+(*eU+jmsfa1%oKlObV{76XKnDbdAejQFBl1v zA5RY^TPgt5Fw;@1X4$UVO7T9f3g5lQ0*`zXwvggAj}XmG&7h1!F&c@=Q8{9WV+tBo zqROZ|CXXCMvM9y{F(xQtM2f4DtV(gz{^QewC`rwEwV2Jf>0p%NtBloEL1;Fc(WVl0 zXho0`iG(1^f-FbCBH}LDOm9VO_kafxU}UjtP*P{av5|+Vmz@Sn@jT3r3F4mg-n2V%KR<1Lqd8%?^aaG>xu*y+JKMIMWcYg==8y zf=H={5=0hBrOMo{TVGo0+XSB79IIM`RUPWiI4<$l462DTlqD1!%%Q%j2euiCO#;Dr z6;S~x7M|A)9EC;OWSG?%24i@KI+sOBjEEAve5>#hsRf&1%L1;3ZXL$9x2$yn%oVB! zm=K#f1@&&~O!rVja7sy*R7Fvxk(WhD6-6K2UoiC;#7b=4$~s2F%UL0t;$bFg5>u6x z(R@CyWa3gjmd#00BBxCx#B5BA#kG85L<_+@qI`9WJNrz?}*lh+Y*z=CRnR;!AX3`8{ODTSa>Xioe!$4bY zW(>!KEJ|ZyJ7axpGK>OFW*Hk*RK)d0*&;??yj)Eu)(M9~6I##@^(l$X;Ip)C-lv2F zuZN&yu!57sh5B3a9|eu&I6fVWf}utHBp~E(I297(SFfutVl&X%nIe6b;h~BE)CAzo zDu#{Gtz)?)iK-k|N2O5Vb&ZXxZdbgz7rZ|0)h!=H)^3oGCOnguWfwFLBa zB`0c>l2keI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