file('lib/ricoTableColumnDB.js'); JavaScript::instance()->file('menuitem.js'); JavaScript::instance()->add("Hallinta.postLoadForm = menuitem_init;"); JavaScript::instance()->add("Hallinta.postFetch = menuitem_post_fetch;"); JavaScript::instance()->add("Hallinta.postInsert = menuitem_post_insert;"); $mask = array( 'table' => 'sys_menuitem', 'title' => 'Liste der Menüpunkte', 'list' => array( 'id' => array( 'name' => 'ID', 'visible' => false, ), 'parent' => array( 'name' => 'Super', 'sqltype' => 'int', 'filter' => 's', 'width' => 120, 'control' => "new Rico.TableColumn.lookup(".grid_lookup_sql('sys_menuitem','id','title', [0 => 'Root']).", 0, '')", # 'distinct' => "SELECT DISTINCT abteilung,metro_abteilung.name FROM metro_artikel JOIN metro_abteilung ON abteilung = metro_abteilung.id ORDER BY name", ), 'priority' => array( 'name' => 'Prio', 'width' => 50, 'type' => 'number', 'specs' => array('ClassName' => 'aligncenter'), ), 'module' => array( 'filter' => 's', 'name' => 'Modul', 'width' => 90, ), 'page' => array( 'filter' => 't', 'name' => 'Page', 'width' => 100, ), 'title' => array( 'name' => 'Titel', 'filter' => 't', 'width' => 100, ), 'edit' => array( 'name' => 'Edit', 'width' => 40, 'specs' => array('ClassName' => 'aligncenter has-checkbox', 'canSort' => false), 'control' => "new Rico.TableColumn.checkbox(1,0,0,1)", ), ), 'edit' => array( 'parent' => array( 'name' => 'Super', 'type' => 'select', 'options' => [['id'=>'0', 'text'=>'Root']], 'options_string' => true, ), 'module' => array( 'name' => 'Modul', 'type' => 'select', 'options' => [['id'=>NULL, 'text'=>'']], 'options_string' => true, 'size' => 24, 'null' => true, ), 'page' => array( 'name' => 'Seite', 'type' => 'select', 'options' => [['id'=>NULL, 'text'=>'']], 'options_string' => true, 'size' => 24, 'null' => true, ), 'priority' => array( 'name' => 'Priorität', 'type' => 'number', 'size' => 10, 'required' => true, ), 'title' => array( 'name' => 'Titel', 'type' => 'text', 'size' => 24, 'required' => true, ), 'tooltip' => array( 'name' => 'Tooltip', 'type' => 'text', 'size' => 24, ), 'edit' => array( 'name' => 'Edit', 'type' => 'boolean', ), 'shadow' => array( 'name' => 'shadow', 'type' => 'boolean', ), ), 'second' => array( 'perms' => array( 'title' => 'Freigaben', 'table' => 'sys_group', 'rows' => 10, 'width' => 320, 'list' => array( 'id' => array( 'name' => 'ID', 'visible' => false, 'sql' => 'sys_group.id', ), 'gname' => array( 'name' => 'Name', 'width' => 80, 'type' => 'text', ), 'name' => array( 'name' => 'Name', 'width' => 150, 'type' => 'text', ), 'checked' => array( 'name' => 'Perm', 'width' => 40, 'sql' => '(SELECT count(*) FROM sys_group_menuitem WHERE sys_group_id = sys_group.id AND sys_menuitem_id = {id})', 'control' => "new Rico.TableColumn.checkboxDB(0," . "Hallinta.baseURL+'ajax/ricoUpdateConnection.php')", 'filter' => 'c', 'specs' => array('ClassName' => 'aligncenter', 'canSort' => true), 'update' => array('table' => 'sys_group_menuitem', 'basecol' => 'sys_menuitem_id', 'refcol' => 'sys_group_id', 'reftable' => 'sys_group', 'refid' => 'sys_group.id', ), ), ), ), ), );