Byla zlepsena vizualni stranka vykreslovani barcodu
authorThomas Mudrunka <tomas@mudrunka.cz>
Wed, 24 Aug 2011 00:47:43 +0000 (02:47 +0200)
committerThomas Mudrunka <tomas@mudrunka.cz>
Wed, 24 Aug 2011 00:47:43 +0000 (02:47 +0200)
index.php
lib/Barcode.class.php

index a2423df11502a2f1d3fc6fbe53456338784269e1..6f7392ce1b30b04443e55acec61947f3359f6715 100755 (executable)
--- a/index.php
+++ b/index.php
@@ -650,9 +650,9 @@ class Sklad_UI {
                $html.= '-';
                $html.= $this->html->link('>>', "$class/$id_next/");
                $html.= '<br />';
+               $html.='<span style="float:right;">'.$this->html->render_barcode(BARCODE_PREFIX.strtoupper("$class/$id")).'</span>';
                $html.= $this->html->link('edit', "$class/$id/edit/");
                if($this->db->contains_history($class)) $html.= ' ][ '.$this->html->link('history', "$class/$id/history/");
-               $html.='<br />'.$this->html->render_barcode(BARCODE_PREFIX.strtoupper("$class/$id"));
                return $html;
        }
 
@@ -842,4 +842,4 @@ class Sklad_UI {
 $sklad = new Sklad_UI();
 $sklad->process_http_request();
 
-echo("<hr/>");
+echo('<br style="clear:both;" /><hr />');
index 72928257ebf7e916ca0f4f4cb4118db2ee093aee..b4231e660bffe34e80671feb01882ae788c7cf9d 100755 (executable)
@@ -37,7 +37,7 @@ class Barcode {
        static function generate_barcode($string='EXAMPLE', $convert='png', $enctype='code128b') {
                $string = escapeshellarg($string);
                $enctype = escapeshellarg($enctype);
-               $convert = $convert ? " | convert -colorspace gray -background white - $convert:-" : '';
+               $convert = $convert ? " | convert - -crop 0x60+0+30\\! -background white -flatten $convert:-" : '';
                return shell_exec("barcode -e $enctype -E -b $string$convert");
        }
 
This page took 0.143757 seconds and 4 git commands to generate.