From e8d14a6cde33eed4b7823a92bc2f5a9b3faf46c0 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Wed, 26 Nov 2008 14:46:07 -0600 Subject: [PATCH] Cleaning up Self-Checkout interface, adding some basic formatting based on other standard styles. Patch also removes a hard-coded English string from the script and some unused functions from sco.js. Signed-off-by: Galen Charlton --- koha-tmpl/opac-tmpl/prog/en/css/sco.css | 335 ++++++++++-------- koha-tmpl/opac-tmpl/prog/en/js/sco.js | 15 - .../opac-tmpl/prog/en/modules/sco/help.tmpl | 27 +- .../prog/en/modules/sco/sco-main.tmpl | 114 +++--- opac/sco/sco-main.pl | 3 +- 5 files changed, 255 insertions(+), 239 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/css/sco.css b/koha-tmpl/opac-tmpl/prog/en/css/sco.css index 6d48abf2dc..eb1c019ff0 100644 --- a/koha-tmpl/opac-tmpl/prog/en/css/sco.css +++ b/koha-tmpl/opac-tmpl/prog/en/css/sco.css @@ -1,194 +1,215 @@ -input.focus { +@import url("../../en/lib/yui/reset-fonts-grids.css"); +@import url("../../en/lib/yui/skin.css"); + +a { + font-weight : bold; +} + +a, a:visited { + color : #006699; +} + +a:hover,input.editshelf:hover,a.editshelf:hover,input.deleteshelf:hover { + color : #990033; +} + +body { + background-color : white; + text-align : left; + padding : 0 0 2.5em 0; +} + +caption { + font-size : 110%; + text-align : left; + font-weight : bold; +} + +fieldset { background-color: #FFF; - border-bottom: 2px dashed #993300; + border : 2px solid #EEEEEE; + margin : 1em 1em 1em 0; + padding : 1em; } -input.unfocus { - background-color : #FFF; +h1,h2,h3,h4,h5,h6 { + font-weight : bold; + margin : .5em 0; } -div.sco_head { - font-weight: bold; - width: 75%; - margin: 15px auto; - padding-left: 10px; +h1 { + font-size : 138.5%; } -div#sco_main { - text-align: center; - } -div#newcheckout { -/* margin : 20px 30px; -/* text-align: center; -*/ padding: 10px 10px 10px 40px; -/* width: 80%; -/* min-width: 300px; -*/ } +h2 { + font-size : 134%; +} -div#checkout h3 { -/* background: url(/opac-tmpl/npl/en/sco/images/checkout-top-right.gif) top right no-repeat; -/* border : 1px solid yellow;*/ - font-size:1.3em; - padding: 15px 15px 0px 15px; - margin:0; - } +h3 { + font-size : 123.1%; +} -div#borrowerdetails { - margin: 10px 5px 5px 5px; - } - -div#borrowerdetails h2 { - font-style: italic; - border-bottom: 1px; - border-color: red; - margin: 5px; - } +h4 { + font-size : 116%; +} -.submit { - font-size: smaller; - } +h5 { + font-size : 108%; +} -.sco_entry { - background-color : #FFE; - text-align: left; - width : 75%; - margin: 15px auto;!important - padding: 10px; - border : 2px solid #CC3333; -} - -p.checkout { -/* background: url(/opac-tmpl/npl/en/sco/images/checkout-right.gif) top right repeat-y; -/* border : 1px solid lime;*/ - margin: 5px; - padding: 5px 15px; - text-align: center; - } +h6 { + font-size : 100%; +} -div#checkouthelp p { - text-align: center; - +input[type=submit], input[type=button], input[type=reset] { + background : #b8d0e6 url(../../images/submit-bg.gif) repeat-x 0 0; + background-color : #b8d0e6; + border-top: 1px solid #cccccc; + border-left: 1px solid #cccccc; + border-right: 1px solid #eeeeee; + border-bottom: 1px solid #eeeeee; + color : #333; + font-size : 93%; + font-weight : bold; + padding : 4px; } -div#checkoutfooter { -/* background: url(/opac-tmpl/npl/en/sco/images/checkout-bottom-left.gif) bottom left no-repeat; -*/ border-top : 1px solid red; - } -div#footerbody { -/* background: url(/opac-tmpl/npl/en/sco/images/checkout-bottom-right.gif) bottom right no-repeat; -*/ padding:15px; - display:block; - margin: -1.1em 0 0 0; + +input[type=submit]:active, input[type=button], input[type=reset] { + border: 1px inset #666666; + float : none; +} +.dialog { + border: 1px solid #bcbcbc; + padding : .5em; + margin : 1em auto; + width: 65%; } - input.confirm { - background-color: #009900; - color : #FFFFCC; - font-weight: bold; -} - -input.reject { - background-color: #CC3333; - color : #FFFFCC; - font-weight: bold; -} - -div.sco_head p.alert { - width: 50%; - font-weight: bold; - background-color : #FFFF99; - font-size : 105%; - margin: 5px auto; - margin-bottom : 15px; - padding: 5px; - border :1px solid #CC3333; - } -p.alert a{ - font-weight: bold; -} -div.error { - background-color : #FFFF99; - font-size : 105%; -/* width : 50%; -*/ margin: 5px auto; - margin-bottom : 15px; - padding: 5px; - border : 2px dashed #CC3333; +.dialog h2, .dialog h3, .dialog h4 { + margin : auto; + text-align : center; + } + +div.alert { + background : #FFC url(../../images/alert-bg.gif) repeat-x left 0; + text-align : center; } -div.error h3 { - color: #CC3333; - font-size : 110%; - padding-left : 63px; - height : 46px; +div.alert strong { + color : #900; } -div.error p { - margin-top : 0px; - margin-left : 10px; -} +.dialog input { + background : #FFF none; + border : 1px solid #bcbcbc; + margin : .4em; + padding : .4em; + } + + +.dialog input.back { + background : #FFF url(../../famfamfam/silk/arrow_left.png) no-repeat 4px center; + padding : .4em .4em .4em 25px; + } + +.dialog input.return { + background : #FFF url(../../famfamfam/silk/book_previous.png) no-repeat 4px center; + padding : .4em .4em .4em 25px; + } + +.dialog input.renew { + background : #FFF url(../../famfamfam/silk/arrow_refresh.png) no-repeat 4px center; + padding : .4em .4em .4em 25px; + } + +.dialog input.cancel { + background : #FFF url(../../famfamfam/silk/cancel.png) no-repeat 4px center; + padding : .4em .4em .4em 25px; + } -div#footerbody p { - background-color : #EFF1DC; - font-size : 80%; - width : 60%; - margin: 5px auto; - padding: 3px; - border : 1px dashed #CCCC99; - text-align: center; +input.finish { + background : #dbe7ff url(../../famfamfam/silk/stop.png) no-repeat 4px center; + border : 1px outset #666; + padding : .2em .2em .2em 25px; +} + +table { + background-color: #FFF; + border-collapse : collapse; + margin : 1em 0; + border-right : 1px solid #dddddd; + border-top : 1px solid #dddddd; } -div#complete { - float : right; - border : 0px solid lime; +td,th { + background-color: #FFF; + border-left : 1px solid #dddddd; + border-bottom : 1px solid #dddddd; + padding : 3px 3px; } -div#complete input { - background-color : #009900; - color : #FEEDDB; - font-family : verdana,arial,hevetica; - font-size : small; +th { + background-color:#EEE; font-weight : bold; - margin: 0; - padding : 2px 32px 2px 2px; + padding : 2px 23px; + text-align : center; } -div#abort { - margin: 5px auto; - border : 0; - text-align : center; +tr.highlight td, tr.highlight th, tr.odd td { + background-color : #F3F3F3; + border-top : 1px solid #DDDDDD; + border-bottom : 1px solid #DDDDDD; } -div#abort input, .warning input { - background-color : #993300; - color : #FEEDDB; - font-family : verdana,arial,hevetica; - font-size : small; - font-weight : bold; - margin: 0; - padding : 2px 32px 2px 2px; +tr.even td, tr.even.highlight td { + background-color: #FFF; } -.warning-header { - display : block; - color: #CC3333; - font-size : 110%; +p { + margin: .7em 0; } -input.back { - background-color : #936; - color : #ffffcc; - font-family : verdana,arial,hevetica; - font-size : small; +strong { font-weight : bold; - margin: 0; - padding : 2px 2px 2px 32px; } -p.checkout .warning { - display : block; - padding : 15px; - margin : 10px; - margin-bottom : 15px; - background-color : #FFFFCC; - border : 3px dashed #cc0000; +em { + font-style : italic; } +#borrowerdetails { + margin-top : 1em; +} +#barcode, +#userid { + font-size : 125%; + padding-bottom : 3px; +} +input.focus { + background-color : #FFC; + border : 2px inset #336699; +} +#checkouthelp { + background : #FFF url("../../famfamfam/silk/help.png") no-repeat 4px center; + padding : 3px 3px 3px 26px; + position : absolute; + top : 0; + right : 0; +} +div.button { + float : left; + margin-top : 2em; + padding : .4em 0; +} +div.button a:link, +div.button a:visited, +div.button a:hover, +div.button a:active { + background : #FFF url(../../famfamfam/silk/book_previous.png) no-repeat 4px center; + border : 1px outset #666; + color : #000; + padding : .4em .4em .4em 25px; + text-decoration : none; +} +div.button a:active { + border : 1px inset #666; +} \ No newline at end of file diff --git a/koha-tmpl/opac-tmpl/prog/en/js/sco.js b/koha-tmpl/opac-tmpl/prog/en/js/sco.js index 978ce2ab65..add307e216 100644 --- a/koha-tmpl/opac-tmpl/prog/en/js/sco.js +++ b/koha-tmpl/opac-tmpl/prog/en/js/sco.js @@ -1,20 +1,5 @@ -function focusOnFirst(){ - ; // FIXME: do something here? -} - function sco_init(valid_session) { if (valid_session == 1) { setTimeout("location.href='/cgi-bin/koha/sco/sco-main.pl?op=logout';",120000); } - if(document.forms['mainform']){ - document.forms['mainform'].elements[0].focus(); - } -} - -function confirmDelete(message) { - return (confirm(message) ? true : false); -} - -function Dopop(link) { - newin=window.open(link,'popup','width=500,height=400,toolbar=false,scrollbars=yes'); } diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/sco/help.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/sco/help.tmpl index 7d3ba64b3c..ba4f6651a4 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/sco/help.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/sco/help.tmpl @@ -1,12 +1,18 @@ - -- Self Checkout - - - + › Self Checkout + +" /> +/includes/favicon.ico" type="image/x-icon" /> + + +/css/sco.css" /> + -
+
+
+
+ -
-

Self Checkout Help

+

Self Checkout Help

If this is your first time using the self checkout system, or if the system is not behaving as expected, you may want to refer to this guide to get @@ -22,10 +28,11 @@ The Submit button only needs to be clicked if you enter the barcode manually.

Step Three: Click the 'Click here if done' link when done. -
+Return to the Self-Checkout +
+ +
diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/sco/sco-main.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/sco/sco-main.tmpl index 845abc5af6..f362df91c6 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/sco/sco-main.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/sco/sco-main.tmpl @@ -1,64 +1,76 @@ - -- Self Checkout + › Self Checkout + +" /> +/includes/favicon.ico" type="image/x-icon" /> + + /css/sco.css" /> - onload="openWindow('')" onload="sco_init(1);"> -
-

<!-- TMPL_VAR NAME=" src="" /> - Self Checkout System

-
-
-
+ + + +
+ +

Self Checkout System

+ +
+
-

Item cannot be issued.

Sorry, This item cannot be checked out at this station.

-

Title:

+

Item cannot be checked out.

Sorry, This item cannot be checked out at this station.

+

Title:

Error type:

- +" /> - - +" /> + - +
-

Please confirm the issue:

-

-
+

Please confirm the checkout:

+

This item is already checked out to you. Return it?

+ - - +" /> +" /> - + - name="confirm" class="submit" onclick="this.form.confirmed.value='1';this.form.submit();" /> - + name="confirm" class="renew" onclick="this.form.confirmed.value='1';this.form.submit();" /> +
-

Access Denied

+

Access Denied

Sorry, This Self-Checkout Station has lost authentication. Please contact the administrator to resolve this problem.
-

Session timed out

Sorry, your session has timed out, please login again.
-

Session Lost

You are accessing koha from a different ip address! please login again.
+

Session timed out

Sorry, your session has timed out, please log in again.
+

Session Lost

You are accessing Self-Checkout from a different IP address! please log in again.
-

Record not found

Your Userid was not found in the database. Please try again.

+

Record not found

Your userid was not found in the database. Please try again.

-

Self Checkout

-

HELP with the self checkoutsystem

+ HELP with the self checkout system
@@ -77,42 +89,39 @@ Sorry, This Self-Checkout Station has lost authentication. Please contact the a
-
+ -

- +

+ " value=""> -

+
-
.')){ this.op.value='logout'; this.userid.value=''; } return true;}; " > -

Check out or return an item:

+ .')){ this.op.value='logout'; this.userid.value=''; } return true;}; " > +
Check out or return an item: - + " /> - +
-

Scan next item, or

-
-
+

Scan next item, or

+
-

Issues for

-
+
Issues ( total)
- + - - - - + + +
Issues for ( total)
TitleCall No.DueRenewFines
TitleCall No.DueRenewFines
/images/.gif" alt="" title="" /> ">.01.THUMBZZZ.jpg" alt="Book Cover Image" class="thumbnail" /> "> -
">.01.THUMBZZZ.jpg" alt="Book Cover Image" class="thumbnail" /> "> + ()   @@ -123,7 +132,6 @@ Sorry, This Self-Checkout Station has lost authentication. Please contact the a YesNo
-

You currently have nothing checked out.

@@ -131,14 +139,8 @@ Sorry, This Self-Checkout Station has lost authentication. Please contact the a -
-
+
- - - - - - + \ No newline at end of file diff --git a/opac/sco/sco-main.pl b/opac/sco/sco-main.pl index 197975816c..12e1a3e5e5 100755 --- a/opac/sco/sco-main.pl +++ b/opac/sco/sco-main.pl @@ -94,7 +94,8 @@ if ($op eq "logout") { #warn "renew confirmation"; $template->param( renew => 1, barcode => $barcode, - confirm => $confirmation_strings{RENEW_ISSUE}, + confirm => 1, + confirm_renew_issue => 1, hide_main => 1, ); } -- 2.39.5