@@ -, +, @@ - Make the default layout single-column. - Switch the layout to two-column only when testing prediction pattern. - Add a button to hide the prediction pattern test pane. - Change the style of some buttons and links. Add Font Awesome icons to some. - Clean up some issues with capitalization and spacing. - Make it clearer when form fields are read-only: Move "locked" form field style from addbiblio.css to staff-global.css and improve it with regard to mouse interactions - Go to Serials -> New subscription. - Readonly fields under "Vendor" and "Record" should show a small padlock icon. - Test the process of adding a subscription, paying special attention to the advanced pattern controls: Showing, hiding, modifying, canceling. - Test the process of editing a subscription in the same way. --- koha-tmpl/intranet-tmpl/prog/css/addbiblio.css | 1 - .../intranet-tmpl/prog/css/src/staff-global.scss | 28 +++-- .../en/modules/serials/showpredictionpattern.tt | 4 + .../prog/en/modules/serials/subscription-add.tt | 126 ++++++++++++--------- .../intranet-tmpl/prog/js/subscription-add.js | 19 +++- 5 files changed, 112 insertions(+), 66 deletions(-) --- a/koha-tmpl/intranet-tmpl/prog/css/addbiblio.css +++ a/koha-tmpl/intranet-tmpl/prog/css/addbiblio.css @@ -135,7 +135,6 @@ a.tagnum { .linktools a:first-child { border-bottom: 1px solid #DDD; } .linktools a:hover { background-color: #FFC; } .subfield_controls { margin : 0 .5em; } -.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; --- a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss +++ a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss @@ -343,6 +343,10 @@ th { font-weight: bold; text-align: center; + &[scope="row"] { + text-align: right; + } + &.data { font-family: $font-monospace; text-align: right; @@ -1019,7 +1023,7 @@ fieldset { div { &.hint { - margin-bottom: .4em; + margin: .5em 0; margin-left: 10.5em; } } @@ -1074,6 +1078,7 @@ fieldset { } &.radio { + margin: 0; padding-left: 9em; width: auto; @@ -1893,6 +1898,21 @@ dd { } } +.readonly, +input[type='text']:read-only { + background: #EEE url("../img/locked.png") center left no-repeat; + border-style: inset; + border-width: 1px; + cursor: default; + padding-left: 15px; +} + +.readonly:focus, +input[type='text']:read-only:focus { + border-color: unset; + border-radius: unset; +} + .checkedout { color: #999999; font-style: italic; @@ -2439,12 +2459,6 @@ li { font-style: italic; } -#displayexample { - background-color: #CCCCCC; - margin-bottom: 10px; - padding: 5px; -} - #irregularity_summary { vertical-align: top; } --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/showpredictionpattern.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/showpredictionpattern.tt @@ -84,4 +84,8 @@ +
+ +
+ [% END %] --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt @@ -14,6 +14,7 @@ fieldset.rows li.radio { width: 100%; } /* override staff-global.css */ /* Prevents Bootstrap menus from being hidden inside modal */ #mana_search_result .modal { overflow: visible; } #mana_search_result .modal-body { overflow-y: visible; } +fieldset.rows table { clear: none; margin: 0; } @@ -32,35 +33,36 @@ fieldset.rows li.radio { width: 100%; } /* override staff-global.css */
-
-

[% IF ( modify ) %] Modify subscription for [% bibliotitle | html %][% ELSE %]Add a new subscription[% END %] (1/2)

-
-
- [% IF ( modify ) %] - - - [% ELSE %] - - [% END %] - - - -
-
+
+

[% IF ( modify ) %] Modify subscription for [% bibliotitle | html %][% ELSE %]Add a new subscription[% END %] (1/2)

+
+
+ +
+
+ [% IF ( modify ) %] + + + [% ELSE %] + + [% END %] + +
Subscription details
    [% IF ( subscriptionid ) %] -
  1. Subscription # [% subscriptionid | html %]
  2. +
  3. Subscription number: [% subscriptionid | html %]
  4. [% END %]
  5. () Search for a vendor
  6. - + () Required +
    Subscriptions must be associated with a bibliographic record
    Search for record [% IF ( CAN_user_editcatalogue ) %] [% IF ( modify ) %] @@ -73,11 +75,11 @@ fieldset.rows li.radio { width: 100%; } /* override staff-global.css */
  7. [% IF ( serialsadditems ) %] -

    -

    +

    +

    [% ELSE %] -

    -

    +

    +

    [% END %]
  8. @@ -116,7 +118,7 @@ fieldset.rows li.radio { width: 100%; } /* override staff-global.css */
  9. - [% UNLESS ( Independentbranches ) %] [% END %] @@ -125,7 +127,7 @@ fieldset.rows li.radio { width: 100%; } /* override staff-global.css */ [% ELSE %] [% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode ) %] [% END %] - (select a library) +
  10. @@ -210,13 +212,12 @@ fieldset.rows li.radio { width: 100%; } /* override staff-global.css */
- +
-
-
- -
-
+
+
+
+
[% IF ( Koha.Preference('Mana') == 1) && !mana_url %]

The Mana Knowledge Base can be used to import subscription patterns submitted by other libraries and save you extra work. Ask your system administrator to configure this service and complete the configuration, or remove this message by disabling the system preference @@ -235,8 +236,9 @@ fieldset.rows li.radio { width: 100%; } /* override staff-global.css */ [% ELSE %] [% firstacquidate | $KohaDates %] - + [% END %] + Required [% IF (more_than_one_serial) %]
  • @@ -315,6 +317,7 @@ fieldset.rows li.radio { width: 100%; } /* override staff-global.css */ [% END %] + Required
  • @@ -328,9 +331,10 @@ fieldset.rows li.radio { width: 100%; } /* override staff-global.css */ [% END %] [% END %] - If empty, English is used +
    If empty, English is used
  • +   @@ -342,19 +346,19 @@ fieldset.rows li.radio { width: 100%; } /* override staff-global.css */ - - + @@ -363,24 +367,28 @@ fieldset.rows li.radio { width: 100%; } /* override staff-global.css */
    + [% IF (more_than_one_serial) %] - Last value + Last value: [% ELSE %] - Begins with + Begins with: [% END %] - +
    Inner counterInner counter:
  • +   Show advanced pattern
  • + + - + +
  • +   + Modify pattern + + +
  • + +
    +
    +
    [% IF additional_fields %] @@ -469,16 +484,15 @@ fieldset.rows li.radio { width: 100%; } /* override staff-global.css */
    - - +
    -
  • +
    -
    +
    --- a/koha-tmpl/intranet-tmpl/prog/js/subscription-add.js +++ a/koha-tmpl/intranet-tmpl/prog/js/subscription-add.js @@ -210,7 +210,7 @@ function displaymoreoptions() { } function modifyAdvancedPattern() { - $("#patternname").prop('readOnly', false).val(''); + $("#patternname").prop('readOnly', false).val('').focus(); $("#numberingmethod").prop('readOnly', false); $("#advancedpredictionpatternt input").each(function() { @@ -318,7 +318,7 @@ function testPredictionPattern() { url:"/cgi-bin/koha/serials/showpredictionpattern.pl", data: ajaxData, success: function(data) { - $("#displayexample").html(data).show(); + showPredictionPatternTest( data ); patternneedtobetested = 0; } }); @@ -519,6 +519,16 @@ function mana_comment_close(){ $("#new_mana_comment").hide(); } +function showPredictionPatternTest( data ){ + $("#displayexample").html(data).show(); + $("#page_2 > div").attr("class","col-xs-6"); +} + +function hidePredcitionPatternTest(){ + $("#displayexample").hide(); + $("#page_2 > div").attr("class","col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2"); +} + $(document).ready(function() { if ( mana_enabled == 1 ) { mana_search(); @@ -679,4 +689,9 @@ $(document).ready(function() { var subscription_id = $(this).data("subscription_id"); mana_use( subscription_id ); }); + + $("#displayexample").on("click", "#hidepredictionpattern", function(e){ + e.preventDefault(); + hidePredcitionPatternTest(); + }); }); --