diff --git a/sai/modules/saimod_sys_cache/js/saimod_sys_cache.js b/sai/modules/saimod_sys_cache/js/saimod_sys_cache.js new file mode 100644 index 0000000..e89f8a3 --- /dev/null +++ b/sai/modules/saimod_sys_cache/js/saimod_sys_cache.js @@ -0,0 +1,11 @@ +function init_saimod_sys_cache(){ + $('#btn_cache_clear').click(function() { + $.ajax({ url: './sai.php', + data: { sai_mod: '.SYSTEM.SAI.saimod_sys_cache', + action: 'clear'}, + type: 'GET', + success: function(data) { + system.load('cache',true);} + }); + }); +} \ No newline at end of file diff --git a/sai/modules/saimod_sys_cache/qq/SYS_SAIMOD_CACHE_CLEAR.php b/sai/modules/saimod_sys_cache/qq/SYS_SAIMOD_CACHE_CLEAR.php new file mode 100644 index 0000000..ee374ac --- /dev/null +++ b/sai/modules/saimod_sys_cache/qq/SYS_SAIMOD_CACHE_CLEAR.php @@ -0,0 +1,11 @@ +next()){ $r['class'] = self::tablerow_class($r['cache']); $vars['entries'] .= \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_cache/tpl/saimod_sys_cache_entry.tpl'))->SERVERPATH(), $r);} + $vars = array_merge($vars, \SYSTEM\PAGE\text::tag(\SYSTEM\SQL\system_text::TAG_SAI_CACHE)); return \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_cache/tpl/saimod_sys_cache.tpl'))->SERVERPATH(), $vars); } + public static function sai_mod__SYSTEM_SAI_saimod_sys_cache_action_clear(){ + return \SYSTEM\SQL\SYS_SAIMOD_CACHE_CLEAR::QI() ? \SYSTEM\LOG\JsonResult::ok() : \SYSTEM\LOG\JsonResult::fail();} + private static function tablerow_class($cacheID){ if($cacheID == 1){ return 'info';} @@ -22,5 +26,6 @@ class saimod_sys_cache extends \SYSTEM\SAI\SaiModule { public static function right_right(){return \SYSTEM\SECURITY\Security::check(\SYSTEM\SECURITY\RIGHTS::SYS_SAI);} //public static function css(){} - //public static function js(){} + public static function js(){ + return array(new \SYSTEM\PSAI('modules/saimod_sys_cache/js/saimod_sys_cache.js'));} } \ No newline at end of file diff --git a/sai/modules/saimod_sys_cache/tpl/saimod_sys_cache.tpl b/sai/modules/saimod_sys_cache/tpl/saimod_sys_cache.tpl index 87d2be3..59b4141 100644 --- a/sai/modules/saimod_sys_cache/tpl/saimod_sys_cache.tpl +++ b/sai/modules/saimod_sys_cache/tpl/saimod_sys_cache.tpl @@ -1,5 +1,6 @@
| Cache | diff --git a/sql/qt/mysql/data/system_sai_api.sql b/sql/qt/mysql/data/system_sai_api.sql index 1b3c56a..9636586 100644 --- a/sql/qt/mysql/data/system_sai_api.sql +++ b/sql/qt/mysql/data/system_sai_api.sql @@ -141,7 +141,7 @@ INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `nam INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (830, 42, 3, 800, 'tab', 'name', 'STRING'); --- INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (900, 42, 0, 0, '_SYSTEM_SAI_saimod_sys_cache', 'action', NULL); +INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (900, 42, 0, 0, '_SYSTEM_SAI_saimod_sys_cache', 'action', NULL); INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (1000, 42, 0, 0, '_SYSTEM_SAI_saimod_sys_todo', 'action', NULL); diff --git a/sql/qt/mysql/data/system_text.sql b/sql/qt/mysql/data/system_text.sql index de998ac..9c33d10 100644 --- a/sql/qt/mysql/data/system_text.sql +++ b/sql/qt/mysql/data/system_text.sql @@ -635,6 +635,13 @@ INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_add_right', 'basic'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_add_right', 'sai_security'); + DELETE FROM `system_text` WHERE id = 'basic_clear'; + DELETE FROM `system_text_tag` WHERE id = 'basic_clear'; + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('basic_clear', 'deDE', 'Leeren', 1, 1, '2015-04-16 23:11:18', '2015-04-16 16:48:36'); + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('basic_clear', 'enUS', 'Clear', 2, 1, '2015-04-16 23:11:18', '2015-04-16 23:11:18'); + INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_clear', 'basic'); + INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_clear', 'sai_cache'); + -- SAI DELETE FROM `system_text` WHERE id = 'sai_api_title'; DELETE FROM `system_text_tag` WHERE id = 'sai_api_title';
|---|