From: Joey Schulze Date: Wed, 11 Feb 2015 14:01:46 +0000 (+0100) Subject: Adjust to new framework X-Git-Url: https://git.infodrom.org/?p=misc%2Fhallinta-metro;a=commitdiff_plain;h=44602f0fd181b7789ba4c5289d5dd4bc2526c7b1 Adjust to new framework --- diff --git a/artikel.php b/artikel.php index 78cc256..d7bcc76 100644 --- a/artikel.php +++ b/artikel.php @@ -1,13 +1,12 @@ add(" div#form_price { padding-left: 10px; padding-right: 10px; font-size: 90%; color: #555; -} -EOC; +}"); $form = '
@@ -28,7 +27,7 @@ $form = '
'; -$javascript = <<add($jscode); +$javascript->onLoad("\$('button_save').onclick = function () {return custom_save(this);};"); +$javascript->onLoad("\$('button_insert').onclick = function () {return custom_insert(this);};"); $buttons = << @@ -312,27 +310,32 @@ $mask = array( 'title' => 'Preisverlauf', 'rows' => 5, 'table' => 'metro_artikel_preis', + 'table_edit' => 'metro_artikel_preis', 'where' => 'artikel = {id} ORDER BY datum DESC', 'list' => array( 'id' => array( 'name' => 'ID', + 'edit' => "Writeable:false, EntryType: 'H', Length: 4, isKey: true", 'visible' => false, ), 'datum' => array( 'name' => 'Datum', 'width' => 180, + 'edit' => "EntryType: 'T', isNullable: false, Writeable: true", ), 'steuersatz' => array( 'name' => 'Steuer', 'width' => 60, 'type' => 'number', 'specs' => "decPlaces: 2, ClassName: 'alignrightpad'", + 'edit' => "EntryType: 'T', isNullable: false, Writeable: true", ), 'preis' => array( 'name' => 'netto', 'width' => 60, 'type' => 'number', 'specs' => "decPlaces: 2, ClassName: 'alignrightpad'", + 'edit' => "EntryType: 'T', isNullable: false, Writeable: true", ), 'brutto' => array( 'name' => 'Preis', diff --git a/ordersatz_pos.php b/ordersatz_pos.php index 8bb8cd1..a131d0f 100644 --- a/ordersatz_pos.php +++ b/ordersatz_pos.php @@ -19,8 +19,8 @@ if (substr($_SERVER["SCRIPT_FILENAME"],-10) == '/index.php' && $done = is_done($_GET['id']); } -if (!$done) -$jscode[] = <<add($jscode); +} $buttons = <<