bigger buttons, error message
authorDobrica Pavlinusic <dpavlin@rot13.org>
Fri, 26 Sep 2014 15:58:10 +0000 (17:58 +0200)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Fri, 26 Sep 2014 15:58:10 +0000 (17:58 +0200)
examples/selfcheck.html
examples/selfcheck.js

index 3d576b8..f792ec0 100644 (file)
@@ -8,7 +8,7 @@
 
 body, input {
        font-family: 'Roboto', sans-serif;
-       font-size: 110%;
+       font-size: 100%;
        /* disable selection which brings havoc on touchscreens */
        -webkit-user-select: none;
        -moz-user-select: -moz-none;
@@ -51,7 +51,7 @@ input[type=button] {
        display: block;
        float: left;
        width: 100%;
-       height: 3em;
+       height: 6em;
 }
 
 .button {
@@ -71,7 +71,7 @@ input[type=button] {
        margin-left: -8em; /* width + 2 * padding / 2 */
        margin-top: -2.5em;
        width: 12em;
-       height: 5em;
+       height: 8em;
        background: #ff8;
        padding: 2em;
        border: 0.5em solid #f00;
index ec6ee52..1803949 100644 (file)
@@ -224,9 +224,13 @@ function circulation( barcode, sid ) {
                        console.info( circulation_type, data );
 
                        var color = 'red';
-                       if ( data['fixed'].substr(2,1) == 1 ) color='green';
+                       var error = 'Transakcija neuspjeĆĄna. Odnesite knjige na pult!';
+                       if ( data['fixed'].substr(2,1) == 1 ) {
+                               color='green';
+                               error = '';
+                       }
 
-                       $('ul#books').append('<li style="color:'+color+'">' + ( data['AJ'] || barcode ) + ( data['AF'] ? ' <b>' + data['AF'] + '</b>' : '' ) + '</li>');
+                       $('ul#books').append('<li style="color:'+color+'">' + ( data['AJ'] || barcode ) + ( data['AF'] ? ' <b>' + data['AF'] + '</b> ' + error : '' ) + '</li>');
                        $('#books_count').html( $('ul#books > li').length );
                        console.debug( book_barcodes );
                        pending_jsonp--;