Improve column layout
[misc/hallinta-metro] / artikel.php
index 1f4ed5e..aa135b0 100644 (file)
@@ -22,7 +22,7 @@ $form = '
 <label for="form_preis">Preis</label><br>
 <input id="form_preis" name="preis" size="10">
 <div class="buttons" style="margin-top: 15px;">
-<button onclick="return add_price(this);">Hinzufügen</button>
+<button class="custom" onclick="return add_price(this);">Hinzufügen</button>
 </div>
 </form>
 </div>
@@ -113,7 +113,7 @@ $jscode[] = str_replace('CONTENT_FORM', str_replace(array("\n"),
 
 $buttons = <<<EOC
 <p style="margin-top: 5px; margin-bottom: 4px; text-align: center;">
-<button onclick="return open_popup()">Preis hinzufügen</button>
+<button class="custom" onclick="return open_popup()">Preis hinzufügen</button>
 </p>
 EOC;
 
@@ -130,11 +130,13 @@ $mask = array(
                              'artnr' => array(
                                            'name' => 'ArtNr',
                                            'width' => 60,
+                                           'type' => 'number',
+                                           'specs' => "decPlaces: 0, thouSep: '', filterUI: 't='",
                                            ),
                              'menge' => array(
                                            'name' => 'Menge',
                                            'width' => 60,
-                                           'specs' => "ClassName: 'alignrightpad'",
+                                           'specs' => "ClassName: 'alignrightpad', filterUI: 't3'",
                                            ),
                              'bezeichnung' => array(
                                            'name' => 'Bezeichnung',
@@ -175,6 +177,7 @@ $mask = array(
                                            'width' => 200,
                                            'specs' => "filterUI: 's'",
                                            'control' => "new Rico.TableColumn.lookup(".grid_lookup_sql('metro_abteilung','id','name').", 0, '')",
+                                           'distinct' => "SELECT DISTINCT abteilung,metro_abteilung.name FROM metro_artikel JOIN metro_abteilung ON abteilung = metro_abteilung.id ORDER BY name",
                                            'visible' => false,
                                            ),
                              'gang' => array(
@@ -188,6 +191,7 @@ $mask = array(
                                            'width' => 70,
                                            'specs' => "ClassName: 'aligncenter', filterUI: 's'",
                                            'control' => "new Rico.TableColumn.lookup(".grid_lookup_sql('metro_vpe','id','name').", 0, '')",
+                                           'distinct' => "SELECT DISTINCT vpe,metro_vpe.name FROM metro_artikel JOIN metro_vpe ON vpe = metro_vpe.id ORDER BY name",
                                            ),
                              ),
              'edit' => array(