started saimod_config rework
This commit is contained in:
parent
1c134a14dd
commit
e37a25ea20
@ -10,6 +10,7 @@ INSERT INTO `system_page` (`id`, `group`, `name`, `state`, `parent_id`, `login`,
|
|||||||
INSERT INTO `system_page` (`id`, `group`, `name`, `state`, `parent_id`, `login`, `type`, `div`, `url`, `func`, `php_class`) VALUES (20, 42, 'cache', 'cache', -1, 0, 0, '#content', './sai.php?sai_mod=.SYSTEM.SAI.saimod_sys_cache', 'init_saimod_sys_cache', '\\SYSTEM\\SAI\\saimod_sys_cache');
|
INSERT INTO `system_page` (`id`, `group`, `name`, `state`, `parent_id`, `login`, `type`, `div`, `url`, `func`, `php_class`) VALUES (20, 42, 'cache', 'cache', -1, 0, 0, '#content', './sai.php?sai_mod=.SYSTEM.SAI.saimod_sys_cache', 'init_saimod_sys_cache', '\\SYSTEM\\SAI\\saimod_sys_cache');
|
||||||
|
|
||||||
INSERT INTO `system_page` (`id`, `group`, `name`, `state`, `parent_id`, `login`, `type`, `div`, `url`, `func`, `php_class`) VALUES (30, 42, 'config', 'config', -1, 0, 0, '#content', './sai.php?sai_mod=.SYSTEM.SAI.saimod_sys_config', 'init_saimod_sys_config', '\\SYSTEM\\SAI\\saimod_sys_config');
|
INSERT INTO `system_page` (`id`, `group`, `name`, `state`, `parent_id`, `login`, `type`, `div`, `url`, `func`, `php_class`) VALUES (30, 42, 'config', 'config', -1, 0, 0, '#content', './sai.php?sai_mod=.SYSTEM.SAI.saimod_sys_config', 'init_saimod_sys_config', '\\SYSTEM\\SAI\\saimod_sys_config');
|
||||||
|
INSERT INTO `system_page` (`id`, `group`, `name`, `state`, `parent_id`, `login`, `type`, `div`, `url`, `func`, `php_class`) VALUES (31, 42, 'basics', 'config', 30, 0, 0, '#tab_config', './sai.php?sai_mod=.SYSTEM.SAI.saimod_sys_config&action=basics', 'init_saimod_sys_config_basics', '\\SYSTEM\\SAI\\saimod_sys_config');
|
||||||
|
|
||||||
INSERT INTO `system_page` (`id`, `group`, `name`, `state`, `parent_id`, `login`, `type`, `div`, `url`, `func`, `php_class`) VALUES (40, 42, 'cron', 'cron', -1, 0, 0, '#content', './sai.php?sai_mod=.SYSTEM.SAI.saimod_sys_cron', 'init_saimod_sys_cron', '\\SYSTEM\\SAI\\saimod_sys_cron');
|
INSERT INTO `system_page` (`id`, `group`, `name`, `state`, `parent_id`, `login`, `type`, `div`, `url`, `func`, `php_class`) VALUES (40, 42, 'cron', 'cron', -1, 0, 0, '#content', './sai.php?sai_mod=.SYSTEM.SAI.saimod_sys_cron', 'init_saimod_sys_cron', '\\SYSTEM\\SAI\\saimod_sys_cron');
|
||||||
|
|
||||||
|
|||||||
@ -77,7 +77,7 @@ INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `nam
|
|||||||
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (400, 42, 0, 0, '_SYSTEM_SAI_saimod_sys_mod', 'action', NULL);
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (400, 42, 0, 0, '_SYSTEM_SAI_saimod_sys_mod', 'action', NULL);
|
||||||
|
|
||||||
|
|
||||||
-- INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (500, 42, 0, 0, '_SYSTEM_SAI_saimod_sys_config', 'action', NULL);
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (500, 42, 0, 0, '_SYSTEM_SAI_saimod_sys_config', 'action', NULL);
|
||||||
|
|
||||||
|
|
||||||
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (600, 42, 0, 0, '_SYSTEM_SAI_saimod_sys_api', 'action', NULL);
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (600, 42, 0, 0, '_SYSTEM_SAI_saimod_sys_api', 'action', NULL);
|
||||||
|
|||||||
14
sai/modules/saimod_sys_config/js/saimod_sys_config.js
Normal file
14
sai/modules/saimod_sys_config/js/saimod_sys_config.js
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
var table_basics = document.getElementById('sai_mod_config_table_basics');
|
||||||
|
var sort = new Tablesort(table_basics);
|
||||||
|
function sort_table(){
|
||||||
|
console.log("testme");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
table_basics.addEventListener('beforeSort', function() {
|
||||||
|
alert('Table is about to be sorted!');
|
||||||
|
});
|
||||||
|
|
||||||
|
table_basics.addEventListener('afterSort', function() {
|
||||||
|
alert('Table sorted!');
|
||||||
|
});
|
||||||
@ -65,10 +65,44 @@ class saimod_sys_config extends \SYSTEM\SAI\SaiModule {
|
|||||||
return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_config/tpl/config.tpl'),$vars);
|
return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_config/tpl/config.tpl'),$vars);
|
||||||
}
|
}
|
||||||
//public static function html_li_menu(){return '<li><a id="menu_config" href="#!config">${sai_menu_config}</a></li>';}
|
//public static function html_li_menu(){return '<li><a id="menu_config" href="#!config">${sai_menu_config}</a></li>';}
|
||||||
|
public static function sai_mod__SYSTEM_SAI_saimod_sys_config_action_basics(){
|
||||||
|
$vars = \SYSTEM\PAGE\text::tag(\SYSTEM\DBD\system_text::TAG_SAI_CONFIG);
|
||||||
|
$vars['basics'] = $vars['database'] = $vars['sai'] = '';
|
||||||
|
$vars['basics'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_config/tpl/config_tr.tpl'),
|
||||||
|
array( 'id' =>\SYSTEM\CONFIG\config_ids::SYS_CONFIG_ERRORREPORTING,
|
||||||
|
'name' =>'\SYSTEM\CONFIG\config_ids::SYS_CONFIG_ERRORREPORTING',
|
||||||
|
'value' =>\SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_ERRORREPORTING)));
|
||||||
|
$vars['basics'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_config/tpl/config_tr.tpl'),
|
||||||
|
array( 'id' =>\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEURL,
|
||||||
|
'name' =>'\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEURL',
|
||||||
|
'value' =>\SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEURL)));
|
||||||
|
$vars['basics'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_config/tpl/config_tr.tpl'),
|
||||||
|
array( 'id' =>\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEPATH,
|
||||||
|
'name' =>'\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEPATH',
|
||||||
|
'value' =>\SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEPATH)));
|
||||||
|
$vars['basics'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_config/tpl/config_tr.tpl'),
|
||||||
|
array( 'id' =>\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_SYSTEMPATHREL,
|
||||||
|
'name' =>'\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_SYSTEMPATHREL',
|
||||||
|
'value' =>\SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_SYSTEMPATHREL)));
|
||||||
|
$vars['basics'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_config/tpl/config_tr.tpl'),
|
||||||
|
array( 'id' =>\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DEFAULT_RESULT,
|
||||||
|
'name' =>'\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DEFAULT_RESULT',
|
||||||
|
'value' =>\SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DEFAULT_RESULT)));
|
||||||
|
$vars['basics'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_config/tpl/config_tr.tpl'),
|
||||||
|
array( 'id' =>\SYSTEM\CONFIG\config_ids::SYS_CONFIG_LANGS,
|
||||||
|
'name' =>'\SYSTEM\CONFIG\config_ids::SYS_CONFIG_LANGS',
|
||||||
|
'value' =>implode(',',\SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_LANGS))));
|
||||||
|
$vars['basics'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_config/tpl/config_tr.tpl'),
|
||||||
|
array( 'id' =>\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DEFAULT_LANG,
|
||||||
|
'name' =>'\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DEFAULT_LANG',
|
||||||
|
'value' =>\SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DEFAULT_LANG)));
|
||||||
|
|
||||||
|
return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_config/tpl/config_basics.tpl'),$vars);
|
||||||
|
}
|
||||||
public static function html_li_menu(){return '<li><a id="menu_config" data-toggle="tooltip" data-placement="bottom" title="${sai_menu_config}" href="#!config"><span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span></a></li>';}
|
public static function html_li_menu(){return '<li><a id="menu_config" data-toggle="tooltip" data-placement="bottom" title="${sai_menu_config}" href="#!config"><span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span></a></li>';}
|
||||||
public static function right_public(){return false;}
|
public static function right_public(){return false;}
|
||||||
public static function right_right(){return \SYSTEM\SECURITY\Security::check(\SYSTEM\SECURITY\RIGHTS::SYS_SAI);}
|
public static function right_right(){return \SYSTEM\SECURITY\Security::check(\SYSTEM\SECURITY\RIGHTS::SYS_SAI);}
|
||||||
|
public static function js(){
|
||||||
|
return array( \SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_config/js/saimod_sys_config.js'));}
|
||||||
//public static function css(){}
|
//public static function css(){}
|
||||||
//public static function js(){}
|
|
||||||
}
|
}
|
||||||
@ -1,27 +1,29 @@
|
|||||||
<h4>${sai_config_title}</h4>
|
<h4>${sai_config_title}</h4>
|
||||||
<hr>
|
<hr>
|
||||||
<table class="table table-hover table-condensed sai_table" style="overflow: auto;">
|
<div class="tabbable">
|
||||||
<tr class="sai_not_sortable">
|
<ul class="nav nav-tabs" id="tabs_text">
|
||||||
<th onclick="sai_sort_tables(0)">Config ID</th>
|
<li><a href="#!config" id="menu_tag_all">Basics</a></li>
|
||||||
<th onclick="sai_sort_tables(1)">Config Name</th>
|
<li><a href="#!config" id="menu_tag_notag">Database</a></li>
|
||||||
<th onclick="sai_sort_tables(2)">Value</th>
|
<li><a href="#!config" id="menu_tag_notag">System Admin Interface</a></li>
|
||||||
|
</ul>
|
||||||
|
<div class="tab-content sai_margin_top_10" id="tab_config"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!--table class="table table-hover table-condensed sai_table" style="overflow: auto;">
|
||||||
|
<tr>
|
||||||
|
<th onclick="sort_table()">Config ID</th>
|
||||||
|
<th>Config Name</th>
|
||||||
|
<th>Value</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="sai_not_sortable">
|
|
||||||
<th>Basics</th>
|
|
||||||
<th></th>
|
|
||||||
<th></th>
|
|
||||||
</tr>
|
|
||||||
${basics}
|
|
||||||
<tr class="sai_not_sortable">
|
|
||||||
<th>Database</th>
|
|
||||||
<th></th>
|
|
||||||
<th></th>
|
|
||||||
</tr>
|
|
||||||
${database}
|
|
||||||
<tr class="sai_not_sortable">
|
|
||||||
<th>System Admin Interface</th>
|
|
||||||
<th></th>
|
|
||||||
<th></th>
|
|
||||||
</tr>
|
|
||||||
${sai}
|
|
||||||
</table>
|
</table>
|
||||||
|
<table id="sai_mod_config_table_basics" class="table table-hover table-condensed sai_table" style="overflow: auto;">
|
||||||
|
${basics}
|
||||||
|
</table>
|
||||||
|
<label>Database</label>
|
||||||
|
<table id="sai_mod_config_table_database" class="table table-hover table-condensed sai_table" style="overflow: auto;">
|
||||||
|
${database}
|
||||||
|
</table>
|
||||||
|
<label>System Admin Interface</label>
|
||||||
|
<table id="sai_mod_config_table_sai" class="table table-hover table-condensed sai_table" style="overflow: auto;">
|
||||||
|
${sai}
|
||||||
|
</table-->
|
||||||
1
sai/modules/saimod_sys_config/tpl/config_basics.tpl
Normal file
1
sai/modules/saimod_sys_config/tpl/config_basics.tpl
Normal file
@ -0,0 +1 @@
|
|||||||
|
${basics}
|
||||||
Loading…
x
Reference in New Issue
Block a user