Index: branches/unlabeled/unlabeled-1.1.32/core/kernel/utility/formatters/serialized_formatter.php
===================================================================
diff -u -r4759 -r8211
--- branches/unlabeled/unlabeled-1.1.32/core/kernel/utility/formatters/serialized_formatter.php (.../serialized_formatter.php) (revision 4759)
+++ branches/unlabeled/unlabeled-1.1.32/core/kernel/utility/formatters/serialized_formatter.php (.../serialized_formatter.php) (revision 8211)
@@ -2,10 +2,19 @@
class kSerializedFormatter extends kFormatter {
+ function Parse($value, $field_name, &$object)
+ {
+ $options = $object->GetFieldOptions($field_name);
+ $value = array_merge_recursive2(unserialize($options['default']), $value);
+ return serialize($value);
+ }
+
function Format($value, $field_name, $object, $format=null)
{
$data = unserialize($value);
- return $data[$format];
+ $format = explode('.', $format);
+ $format = '\''.implode('\', \'', $format).'\'';
+ return eval('return getArrayValue($data, '.$format.');');
}
}
Index: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/tools/skins.tpl
===================================================================
diff -u
--- branches/unlabeled/unlabeled-1.1.2/core/admin_templates/tools/skins.tpl (revision 0)
+++ branches/unlabeled/unlabeled-1.1.2/core/admin_templates/tools/skins.tpl (revision 8211)
@@ -0,0 +1,51 @@
+
+
+
+
+
+
+
+
+
+
">
+
+
+ :
+ |
+
+ ');" value="Go">
+ |
+ |
+
+
+
+
+
+
\ No newline at end of file
Index: branches/unlabeled/unlabeled-1.7.2/core/install/install_data.sql
===================================================================
diff -u -r8120 -r8211
--- branches/unlabeled/unlabeled-1.7.2/core/install/install_data.sql (.../install_data.sql) (revision 8120)
+++ branches/unlabeled/unlabeled-1.7.2/core/install/install_data.sql (.../install_data.sql) (revision 8211)
@@ -580,4 +580,7 @@
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:service.view', 11, 1, 1, 0);
+INSERT INTO Skins VALUES (DEFAULT, 'Default', '/* General elements */\r\n\r\nhtml {\r\n height: 100%;\r\n}\r\n\r\nbody {\r\n font-family: verdana,arial,helvetica,sans-serif;\r\n font-size: 9pt;\r\n color: #000000;\r\n overflow-x: auto; overflow-y: auto;\r\n margin: 0px 0px 0px 0px;\r\n text-decoration: none;\r\n}\r\n\r\na {\r\n color: #006699;\r\n text-decoration: none;\r\n}\r\n\r\na:hover {\r\n color: #009ff0;\r\n text-decoration: none;\r\n}\r\n\r\nform {\r\n display: inline;\r\n}\r\n\r\nimg { border: 0px; }\r\n\r\nbody.height-100 {\r\n height: 100%;\r\n}\r\n\r\nbody.regular-body {\r\n margin: 0px 10px 5px 10px;\r\n color: @@SectionColor@@;\r\n background-color: @@SectionBgColor@@;\r\n}\r\n\r\nbody.edit-popup {\r\n margin: 0px 0px 0px 0px;\r\n}\r\n\r\ntable.collapsed {\r\n border-collapse: collapse;\r\n}\r\n\r\n.bordered, table.bordered, .bordered-no-bottom {\r\n border: 1px solid #000000;\r\n border-collapse: collapse;\r\n}\r\n\r\n.bordered-no-bottom {\r\n border-bottom: none;\r\n}\r\n\r\n.login-table td {\r\n padding: 1px;\r\n}\r\n\r\n.disabled {\r\n background-color: #ebebeb;\r\n}\r\n\r\n/* Head frame */\r\n.head-table tr td {\r\n background-color: @@HeadBgColor@@;\r\n color: @@HeadColor@@\r\n}\r\n\r\ntd.kx-block-header, .head-table tr td.kx-block-header{\r\n color: @@HeadBarColor@@;\r\n background-color: @@HeadBarBgColor@@;\r\n padding-left: 7px;\r\n padding-right: 7px;\r\n}\r\n\r\na.kx-header-link {\r\n text-decoration: underline;\r\n color: #FFFFFF;\r\n}\r\n\r\na.kx-header-link:hover {\r\n color: #FFCB05;\r\n text-decoration: none;\r\n}\r\n\r\n.kx-secondary-foreground {\r\n color: @@HeadBarColor@@;\r\n background-color: @@HeadBarBgColor@@;\r\n}\r\n\r\n.kx-login-button {\r\n background-color: #2D79D6;\r\n color: #FFFFFF;\r\n}\r\n\r\n/* General form button (yellow) */\r\n.button {\r\n font-size: 12px;\r\n font-weight: normal;\r\n color: #000000;\r\n background: url(../img/button_back.gif) #f9eeae repeat-x;\r\n text-decoration: none;\r\n}\r\n\r\n/* Disabled (grayed-out) form button */\r\n.button-disabled {\r\n font-size: 12px;\r\n font-weight: normal;\r\n color: #676767;\r\n background: url(../img/button_back_disabled.gif) #f9eeae repeat-x;\r\n text-decoration: none;\r\n}\r\n\r\n/* Tabs bar */\r\n\r\n.tab, .tab-active {\r\n background-color: #F0F1EB;\r\n padding: 3px 7px 2px 7px;\r\n border-top: 1px solid black;\r\n border-left: 1px solid black;\r\n border-right: 1px solid black;\r\n}\r\n\r\n.tab-active {\r\n background-color: #2D79D6;\r\n border-bottom: 1px solid #2D79D6;\r\n}\r\n\r\n.tab a {\r\n color: #00659C;\r\n font-weight: bold;\r\n}\r\n\r\n.tab-active a {\r\n color: #fff;\r\n font-weight: bold;\r\n}\r\n\r\n\r\n/* Toolbar */\r\n\r\n.toolbar {\r\n font-size: 8pt;\r\n border: 1px solid #000000;\r\n border-width: 0px 1px 1px 1px;\r\n background-color: @@ToolbarBgColor@@;\r\n border-collapse: collapse;\r\n}\r\n\r\n.toolbar td {\r\n height: 100%;\r\n}\r\n\r\n.toolbar-button, .toolbar-button-disabled, .toolbar-button-over {\r\n float: left;\r\n text-align: center;\r\n font-size: 8pt;\r\n padding: 5px 5px 5px 5px;\r\n vertical-align: middle;\r\n color: #006F99;\r\n}\r\n\r\n.toolbar-button-over {\r\n color: #000;\r\n}\r\n\r\n.toolbar-button-disabled {\r\n color: #444;\r\n}\r\n\r\n/* Scrollable Grids */\r\n\r\n\r\n/* Main Grid class */\r\n.grid-scrollable {\r\n padding: 0px;\r\n border: 1px solid black !important;\r\n border-top: none !important;\r\n}\r\n\r\n/* Div generated by js, which contains all the scrollable grid elements, affects the style of scrollable area without data (if there are too few rows) */\r\n.grid-container {\r\n background-color: #fff;\r\n}\r\n\r\n.grid-container table {\r\n border-collapse: collapse;\r\n}\r\n\r\n/* Inner div generated in each data-cell */\r\n.grid-cell-div {\r\n overflow: hidden;\r\n height: auto;\r\n}\r\n\r\n/* Main row definition */\r\n.grid-data-row td, .grid-data-row-selected td, .grid-data-row-even-selected td, .grid-data-row-mouseover td, .table-color1, .table-color2 {\r\n font-weight: normal;\r\n color: @@OddColor@@;\r\n background-color: @@OddBgColor@@;\r\n padding: 3px 5px 3px 5px;\r\n height: 30px;\r\n overflow: hidden;\r\n /* border-right: 1px solid black; */\r\n}\r\n.grid-data-row-even td, .table-color2 {\r\n background-color: @@EvenBgColor@@;\r\n color: @@EvenColor@@;\r\n}\r\n.grid-data-row td a, .grid-data-row-selected td a, .grid-data-row-mouseover td a {\r\n text-decoration: underline;\r\n}\r\n\r\n/* mouse-over rows */\r\n.grid-data-row-mouseover td {\r\n background: #FFFDF4;\r\n}\r\n\r\n/* Selected row, applies to both checkbox and data areas */\r\n.grid-data-row-selected td {\r\n background: #FEF2D6;\r\n}\r\n\r\n.grid-data-row-even-selected td {\r\n background: #FFF7E0;\r\n}\r\n\r\n/* General header cell definition */\r\n.grid-header-row td {\r\n font-weight: bold;\r\n background-color: @@ColumnTitlesBgColor@@;\r\n text-decoration: none;\r\n padding: 3px 5px 3px 5px;\r\n color: @@ColumnTitlesColor@@;\r\n border-right: none;\r\n text-align: left;\r\n vertical-align: middle !important;\r\n white-space: nowrap;\r\n /* border-right: 1px solid black; */\r\n}\r\n\r\n/* Filters row */\r\ntr.grid-header-row-0 td {\r\n background-color: @@FiltersBgColor@@;\r\n border-bottom: 1px solid black;\r\n}\r\n\r\n/* Grid Filters */\r\ntable.range-filter {\r\n width: 100%;\r\n}\r\n\r\n.range-filter td {\r\n padding: 0px 0px 2px 2px !important;\r\n border: none !important;\r\n font-size: 8pt !important;\r\n font-weight: normal !important;\r\n text-align: left;\r\n color: #000000 !important;\r\n}\r\n\r\ninput.filter, select.filter {\r\n margin-bottom: 0px;\r\n width: 85%;\r\n}\r\n\r\ninput.filter-active {\r\n background-color: #FFFF00;\r\n}\r\n\r\nselect.filter-active {\r\n background-color: #FFFF00;\r\n}\r\n\r\n/* Column titles row */\r\ntr.grid-header-row-1 td {\r\n height: 25px;\r\n font-weight: bold;\r\n background-color: @@ColumnTitlesBgColor@@;\r\n color: @@ColumnTitlesColor@@;\r\n}\r\n\r\ntr.grid-header-row-1 td a {\r\n color: @@ColumnTitlesColor@@;\r\n}\r\n\r\ntr.grid-header-row-1 td a:hover {\r\n color: #FFCC00;\r\n}\r\n\r\n\r\n.grid-footer-row td {\r\n background-color: #D7D7D7;\r\n font-weight: bold;\r\n border-right: none;\r\n padding: 3px 5px 3px 5px;\r\n}\r\n\r\ntd.grid-header-last-cell, td.grid-data-last-cell, td.grid-footer-last-cell {\r\n border-right: none !important;\r\n}\r\n\r\ntd.grid-data-col-0, td.grid-data-col-0 div {\r\n text-align: center;\r\n vertical-align: middle !important;\r\n}\r\n\r\ntr.grid-header-row-0 td.grid-header-col-0 {\r\n text-align: center;\r\n vertical-align: middle !important;\r\n}\r\n\r\ntr.grid-header-row-0 td.grid-header-col-0 div {\r\n display: table-cell;\r\n vertical-align: middle;\r\n}\r\n\r\n.grid-status-bar {\r\n border: 1px solid black;\r\n border-top: none;\r\n padding: 0px;\r\n width: 100%;\r\n border-collapse: collapse;\r\n height: 30px;\r\n}\r\n\r\n.grid-status-bar td {\r\n background-color: @@TitleBarBgColor@@;\r\n color: @@TitleBarColor@@;\r\n font-size: 11pt;\r\n font-weight: normal;\r\n padding: 2px 8px 2px 8px;\r\n}\r\n\r\n/* /Scrollable Grids */\r\n\r\n\r\n/* Forms */\r\ntable.edit-form {\r\n border: none;\r\n border-top-width: 0px;\r\n border-collapse: collapse;\r\n width: 100%;\r\n}\r\n\r\n.edit-form-odd, .edit-form-even {\r\n padding: 0px;\r\n}\r\n\r\n.subsectiontitle {\r\n font-size: 10pt;\r\n font-weight: bold;\r\n background-color: #4A92CE;\r\n color: #fff;\r\n height: 25px;\r\n border-top: 1px solid black;\r\n}\r\n\r\n.label-cell {\r\n background: #DEE7F6 url(../img/bgr_input_name_line.gif) no-repeat right bottom;\r\n font: 12px arial, sans-serif;\r\n padding: 4px 20px;\r\n width: 150px;\r\n}\r\n\r\n.control-mid {\r\n width: 13px;\r\n border-left: 1px solid #7A95C2;\r\n background: #fff url(../img/bgr_mid.gif) repeat-x left bottom;\r\n}\r\n\r\n.control-cell {\r\n font: 11px arial, sans-serif;\r\n padding: 4px 10px 5px 5px;\r\n background: #fff url(../img/bgr_input_line.gif) no-repeat left bottom;\r\n width: auto;\r\n vertical-align: middle;\r\n}\r\n\r\n.label-cell-filler {\r\n background: #DEE7F6 none;\r\n}\r\n.control-mid-filler {\r\n background: #fff none;\r\n border-left: 1px solid #7A95C2;\r\n}\r\n.control-cell-filler {\r\n background: #fff none;\r\n}\r\n\r\n\r\n.error-cell {\r\n background-color: #fff;\r\n color: red;\r\n}\r\n\r\n.form-warning {\r\n color: red;\r\n}\r\n\r\n.req-note {\r\n font-style: italic;\r\n color: #333;\r\n}\r\n\r\n#scroll_container table.tableborder {\r\n border-collapse: separate\r\n}\r\n\r\n\r\n/* Uploader */\r\n\r\n.uploader-main {\r\n position: absolute;\r\n display: none;\r\n z-index: 10;\r\n border: 1px solid #777;\r\n padding: 10px;\r\n width: 350px;\r\n height: 120px;\r\n overflow: hidden;\r\n background-color: #fff;\r\n}\r\n\r\n.uploader-percent {\r\n width: 100%;\r\n padding-top: 3px;\r\n text-align: center;\r\n position: relative;\r\n z-index: 20;\r\n float: left;\r\n font-weight: bold;\r\n}\r\n\r\n.uploader-left {\r\n width: 100%;\r\n border: 1px solid black;\r\n height: 20px;\r\n background: #fff url(../../../core/admin_templates/img/progress_left.gif);\r\n}\r\n\r\n.uploader-done {\r\n width: 0%;\r\n background-color: green;\r\n height: 20px;\r\n background: #4A92CE url(../../../core/admin_templates/img/progress_done.gif);\r\n}\r\n\r\n\r\n/* To be sorted */\r\n\r\n\r\n/* Section title, right to the big icon */\r\n.admintitle {\r\n font-size: 16pt;\r\n font-weight: bold;\r\n color: #2D79D6;\r\n text-decoration: none;\r\n}\r\n\r\n/* Left sid of bluebar */\r\n.header_left_bg {\r\n background-color: @@TitleBarBgColor@@;\r\n padding-left: 5px;\r\n}\r\n\r\n/* Right side of bluebar */\r\n.tablenav, tablenav a {\r\n font-size: 11pt;\r\n font-weight: bold;\r\n color: @@TitleBarColor@@;\r\n\r\n text-decoration: none;\r\n background-color: @@TitleBarBgColor@@;\r\n}\r\n\r\n/* Section title in the bluebar * -- why ''link''? :S */\r\n.tablenav_link {\r\n font-size: 11pt;\r\n font-weight: bold;\r\n color: @@TitleBarColor@@;\r\n text-decoration: none;\r\n}\r\n\r\n/* Active page in top and bottom bluebars pagination */\r\n.current_page {\r\n font-size: 10pt;\r\n font-weight: bold;\r\n background-color: #fff;\r\n color: #2D79D6;\r\n padding: 3px 2px 3px 3px;\r\n}\r\n\r\n/* Other pages and arrows in pagination on blue */\r\n.nav_url {\r\n font-size: 10pt;\r\n font-weight: bold;\r\n color: #fff;\r\n padding: 3px 2px 3px 3px;\r\n}\r\n\r\n/* Tree */\r\n.tree-body {\r\n background-color: @@TreeBgColor@@;\r\n height: 100%\r\n}\r\n\r\n.tree_head.td, .tree_head, .tree_head:hover {\r\n font-weight: bold;\r\n font-size: 10px;\r\n color: #FFFFFF;\r\n font-family: Verdana, Arial;\r\n text-decoration: none;\r\n}\r\n\r\n.tree {\r\n padding: 0px;\r\n border: none;\r\n border-collapse: collapse;\r\n}\r\n\r\n.tree tr td {\r\n padding: 0px;\r\n margin: 0px;\r\n font-family: helvetica, arial, verdana,;\r\n font-size: 11px;\r\n white-space: nowrap;\r\n}\r\n\r\n.tree tr td a {\r\n font-size: 11px;\r\n color: @@TreeColor@@;\r\n font-family: Helvetica, Arial, Verdana;\r\n text-decoration: none;\r\n padding: 2px 0px 2px 2px;\r\n}\r\n\r\n.tree tr.highlighted td a {\r\n background-color: @@TreeHighBgColor@@;\r\n color: @@TreeHighColor@@;\r\n}\r\n\r\n.tree tr.highlighted td a:hover {\r\n color: #fff;\r\n}\r\n\r\n.tree tr td a:hover {\r\n color: #000000;\r\n}', 'just_logo_1.gif', 'a:20:{s:11:"HeadBgColor";a:2:{s:11:"Description";s:27:"Head frame background color";s:5:"Value";s:7:"#1961B8";}s:9:"HeadColor";a:2:{s:11:"Description";s:21:"Head frame text color";s:5:"Value";s:7:"#CCFF00";}s:14:"SectionBgColor";a:2:{s:11:"Description";s:28:"Section bar background color";s:5:"Value";s:7:"#FFFFFF";}s:12:"SectionColor";a:2:{s:11:"Description";s:22:"Section bar text color";s:5:"Value";s:7:"#2D79D6";}s:12:"HeadBarColor";a:1:{s:5:"Value";s:7:"#FFFFFF";}s:14:"HeadBarBgColor";a:1:{s:5:"Value";s:7:"#1961B8";}s:13:"TitleBarColor";a:1:{s:5:"Value";s:7:"#FFFFFF";}s:15:"TitleBarBgColor";a:1:{s:5:"Value";s:7:"#2D79D6";}s:14:"ToolbarBgColor";a:1:{s:5:"Value";s:7:"#F0F1EB";}s:14:"FiltersBgColor";a:1:{s:5:"Value";s:7:"#D7D7D7";}s:17:"ColumnTitlesColor";a:1:{s:5:"Value";s:7:"#FFFFFF";}s:19:"ColumnTitlesBgColor";a:1:{s:5:"Value";s:7:"#999999";}s:8:"OddColor";a:1:{s:5:"Value";s:7:"#000000";}s:10:"OddBgColor";a:1:{s:5:"Value";s:7:"#F6F6F6";}s:9:"EvenColor";a:1:{s:5:"Value";s:7:"#000000";}s:11:"EvenBgColor";a:1:{s:5:"Value";s:7:"#EBEBEB";}s:9:"TreeColor";a:1:{s:5:"Value";s:7:"#006F99";}s:11:"TreeBgColor";a:1:{s:5:"Value";s:7:"#FFFFFF";}s:13:"TreeHighColor";a:1:{s:5:"Value";s:7:"#4A92CE";}s:15:"TreeHighBgColor";a:1:{s:5:"Value";s:7:"#FFFFFF";}}', 1178565761, 1);
+
INSERT INTO Modules VALUES ('Core', 'core/', 'adm', DEFAULT, 1, 1, '', 0, '0');
+
Index: branches/unlabeled/unlabeled-1.36.2/core/units/admin/admin_tag_processor.php
===================================================================
diff -u -r8180 -r8211
--- branches/unlabeled/unlabeled-1.36.2/core/units/admin/admin_tag_processor.php (.../admin_tag_processor.php) (revision 8180)
+++ branches/unlabeled/unlabeled-1.36.2/core/units/admin/admin_tag_processor.php (.../admin_tag_processor.php) (revision 8211)
@@ -153,11 +153,11 @@
$debug_mode = $this->Application->isDebugMode();
$super_admin_mode = $this->Application->RecallVar('super_admin');
-
+
ksort($section_data['children'], SORT_NUMERIC);
foreach ($section_data['children'] as $section_name) {
$section_data =& $sections_helper->getSectionData($section_name);
-
+
if (isset($section_data['show_mode'])) {
$show_mode = $section_data['show_mode'];
// if super admin section -> show in super admin mode & debug mode
@@ -170,7 +170,7 @@
continue;
}
}
-
+
$params['section_name'] = $section_name;
$ret .= $this->DrawTree($params);
$deep_level--;
@@ -737,6 +737,60 @@
return $this->Application->HREF($t, '', $vars);
}
+
+
+ function AdminSkin($params)
+ {
+ static $style;
+ if (!isset($style)) {
+ $style = $this->Conn->GetRow('SELECT * FROM '.TABLE_PREFIX.'Skins WHERE IsPrimary = 1');
+ }
+
+ $css_path = WRITEABLE.'/user_files';
+ $css_url = $this->Application->BaseURL(WRITEBALE_BASE).'user_files/';
+
+ if (isset($params['type']) && $params['type'] == 'logo') {
+ return $css_url.$style['Logo'];
+ }
+
+ $last_compiled = $style['LastCompiled'];
+
+ $style_name = strtolower( $style['Name'] );
+
+ if( file_exists($css_path.'/'.'admin-'.$style_name.'-'.$last_compiled.'.css') )
+ {
+ $ret = $css_url.'admin-'.$style_name.'-'.$last_compiled.'.css';
+
+ }
+ else
+ {
+ // search for previously compiled stylesheet
+ $last_compiled = 0;
+ if( $dh = opendir($css_path) )
+ {
+ while( ($file = readdir($dh)) !== false )
+ {
+ if( preg_match('/admin-(.*)-([\d]+).css/', $file, $rets) )
+ {
+ if( $rets[1] == $style_name && $rets[2] > $last_compiled ) $last_compiled = $rets[2];
+ }
+ }
+ closedir($dh);
+ }
+ if ($last_compiled) {
+ // found
+ $ret = $css_url.'admin-'.$style_name.'-'.$last_compiled.'.css';
+ }
+ else {
+ // not found
+ return '';
+ }
+ }
+
+ if (isset($params['file_only'])) return $ret;
+
+ return '';
+ }
}
?>
\ No newline at end of file
Index: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/skins/skin_list.tpl
===================================================================
diff -u
--- branches/unlabeled/unlabeled-1.1.2/core/admin_templates/skins/skin_list.tpl (revision 0)
+++ branches/unlabeled/unlabeled-1.1.2/core/admin_templates/skins/skin_list.tpl (revision 8211)
@@ -0,0 +1,74 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
Index: branches/unlabeled/unlabeled-1.6.2/core/admin_templates/tools/system_tools.tpl
===================================================================
diff -u -r8202 -r8211
--- branches/unlabeled/unlabeled-1.6.2/core/admin_templates/tools/system_tools.tpl (.../system_tools.tpl) (revision 8202)
+++ branches/unlabeled/unlabeled-1.6.2/core/admin_templates/tools/system_tools.tpl (.../system_tools.tpl) (revision 8211)
@@ -40,7 +40,7 @@
Table Structure:
|
-
+ |
table name (prefix optional) OR unit config prefix
Index: branches/unlabeled/unlabeled-1.1.2/core/units/skins/skins_config.php
===================================================================
diff -u
--- branches/unlabeled/unlabeled-1.1.2/core/units/skins/skins_config.php (revision 0)
+++ branches/unlabeled/unlabeled-1.1.2/core/units/skins/skins_config.php (revision 8211)
@@ -0,0 +1,164 @@
+ 'skin',
+ 'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
+ 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
+ 'EventHandlerClass' => Array('class'=>'SkinEventHandler','file'=>'skin_eh.php','build_event'=>'OnBuild'),
+ 'TagProcessorClass' => Array('class'=>'kDBTagProcessor','file'=>'','build_event'=>'OnBuild'),
+
+ 'AutoLoad' => true,
+ 'Hooks' => Array(
+ Array(
+ 'Mode' => hAFTER,
+ 'Conditional' => false,
+ 'HookToPrefix' => 'skin',
+ 'HookToSpecial' => '',
+ 'HookToEvent' => Array('OnSave'),
+ 'DoPrefix' => '',
+ 'DoSpecial' => '',
+ 'DoEvent' => 'OnCompileStylesheet',
+ ),
+ ),
+ 'QueryString' => Array(
+ 1 => 'id',
+ 2 => 'Page',
+ 3 => 'event',
+ 4 => 'mode',
+ ),
+ 'IDField' => 'SkinId',
+ 'StatusField' => Array('Status', 'IsPrimary'),
+ 'TableName' => TABLE_PREFIX.'Skins',
+
+/*
+ 'ForeignKey' => 'ParentId', // field title in TableName, linking record to a parent
+ 'ParentTableKey' => 'ParentId', // id (or other key) field title in parent's table
+ 'ParentPrefix' => 'parent',
+ 'AutoDelete' => true, // delete these items when parent is being deleted
+ 'AutoClone' => true, // clone these items when parent is being cloned
+*/
+
+ 'TitlePresets' => Array(
+ 'default' => Array(
+ 'new_status_labels' => Array('skin'=>'!la_title_AddingSkin!'),
+ 'edit_status_labels' => Array('skin'=>'!la_title_EditingSkin!'),
+ 'new_titlefield' => Array('skin'=>''),
+ ),
+
+ 'skin_list'=>Array(
+ 'prefixes' => Array('skin_List'),
+ 'format' => '!la_title_Skins! (#skin_recordcount#)',
+ ),
+
+ 'skin_edit'=>Array(
+ 'prefixes' => Array('skin'),
+ 'format' => '#skin_status# #skin_titlefield#',
+ ),
+ ),
+
+ 'PermSection' => Array('main' => 'in-portal:skins'),
+
+ // don't forget to add corresponding permissions to install script
+ // INSERT INTO Permissions VALUES (0, 'custom:custom.view', 11, 1, 1, 0);
+ // INSERT INTO Permissions VALUES (0, 'in-portal:skins.view', 11, 1, 1, 0), (0, 'in-portal:skins.add', 11, 1, 1, 0), (0, 'in-portal:skins.edit', 11, 1, 1, 0), (0, 'in-portal:skins.delete', 11, 1, 1, 0);
+ 'Sections' => Array(
+ 'in-portal:skins' => Array(
+ 'parent' => 'in-portal:tools',
+ 'icon' => 'conf_general',
+ 'label' => 'la_tab_Skins',
+ 'url' => Array('t' => 'skins/skin_list', 'pass' => 'm'),
+ 'permissions' => Array('view'),
+ 'priority' => 11,
+ 'show_mode' => smSUPER_ADMIN,
+ 'type' => stTREE,
+ ),
+ ),
+
+ 'TitleField' => 'Name', // field, used in bluebar when editing existing item
+
+ // Use %1$s for local table name with prefix, %2$s for calculated fields
+ 'ListSQLs' => Array( // key - special, value - list select sql
+ '' => 'SELECT %1$s.* %2$s
+ FROM %1$s',
+ ),
+ 'ItemSQLs' => Array(
+ '' => 'SELECT %1$s.* %2$s
+ FROM %1$s',
+ ),
+ 'ListSortings' => Array(
+ '' => Array(
+// 'ForcedSorting' => Array('Priority' => 'desc'),
+ 'Sorting' => Array('Name' => 'asc'),
+ )
+ ),
+ 'Fields' => Array (
+ 'SkinId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'Name' => Array ('type' => 'string', 'max_len' => 255, 'default' => NULL),
+ 'CSS' => Array ('type' => 'string', 'default' => NULL),
+ 'Logo' => Array(
+ 'type'=>'string', 'formatter'=>'kUploadFormatter',
+ 'max_size'=>MAX_UPLOAD_SIZE, // in Bytes !
+ 'file_types'=>'*.jpg;*.gif;*.png', 'files_description'=>'!la_ImageFiles!',
+ 'upload_dir'=>'/system/user_files/', // relative to project's home
+ 'as_image'=>true, 'thumb_width'=>100, 'thumb_height'=>100,
+ 'multiple'=>false, // false or max number of files - will be stored as serialized array of paths
+ 'direct_links'=>false, // use direct file urls or send files through wrapper (requires mod_mime_magic)
+ ),
+ 'Options' => Array(
+ 'type' => 'string', 'default' => NULL,
+ 'formatter' => 'kSerializedFormatter',
+ 'default'=>serialize(
+ array(
+ 'HeadBgColor' => array('Description'=>'Head frame background color', 'Value'=>'#1961B8'),
+ 'HeadColor' => array('Description'=>'Head frame text color', 'Value'=>'#000000'),
+ 'SectionBgColor' => array('Description'=>'Section bar background color', 'Value'=>'#2D79D6'),
+ 'SectionColor' => array('Description'=>'Section bar text color', 'Value'=>'#000000'),
+ )
+ ),
+ ),
+ 'IsPrimary' => Array(
+ 'type' => 'int', 'formatter' => 'kOptionsFormatter',
+ 'options' => Array(1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
+ 'not_null' => 1, 'default' => 0
+ ),
+ ),
+
+ 'Grids' => Array(
+ 'Default' => Array(
+ 'Icons' => Array('default'=>'icon16_test.gif'),
+ 'Fields' => Array(
+ 'SkinId' => Array( 'title'=>'la_col_Id', 'data_block' => 'grid_checkbox_td', 'width'=>50 ),
+ 'Name' => Array( 'title'=>'la_col_SkinName', 'width'=>200),
+ 'IsPrimary' => Array( 'title'=>'la_col_IsPrimary', 'width'=>150),
+ ),
+ ),
+ ),
+
+ /*'ConfigMapping' => Array(
+ 'PerPage' => 'Comm_Perpage_Tests',
+ 'ShortListPerPage' => 'Comm_Perpage_Tests_Short',
+ ),*/
+);
+
+/*
+
+Don't forget to:
+
+- Add table create statement to install_schema.sql
+ CREATE TABLE Tests (
+ `TestId` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
+ `Title` VARCHAR( 255 ) NOT NULL ,
+ `Description` TEXT NULL ,
+ `Email` VARCHAR( 255 ) NOT NULL ,
+ `Type` TINYINT NOT NULL ,
+ `Phone` VARCHAR( 50 ) NOT NULL ,
+ `Qty` DOUBLE NOT NULL ,
+ `Status` TINYINT NOT NULL ,
+ `CreatedOn` INT NOT NULL ,
+ `Good` TINYINT NOT NULL
+)
+
+- Add permissions for admin gorup to install script (see 'Sections' key above)
+
+
+*/
\ No newline at end of file
Index: branches/unlabeled/unlabeled-1.11.2/core/install/upgrades.sql
===================================================================
diff -u -r8154 -r8211
--- branches/unlabeled/unlabeled-1.11.2/core/install/upgrades.sql (.../upgrades.sql) (revision 8154)
+++ branches/unlabeled/unlabeled-1.11.2/core/install/upgrades.sql (.../upgrades.sql) (revision 8211)
@@ -72,4 +72,16 @@
TablesAffected text,
PRIMARY KEY (CounterId),
UNIQUE KEY Name (Name)
-);
\ No newline at end of file
+);
+CREATE TABLE Skins (
+ `SkinId` int(11) NOT NULL auto_increment,
+ `Name` varchar(255) default NULL,
+ `CSS` text,
+ `Logo` varchar(255) default NULL,
+ `Options` text,
+ `LastCompiled` int(11) NOT NULL default '0',
+ `IsPrimary` int(1) NOT NULL default '0',
+ PRIMARY KEY (`SkinId`)
+)
+INSERT INTO Skins VALUES (DEFAULT, 'Default', '/* General elements */\r\n\r\nhtml {\r\n height: 100%;\r\n}\r\n\r\nbody {\r\n font-family: verdana,arial,helvetica,sans-serif;\r\n font-size: 9pt;\r\n color: #000000;\r\n overflow-x: auto; overflow-y: auto;\r\n margin: 0px 0px 0px 0px;\r\n text-decoration: none;\r\n}\r\n\r\na {\r\n color: #006699;\r\n text-decoration: none;\r\n}\r\n\r\na:hover {\r\n color: #009ff0;\r\n text-decoration: none;\r\n}\r\n\r\nform {\r\n display: inline;\r\n}\r\n\r\nimg { border: 0px; }\r\n\r\nbody.height-100 {\r\n height: 100%;\r\n}\r\n\r\nbody.regular-body {\r\n margin: 0px 10px 5px 10px;\r\n color: @@SectionColor@@;\r\n background-color: @@SectionBgColor@@;\r\n}\r\n\r\nbody.edit-popup {\r\n margin: 0px 0px 0px 0px;\r\n}\r\n\r\ntable.collapsed {\r\n border-collapse: collapse;\r\n}\r\n\r\n.bordered, table.bordered, .bordered-no-bottom {\r\n border: 1px solid #000000;\r\n border-collapse: collapse;\r\n}\r\n\r\n.bordered-no-bottom {\r\n border-bottom: none;\r\n}\r\n\r\n.login-table td {\r\n padding: 1px;\r\n}\r\n\r\n.disabled {\r\n background-color: #ebebeb;\r\n}\r\n\r\n/* Head frame */\r\n.head-table tr td {\r\n background-color: @@HeadBgColor@@;\r\n color: @@HeadColor@@\r\n}\r\n\r\ntd.kx-block-header, .head-table tr td.kx-block-header{\r\n color: @@HeadBarColor@@;\r\n background-color: @@HeadBarBgColor@@;\r\n padding-left: 7px;\r\n padding-right: 7px;\r\n}\r\n\r\na.kx-header-link {\r\n text-decoration: underline;\r\n color: #FFFFFF;\r\n}\r\n\r\na.kx-header-link:hover {\r\n color: #FFCB05;\r\n text-decoration: none;\r\n}\r\n\r\n.kx-secondary-foreground {\r\n color: @@HeadBarColor@@;\r\n background-color: @@HeadBarBgColor@@;\r\n}\r\n\r\n.kx-login-button {\r\n background-color: #2D79D6;\r\n color: #FFFFFF;\r\n}\r\n\r\n/* General form button (yellow) */\r\n.button {\r\n font-size: 12px;\r\n font-weight: normal;\r\n color: #000000;\r\n background: url(../img/button_back.gif) #f9eeae repeat-x;\r\n text-decoration: none;\r\n}\r\n\r\n/* Disabled (grayed-out) form button */\r\n.button-disabled {\r\n font-size: 12px;\r\n font-weight: normal;\r\n color: #676767;\r\n background: url(../img/button_back_disabled.gif) #f9eeae repeat-x;\r\n text-decoration: none;\r\n}\r\n\r\n/* Tabs bar */\r\n\r\n.tab, .tab-active {\r\n background-color: #F0F1EB;\r\n padding: 3px 7px 2px 7px;\r\n border-top: 1px solid black;\r\n border-left: 1px solid black;\r\n border-right: 1px solid black;\r\n}\r\n\r\n.tab-active {\r\n background-color: #2D79D6;\r\n border-bottom: 1px solid #2D79D6;\r\n}\r\n\r\n.tab a {\r\n color: #00659C;\r\n font-weight: bold;\r\n}\r\n\r\n.tab-active a {\r\n color: #fff;\r\n font-weight: bold;\r\n}\r\n\r\n\r\n/* Toolbar */\r\n\r\n.toolbar {\r\n font-size: 8pt;\r\n border: 1px solid #000000;\r\n border-width: 0px 1px 1px 1px;\r\n background-color: @@ToolbarBgColor@@;\r\n border-collapse: collapse;\r\n}\r\n\r\n.toolbar td {\r\n height: 100%;\r\n}\r\n\r\n.toolbar-button, .toolbar-button-disabled, .toolbar-button-over {\r\n float: left;\r\n text-align: center;\r\n font-size: 8pt;\r\n padding: 5px 5px 5px 5px;\r\n vertical-align: middle;\r\n color: #006F99;\r\n}\r\n\r\n.toolbar-button-over {\r\n color: #000;\r\n}\r\n\r\n.toolbar-button-disabled {\r\n color: #444;\r\n}\r\n\r\n/* Scrollable Grids */\r\n\r\n\r\n/* Main Grid class */\r\n.grid-scrollable {\r\n padding: 0px;\r\n border: 1px solid black !important;\r\n border-top: none !important;\r\n}\r\n\r\n/* Div generated by js, which contains all the scrollable grid elements, affects the style of scrollable area without data (if there are too few rows) */\r\n.grid-container {\r\n background-color: #fff;\r\n}\r\n\r\n.grid-container table {\r\n border-collapse: collapse;\r\n}\r\n\r\n/* Inner div generated in each data-cell */\r\n.grid-cell-div {\r\n overflow: hidden;\r\n height: auto;\r\n}\r\n\r\n/* Main row definition */\r\n.grid-data-row td, .grid-data-row-selected td, .grid-data-row-even-selected td, .grid-data-row-mouseover td, .table-color1, .table-color2 {\r\n font-weight: normal;\r\n color: @@OddColor@@;\r\n background-color: @@OddBgColor@@;\r\n padding: 3px 5px 3px 5px;\r\n height: 30px;\r\n overflow: hidden;\r\n /* border-right: 1px solid black; */\r\n}\r\n.grid-data-row-even td, .table-color2 {\r\n background-color: @@EvenBgColor@@;\r\n color: @@EvenColor@@;\r\n}\r\n.grid-data-row td a, .grid-data-row-selected td a, .grid-data-row-mouseover td a {\r\n text-decoration: underline;\r\n}\r\n\r\n/* mouse-over rows */\r\n.grid-data-row-mouseover td {\r\n background: #FFFDF4;\r\n}\r\n\r\n/* Selected row, applies to both checkbox and data areas */\r\n.grid-data-row-selected td {\r\n background: #FEF2D6;\r\n}\r\n\r\n.grid-data-row-even-selected td {\r\n background: #FFF7E0;\r\n}\r\n\r\n/* General header cell definition */\r\n.grid-header-row td {\r\n font-weight: bold;\r\n background-color: @@ColumnTitlesBgColor@@;\r\n text-decoration: none;\r\n padding: 3px 5px 3px 5px;\r\n color: @@ColumnTitlesColor@@;\r\n border-right: none;\r\n text-align: left;\r\n vertical-align: middle !important;\r\n white-space: nowrap;\r\n /* border-right: 1px solid black; */\r\n}\r\n\r\n/* Filters row */\r\ntr.grid-header-row-0 td {\r\n background-color: @@FiltersBgColor@@;\r\n border-bottom: 1px solid black;\r\n}\r\n\r\n/* Grid Filters */\r\ntable.range-filter {\r\n width: 100%;\r\n}\r\n\r\n.range-filter td {\r\n padding: 0px 0px 2px 2px !important;\r\n border: none !important;\r\n font-size: 8pt !important;\r\n font-weight: normal !important;\r\n text-align: left;\r\n color: #000000 !important;\r\n}\r\n\r\ninput.filter, select.filter {\r\n margin-bottom: 0px;\r\n width: 85%;\r\n}\r\n\r\ninput.filter-active {\r\n background-color: #FFFF00;\r\n}\r\n\r\nselect.filter-active {\r\n background-color: #FFFF00;\r\n}\r\n\r\n/* Column titles row */\r\ntr.grid-header-row-1 td {\r\n height: 25px;\r\n font-weight: bold;\r\n background-color: @@ColumnTitlesBgColor@@;\r\n color: @@ColumnTitlesColor@@;\r\n}\r\n\r\ntr.grid-header-row-1 td a {\r\n color: @@ColumnTitlesColor@@;\r\n}\r\n\r\ntr.grid-header-row-1 td a:hover {\r\n color: #FFCC00;\r\n}\r\n\r\n\r\n.grid-footer-row td {\r\n background-color: #D7D7D7;\r\n font-weight: bold;\r\n border-right: none;\r\n padding: 3px 5px 3px 5px;\r\n}\r\n\r\ntd.grid-header-last-cell, td.grid-data-last-cell, td.grid-footer-last-cell {\r\n border-right: none !important;\r\n}\r\n\r\ntd.grid-data-col-0, td.grid-data-col-0 div {\r\n text-align: center;\r\n vertical-align: middle !important;\r\n}\r\n\r\ntr.grid-header-row-0 td.grid-header-col-0 {\r\n text-align: center;\r\n vertical-align: middle !important;\r\n}\r\n\r\ntr.grid-header-row-0 td.grid-header-col-0 div {\r\n display: table-cell;\r\n vertical-align: middle;\r\n}\r\n\r\n.grid-status-bar {\r\n border: 1px solid black;\r\n border-top: none;\r\n padding: 0px;\r\n width: 100%;\r\n border-collapse: collapse;\r\n height: 30px;\r\n}\r\n\r\n.grid-status-bar td {\r\n background-color: @@TitleBarBgColor@@;\r\n color: @@TitleBarColor@@;\r\n font-size: 11pt;\r\n font-weight: normal;\r\n padding: 2px 8px 2px 8px;\r\n}\r\n\r\n/* /Scrollable Grids */\r\n\r\n\r\n/* Forms */\r\ntable.edit-form {\r\n border: none;\r\n border-top-width: 0px;\r\n border-collapse: collapse;\r\n width: 100%;\r\n}\r\n\r\n.edit-form-odd, .edit-form-even {\r\n padding: 0px;\r\n}\r\n\r\n.subsectiontitle {\r\n font-size: 10pt;\r\n font-weight: bold;\r\n background-color: #4A92CE;\r\n color: #fff;\r\n height: 25px;\r\n border-top: 1px solid black;\r\n}\r\n\r\n.label-cell {\r\n background: #DEE7F6 url(../img/bgr_input_name_line.gif) no-repeat right bottom;\r\n font: 12px arial, sans-serif;\r\n padding: 4px 20px;\r\n width: 150px;\r\n}\r\n\r\n.control-mid {\r\n width: 13px;\r\n border-left: 1px solid #7A95C2;\r\n background: #fff url(../img/bgr_mid.gif) repeat-x left bottom;\r\n}\r\n\r\n.control-cell {\r\n font: 11px arial, sans-serif;\r\n padding: 4px 10px 5px 5px;\r\n background: #fff url(../img/bgr_input_line.gif) no-repeat left bottom;\r\n width: auto;\r\n vertical-align: middle;\r\n}\r\n\r\n.label-cell-filler {\r\n background: #DEE7F6 none;\r\n}\r\n.control-mid-filler {\r\n background: #fff none;\r\n border-left: 1px solid #7A95C2;\r\n}\r\n.control-cell-filler {\r\n background: #fff none;\r\n}\r\n\r\n\r\n.error-cell {\r\n background-color: #fff;\r\n color: red;\r\n}\r\n\r\n.form-warning {\r\n color: red;\r\n}\r\n\r\n.req-note {\r\n font-style: italic;\r\n color: #333;\r\n}\r\n\r\n#scroll_container table.tableborder {\r\n border-collapse: separate\r\n}\r\n\r\n\r\n/* Uploader */\r\n\r\n.uploader-main {\r\n position: absolute;\r\n display: none;\r\n z-index: 10;\r\n border: 1px solid #777;\r\n padding: 10px;\r\n width: 350px;\r\n height: 120px;\r\n overflow: hidden;\r\n background-color: #fff;\r\n}\r\n\r\n.uploader-percent {\r\n width: 100%;\r\n padding-top: 3px;\r\n text-align: center;\r\n position: relative;\r\n z-index: 20;\r\n float: left;\r\n font-weight: bold;\r\n}\r\n\r\n.uploader-left {\r\n width: 100%;\r\n border: 1px solid black;\r\n height: 20px;\r\n background: #fff url(../../../core/admin_templates/img/progress_left.gif);\r\n}\r\n\r\n.uploader-done {\r\n width: 0%;\r\n background-color: green;\r\n height: 20px;\r\n background: #4A92CE url(../../../core/admin_templates/img/progress_done.gif);\r\n}\r\n\r\n\r\n/* To be sorted */\r\n\r\n\r\n/* Section title, right to the big icon */\r\n.admintitle {\r\n font-size: 16pt;\r\n font-weight: bold;\r\n color: #2D79D6;\r\n text-decoration: none;\r\n}\r\n\r\n/* Left sid of bluebar */\r\n.header_left_bg {\r\n background-color: @@TitleBarBgColor@@;\r\n padding-left: 5px;\r\n}\r\n\r\n/* Right side of bluebar */\r\n.tablenav, tablenav a {\r\n font-size: 11pt;\r\n font-weight: bold;\r\n color: @@TitleBarColor@@;\r\n\r\n text-decoration: none;\r\n background-color: @@TitleBarBgColor@@;\r\n}\r\n\r\n/* Section title in the bluebar * -- why ''link''? :S */\r\n.tablenav_link {\r\n font-size: 11pt;\r\n font-weight: bold;\r\n color: @@TitleBarColor@@;\r\n text-decoration: none;\r\n}\r\n\r\n/* Active page in top and bottom bluebars pagination */\r\n.current_page {\r\n font-size: 10pt;\r\n font-weight: bold;\r\n background-color: #fff;\r\n color: #2D79D6;\r\n padding: 3px 2px 3px 3px;\r\n}\r\n\r\n/* Other pages and arrows in pagination on blue */\r\n.nav_url {\r\n font-size: 10pt;\r\n font-weight: bold;\r\n color: #fff;\r\n padding: 3px 2px 3px 3px;\r\n}\r\n\r\n/* Tree */\r\n.tree-body {\r\n background-color: @@TreeBgColor@@;\r\n height: 100%\r\n}\r\n\r\n.tree_head.td, .tree_head, .tree_head:hover {\r\n font-weight: bold;\r\n font-size: 10px;\r\n color: #FFFFFF;\r\n font-family: Verdana, Arial;\r\n text-decoration: none;\r\n}\r\n\r\n.tree {\r\n padding: 0px;\r\n border: none;\r\n border-collapse: collapse;\r\n}\r\n\r\n.tree tr td {\r\n padding: 0px;\r\n margin: 0px;\r\n font-family: helvetica, arial, verdana,;\r\n font-size: 11px;\r\n white-space: nowrap;\r\n}\r\n\r\n.tree tr td a {\r\n font-size: 11px;\r\n color: @@TreeColor@@;\r\n font-family: Helvetica, Arial, Verdana;\r\n text-decoration: none;\r\n padding: 2px 0px 2px 2px;\r\n}\r\n\r\n.tree tr.highlighted td a {\r\n background-color: @@TreeHighBgColor@@;\r\n color: @@TreeHighColor@@;\r\n}\r\n\r\n.tree tr.highlighted td a:hover {\r\n color: #fff;\r\n}\r\n\r\n.tree tr td a:hover {\r\n color: #000000;\r\n}', 'just_logo_1.gif', 'a:20:{s:11:"HeadBgColor";a:2:{s:11:"Description";s:27:"Head frame background color";s:5:"Value";s:7:"#1961B8";}s:9:"HeadColor";a:2:{s:11:"Description";s:21:"Head frame text color";s:5:"Value";s:7:"#CCFF00";}s:14:"SectionBgColor";a:2:{s:11:"Description";s:28:"Section bar background color";s:5:"Value";s:7:"#FFFFFF";}s:12:"SectionColor";a:2:{s:11:"Description";s:22:"Section bar text color";s:5:"Value";s:7:"#2D79D6";}s:12:"HeadBarColor";a:1:{s:5:"Value";s:7:"#FFFFFF";}s:14:"HeadBarBgColor";a:1:{s:5:"Value";s:7:"#1961B8";}s:13:"TitleBarColor";a:1:{s:5:"Value";s:7:"#FFFFFF";}s:15:"TitleBarBgColor";a:1:{s:5:"Value";s:7:"#2D79D6";}s:14:"ToolbarBgColor";a:1:{s:5:"Value";s:7:"#F0F1EB";}s:14:"FiltersBgColor";a:1:{s:5:"Value";s:7:"#D7D7D7";}s:17:"ColumnTitlesColor";a:1:{s:5:"Value";s:7:"#FFFFFF";}s:19:"ColumnTitlesBgColor";a:1:{s:5:"Value";s:7:"#999999";}s:8:"OddColor";a:1:{s:5:"Value";s:7:"#000000";}s:10:"OddBgColor";a:1:{s:5:"Value";s:7:"#F6F6F6";}s:9:"EvenColor";a:1:{s:5:"Value";s:7:"#000000";}s:11:"EvenBgColor";a:1:{s:5:"Value";s:7:"#EBEBEB";}s:9:"TreeColor";a:1:{s:5:"Value";s:7:"#006F99";}s:11:"TreeBgColor";a:1:{s:5:"Value";s:7:"#FFFFFF";}s:13:"TreeHighColor";a:1:{s:5:"Value";s:7:"#4A92CE";}s:15:"TreeHighBgColor";a:1:{s:5:"Value";s:7:"#FFFFFF";}}', 1178565761, 1);
+INSERT INTO Permissions VALUES (0, 'in-portal:skins.view', 11, 1, 1, 0), (0, 'in-portal:skins.add', 11, 1, 1, 0), (0, 'in-portal:skins.edit', 11, 1, 1, 0), (0, 'in-portal:skins.delete', 11, 1, 1, 0);
\ No newline at end of file
Index: branches/unlabeled/unlabeled-1.53.2/core/kernel/startup.php
===================================================================
diff -u -r7861 -r8211
--- branches/unlabeled/unlabeled-1.53.2/core/kernel/startup.php (.../startup.php) (revision 7861)
+++ branches/unlabeled/unlabeled-1.53.2/core/kernel/startup.php (.../startup.php) (revision 8211)
@@ -36,6 +36,7 @@
if (isset($vars['WriteablePath'])) {
define('WRITEABLE', FULL_PATH.$vars['WriteablePath']);
+ define('WRITEBALE_BASE', $vars['WriteablePath']);
}
if ($vars === false || count($vars) == 0) {
Index: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/skins/skin_edit.tpl
===================================================================
diff -u
--- branches/unlabeled/unlabeled-1.1.2/core/admin_templates/skins/skin_edit.tpl (revision 0)
+++ branches/unlabeled/unlabeled-1.1.2/core/admin_templates/skins/skin_edit.tpl (revision 8211)
@@ -0,0 +1,285 @@
+
+
+
+
+
+
+
+
+
+ |
">
+
+
+ " type="text"
+ name="[][Value]" id="[]" value="">
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: branches/unlabeled/unlabeled-1.1.2/system/user_files/just_logo.gif
===================================================================
diff -u
Binary files differ
Index: branches/unlabeled/unlabeled-1.78.2/core/kernel/db/db_tag_processor.php
===================================================================
diff -u -r8183 -r8211
--- branches/unlabeled/unlabeled-1.78.2/core/kernel/db/db_tag_processor.php (.../db_tag_processor.php) (revision 8183)
+++ branches/unlabeled/unlabeled-1.78.2/core/kernel/db/db_tag_processor.php (.../db_tag_processor.php) (revision 8211)
@@ -1445,7 +1445,7 @@
case 'multiselect':
case 'radio':
$field_options = $object->GetFieldOptions($field, 'options');
-
+
if ($object->GetDBField('DirectOptions')) {
// used for custom fields
$field_options['options'] = $object->GetDBField('DirectOptions');
@@ -1454,7 +1454,7 @@
// used for configuration
$field_options['options'] = $helper->GetValuesHash( $object->GetDBField($params['value_list_field']) );
}
-
+
$object->SetFieldOptions($field, $field_options);
break;
@@ -1880,6 +1880,23 @@
return $this->Application->ProcessParsedTag('m', 't', $params);
}
+
+ function PrintSerializedFields($params)
+ {
+ $object =& $this->getObject();
+ $field = $this->SelectParam($params, 'field');
+ $data = unserialize($object->GetDBField($field));
+
+ $o = '';
+ $std_params['name'] = $params['render_as'];
+ $std_params['field'] = $params['field'];
+ $std_params['pass_params'] = true;
+ foreach ($data as $key => $row) {
+ $block_params = array_merge($std_params, $row, array('key'=>$key));
+ $o .= $this->Application->ParseBlock($block_params);
+ }
+ return $o;
+ }
}
?>
\ No newline at end of file
Index: branches/unlabeled/unlabeled-1.11.2/core/install/install_schema.sql
===================================================================
diff -u -r8107 -r8211
--- branches/unlabeled/unlabeled-1.11.2/core/install/install_schema.sql (.../install_schema.sql) (revision 8107)
+++ branches/unlabeled/unlabeled-1.11.2/core/install/install_schema.sql (.../install_schema.sql) (revision 8211)
@@ -433,3 +433,14 @@
PRIMARY KEY (CounterId),
UNIQUE KEY Name (Name)
);
+
+CREATE TABLE Skins (
+ `SkinId` int(11) NOT NULL auto_increment,
+ `Name` varchar(255) default NULL,
+ `CSS` text,
+ `Logo` varchar(255) default NULL,
+ `Options` text,
+ `LastCompiled` int(11) NOT NULL default '0',
+ `IsPrimary` int(1) NOT NULL default '0',
+ PRIMARY KEY (`SkinId`)
+)
\ No newline at end of file
Index: branches/unlabeled/unlabeled-1.1.2/core/units/skins/skin_eh.php
===================================================================
diff -u
--- branches/unlabeled/unlabeled-1.1.2/core/units/skins/skin_eh.php (revision 0)
+++ branches/unlabeled/unlabeled-1.1.2/core/units/skins/skin_eh.php (revision 8211)
@@ -0,0 +1,90 @@
+Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1)) {
+ return;
+ }
+
+ $ids = $this->StoreSelectedIDs($event);
+ if ($ids) {
+ $id = array_shift($ids);
+ $this->setPrimary($id);
+ }
+
+ $this->clearSelectedIDs($event);
+ }
+
+ function setPrimary($id)
+ {
+ $id_field = $this->Application->getUnitOption($this->Prefix, 'IDField');
+ $table_name = $this->Application->getUnitOption($this->Prefix, 'TableName');
+
+ $sql = 'UPDATE '.$table_name.'
+ SET IsPrimary = 0';
+ $this->Conn->Query($sql);
+
+
+ $sql = 'UPDATE '.$table_name.'
+ SET IsPrimary = 1
+ WHERE '.$id_field.' = '.$id;
+ $this->Conn->Query($sql);
+ }
+
+
+ /**
+ * [HOOK] Compile stylesheet file based on theme definitions
+ *
+ * @param kEvent $event
+ */
+ function OnCompileStylesheet(&$event)
+ {
+ $object =& $event->getObject( Array('skip_autoload' => true) );
+ $object->SwitchToLive();
+
+ $ids = explode(',', $event->MasterEvent->getEventParam('ids') );
+
+ if(!$ids) return false;
+ foreach($ids as $id)
+ {
+ $object->Load($id);
+ $this->Compile($object);
+ }
+ }
+
+ function Compile(&$object)
+ {
+ $ret = $object->GetDBField('CSS');
+ $options = $object->GetDBField('Options');
+ $options = unserialize($options);
+ $options['base_url'] = array('Value'=>rtrim($this->Application->BaseURL(), '/'));
+ foreach ($options as $key => $row) {
+ $ret = str_replace('@@'.$key.'@@', $row['Value'], $ret);
+ }
+
+ $compile_ts = adodb_mktime();
+ $css_path = WRITEABLE.'/user_files/';
+
+ $css_file = $css_path.'admin-'.strtolower($object->GetDBField('Name')).'-'.$compile_ts.'.css';
+
+ $fp = fopen($css_file,'w');
+ if($fp)
+ {
+ $prev_css = $css_path.'admin-'.strtolower($object->GetDBField('Name')).'-'.$object->GetDBField('LastCompiled').'.css';
+ if( file_exists($prev_css) ) unlink($prev_css);
+
+ fwrite($fp, $ret);
+ fclose($fp);
+
+ $sql = 'UPDATE '.$object->TableName.' SET LastCompiled = '.$compile_ts.' WHERE '.$object->IDField.' = '.$object->GetID();
+ $this->Conn->Query($sql);
+ }
+ }
+}
\ No newline at end of file
Index: branches/unlabeled/unlabeled-1.2.2/core/install/english.lang
===================================================================
diff -u -r8062 -r8211
--- branches/unlabeled/unlabeled-1.2.2/core/install/english.lang (.../english.lang) (revision 8062)
+++ branches/unlabeled/unlabeled-1.2.2/core/install/english.lang (.../english.lang) (revision 8211)
@@ -96,6 +96,7 @@
VVJM
SW5oZXJpdGVk
SW5oZXJpdGVkIEZyb20=
+ UHJpbWFyeQ==
U3lzdGVt
TGFiZWw=
TGFzdCBDaGFuZ2Vk
@@ -121,6 +122,7 @@
UmV2aWV3ZWQgQnk=
UmV2aWV3IFRleHQ=
U2VsZWN0b3I=
+ TmFtZQ==
U3RhdHVz
SXRlbQ==
SXRlbSBUeXBl
@@ -162,6 +164,7 @@
Q29udGludWU=
Q3JlYXRlZCBPbg==
Q3JlZGl0cw==
+ RGF0YSBHcmlkcw==
ZGF5cw==
QXJlIHlvdSBzdXJlIHlvdSB3YW50IHRvIGRlbGV0ZSB0aGUgaXRlbShzKT8gVGhpcyBhY3Rpb24gY2Fubm90IGJlIHVuZG9uZS4=
VGhpcyBzZWN0aW9uIGFsbG93cyB0byBtYW5hZ2UgSW4tQnVsbGV0aW4gc2V0dGluZ3M=
@@ -326,6 +329,7 @@
Q29weSBMYWJlbHMgZnJvbSB0aGlzIExhbmd1YWdl
Q3JlYXRlZCBCeQ==
Q3JlYXRlZCBPbg==
+ Q1NTIFRlbXBsYXRl
Q3Vyc29y
RGF0ZSBGb3JtYXQ=
RGVjaW1hbCBQb2ludA==
@@ -381,6 +385,7 @@
TGluZSBFbmRpbmdzIEluc2lkZSBGaWVsZHM=
TG9jYWwgTmFtZQ==
TG9jYXRpb24=
+ TG9nbyBpbWFnZQ==
TWFyZ2luIEJvdHRvbQ==
TWFyZ2luIExlZnQ=
TWFyZ2luIFJpZ2h0
@@ -421,6 +426,7 @@
U3R5bGU=
U2VsZWN0b3IgSUQ=
U2VsZWN0b3IgTmFtZQ==
+ TmFtZQ==
U2tpcCBGaXJzdCBSb3c=
U3RhdHVz
U3R5bGVzaGVldCBJRA==
@@ -443,7 +449,10 @@
Rm9udCBQcm9wZXJ0aWVz
RnJvbSBEYXRl
RnJvbnQgZW5k
+ R2VuZXJhbCBTZWN0aW9ucw==
Z2lnYWJ5dGUocyk=
+ SGVhZCBmcmFtZSBjb2xvcnM8YnIvPg0KTWFpbiAvIE1haW4gQmFja2dyb3VuZCwgQmFyIC8gQmFyIEJhY2tncm91bmQg
+ SGVhZCBGcmFtZQ==
VGhpcyBoZWxwIHNlY3Rpb24gZG9lcyBub3QgeWV0IGV4aXN0LCBpdCdzIGNvbWluZyBzb29uIQ==
aHRtbA==
SUQgRmllbGQ=
@@ -977,6 +986,7 @@
U2VsZWN0aW5nIENhdGVnb3JpZXM=
RW1wdHkgc2VsZWN0aW9u
T25lIGZpZWxkIGZvciBlYWNoIGNhdGVnb3J5IGxldmVs
+ Q2xvbmU=
U2hvd2luZyBMb2dz
U2hvd2luZyBTdGF0aXN0aWNz
U2hvdyBFbWFpbCBMb2c=
@@ -1015,6 +1025,7 @@
RW1haWwgTWVzc2FnZQ==
RXhwb3J0IERhdGE=
RXhwb3J0IExhbmd1YWdlIFBhY2s=
+ RmlsZXM=
R2VuZXJhbA==
R2VuZXJhbCBTZXR0aW5ncw==
R3JvdXA=
@@ -1059,6 +1070,7 @@
U2Vzc2lvbiBMb2c=
R2VuZXJhbCBTZXR0aW5ncw==
U3RydWN0dXJlICYgRGF0YQ==
+ U2tpbnM=
U3RhdGlzdGljcw==
U3R5bGVzaGVldHM=
U3VtbWFyeQ==
@@ -1300,6 +1312,7 @@
WWVhcnM=
Wmlw
QWRkaW5nIEN1c3RvbSBGaWVsZA==
+ QWRkaW5nIFNraW4=
QWRkaW5nIEJhc2UgU3R5bGU=
QWRkaW5nIEJsb2NrIFN0eWxl
QWRkaW5nIENhdGVnb3J5
@@ -1328,6 +1341,7 @@
RG9uZQ==
RWRpdGluZyBFbWFpbCBFdmVudA==
RWRpdGluZyBHcm91cA==
+ RWRpdGluZyBTa2lu
RWRpdGluZyBTdHlsZQ==
RWRpdGluZyBUcmFuc2xhdGlvbg==
RWRpdGluZyBCYXNlIFN0eWxl
@@ -1412,6 +1426,7 @@
U3R5bGVzaGVldHM=
U3VtbWFyeQ==
Q29uZmlndXJhdGlvbg==
+ VGhlbWVz
VG9vbHM=
VXBkYXRpbmcgQ2F0ZWdvcmllcw==
VXNlcnM=
@@ -1527,6 +1542,7 @@
Vmlld3M=
VG8gRGF0ZQ==
VHJhbnNsYXRl
+ VHJlZQ==
Q2hlY2tib3hlcw==
RGF0ZQ==
RGF0ZSAmIFRpbWU=