<link href="stylesheet.css" rel="stylesheet" type="text/css">
<link href="style.css" rel="stylesheet" type="text/css">
<link href="dropdown.css" rel="stylesheet" type="text/css">
+<link href="theme.php" rel="stylesheet" type="text/css">
<?=load_style($style);?>
</head>
<body>
--- /dev/null
+<?php
+
+$mask = array(
+ 'table' => 'sys_theme_keys',
+ 'title' => 'Liste der Theme-Begriffe',
+ 'list' => array(
+ 'id' => array(
+ 'name' => 'ID',
+ 'visible' => false,
+ ),
+ 'name' => array(
+ 'name' => 'Name',
+ 'width' => 150,
+ ),
+ 'title' => array(
+ 'name' => 'Title',
+ 'width' => 400,
+ ),
+ ),
+ 'edit' => array(
+ 'name' => array(
+ 'name' => 'Name',
+ 'type' => 'text',
+ 'size' => 24,
+ ),
+ 'title' => array(
+ 'name' => 'Title',
+ 'type' => 'textarea',
+ ),
+ ),
+ );
+
+?>
--- /dev/null
+<?php
+
+$mask = array(
+ 'table' => 'sys_theme_values',
+ 'title' => 'Liste der Farben',
+ 'join' => array(
+ 'sys_themes ON sys_theme_values.theme = sys_themes.id',
+ 'sys_theme_keys ON sys_theme_values.key = sys_theme_keys.id',
+ ),
+ 'list' => array(
+ 'id' => array(
+ 'name' => 'ID',
+ 'visible' => false,
+ 'sql' => 'sys_theme_values.id',
+ ),
+ 'theme' => array(
+ 'name' => 'Theme',
+ 'width' => 90,
+ 'specs' => "ClassName: 'aligncenter', filterUI: 's'",
+ 'control' => "new Rico.TableColumn.lookup(".grid_lookup_sql('sys_themes','id','name').", 0, '')",
+ ),
+ 'key' => array(
+ 'name' => 'Key',
+ 'width' => 150,
+ 'specs' => "filterUI: 's'",
+ 'control' => "new Rico.TableColumn.lookup(".grid_lookup_sql('sys_theme_keys','id','name').", 0, '')",
+ ),
+ 'value' => array(
+ 'name' => 'Value',
+ 'width' => 200,
+ ),
+ ),
+ 'edit' => array(
+ 'theme' => array(
+ 'name' => 'Theme',
+ 'type' => 'select',
+ 'options' => 'SELECT id,name AS text FROM sys_themes ORDER BY name',
+ ),
+ 'key' => array(
+ 'name' => 'Key',
+ 'type' => 'select',
+ 'options' => 'SELECT id,name AS text FROM sys_theme_keys ORDER BY name',
+ ),
+ 'value' => array(
+ 'name' => 'Value',
+ 'type' => 'text',
+ 'size' => 25,
+ ),
+ ),
+ );
+
+?>
--- /dev/null
+<?php
+
+$mask = array(
+ 'table' => 'sys_themes',
+ 'title' => 'Liste der Themes',
+ 'list' => array(
+ 'id' => array(
+ 'name' => 'ID',
+ 'visible' => false,
+ ),
+ 'name' => array(
+ 'name' => 'Name',
+ 'width' => 150,
+ ),
+ ),
+ 'edit' => array(
+ 'name' => array(
+ 'name' => 'Name',
+ 'type' => 'text',
+ 'size' => 25,
+ ),
+ 'css' => array(
+ 'name' => 'CSS Code',
+ 'type' => 'textarea',
+ 'rows' => 25,
+ ),
+ ),
+ );
+
+?>
'width' => 70,
'sql' => 'sys_group.name',
),
+ 'theme' => array(
+ 'name' => 'Theme',
+ 'width' => 90,
+ 'control' => "new Rico.TableColumn.lookup(".grid_lookup_sql('sys_themes','id','name').", 0, '')",
+ ),
),
'edit' => array(
'login' => array(
'type' => 'select',
'options' => 'SELECT id,name AS text FROM sys_group ORDER BY name',
),
+ 'theme' => array(
+ 'name' => 'Theme',
+ 'type' => 'select',
+ 'options' => 'SELECT id,name AS text FROM sys_themes ORDER BY name',
+ ),
'passwd' => array(
'name' => 'Passwort',
'type' => 'passwd',
cursor: default;
}
-div.ricoLG_selection {
- background-color: #fff6bf;
-}
-
-.ricoLG_table th {
- background-color: #DDD;
-}
-
div.ricoWindow {
border: 1px solid #BBB;
}
div.ricoTitle {
- background-color: #83afff;
+ background-color: #316994;
color: white;
color: #EEE;
padding-left: 2px;
cursor: pointer;
}
div.ricoContent {
- background-color: #dbe8ff;
padding-top: 6px;
padding-left: 3px;
padding-bottom: 5px;
div.form {
margin-top: 0px;
padding: 2px;
- background-color: #DDD;
border: 1px solid #AAA;
color: #555;
overflow: hidden;
margin: -2px;
margin-bottom: 3px;
font-weight: bold;
- color: #444;
- background: #CCC;
}
input, select {
--- /dev/null
+<?php
+require_once('init.php');
+require_once('lib/general.php');
+
+$theme = 2;
+
+$sql = sprintf("SELECT sys_theme_keys.name,value FROM sys_theme_values " .
+ "JOIN sys_theme_keys ON key = sys_theme_keys.id WHERE theme = %d",
+ $theme);
+$sth = pg_query($sql);
+
+if ($sth === false) exit;
+
+$styles = array();
+while ($row = pg_fetch_assoc($sth)) {
+ switch ($row['name']) {
+ case 'box-background':
+ $styles['div.ricoContent']['background-color'] = $row['value'];
+ $styles['div.form']['background-color'] = $row['value'];
+ break;
+ case 'box-title-background':
+ $styles['div.ricoTitle']['background-color'] = $row['value'];
+ $styles['div.form p.title']['background-color'] = $row['value'];
+ $styles['.ricoLG_table th']['background-color'] = $row['value'];
+ break;
+ case 'box-title-bottom':
+ $styles['div.ricoTitle']['border-bottom'] = $row['value'];
+ $styles['div.form p.title']['border-bottom'] = $row['value'];
+ $styles['.ricoLG_table th']['border-bottom'] = $row['value'];
+ break;
+ case 'box-title-foreground':
+ $styles['div.ricoTitle']['color'] = $row['value'];
+ $styles['div.form p.title']['color'] = $row['value'];
+ $styles['.ricoLG_table th']['color'] = $row['value'];
+ $styles['.ricoLG_table th a']['color'] = $row['value'];
+ break;
+ case 'table-selection':
+ $styles['div.ricoLG_selection']['background-color'] = $row['value'];
+ break;
+ case 'title1-background':
+ $styles['h3.title']['background-color'] = $row['value'];
+ break;
+ case 'title1-bottom':
+ $styles['h3.title']['border-bottom'] = $row['value'];
+ break;
+ case 'title2-background':
+ $styles['h3.title2']['background-color'] = $row['value'];
+ break;
+ case 'title2-bottom':
+ $styles['h3.title2']['border-bottom'] = $row['value'];
+ break;
+ }
+}
+
+error_log(var_export($styles,true));
+header('Content-type: text/css');
+
+foreach ($styles as $name => $data) {
+ printf("%s {\n", $name);
+ foreach ($data as $key => $value)
+ printf(" %s: %s;\n", $key, $value);
+ echo("}\n");
+}
+?>