From c2050aa67ee1ba5ad9d904c0a1d2d09cf75a8aad Mon Sep 17 00:00:00 2001 From: rylon Date: Wed, 10 Jun 2015 02:21:11 +0200 Subject: [PATCH 01/24] saimod todo filter & search functionality --- dbd/sql/mysql/data/system_page.sql | 5 +- dbd/sql/mysql/data/system_sai_api.sql | 4 ++ dbd/sql/mysql/data/system_text.sql | 51 +++++++++++++++ dbd/tbl/system_todo.php | 1 + .../saimod_sys_todo/js/saimod_sys_todo.js | 9 ++- .../qq/SYS_SAIMOD_TODO_LIST.php | 1 + .../qq/SYS_SAIMOD_TODO_LIST_FREE.php | 28 ++++++++ .../qq/SYS_SAIMOD_TODO_LIST_MINE.php | 28 ++++++++ .../qq/SYS_SAIMOD_TODO_LIST_OTHERS.php | 28 ++++++++ .../qq/SYS_SAIMOD_TODO_LIST_TYPE.php | 29 +++++++++ .../saimod_sys_todo/saimod_sys_todo.php | 64 +++++++++++++------ sai/modules/saimod_sys_todo/tpl/todo_list.tpl | 28 ++++---- 12 files changed, 238 insertions(+), 38 deletions(-) create mode 100644 sai/modules/saimod_sys_todo/qq/SYS_SAIMOD_TODO_LIST_FREE.php create mode 100644 sai/modules/saimod_sys_todo/qq/SYS_SAIMOD_TODO_LIST_MINE.php create mode 100644 sai/modules/saimod_sys_todo/qq/SYS_SAIMOD_TODO_LIST_OTHERS.php create mode 100644 sai/modules/saimod_sys_todo/qq/SYS_SAIMOD_TODO_LIST_TYPE.php diff --git a/dbd/sql/mysql/data/system_page.sql b/dbd/sql/mysql/data/system_page.sql index 99cc4b6..8ddc4ba 100644 --- a/dbd/sql/mysql/data/system_page.sql +++ b/dbd/sql/mysql/data/system_page.sql @@ -49,8 +49,9 @@ 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 (116, 42, 'editor', 'text', 115, 0, 1, '#tab_editor', './sai.php?sai_mod=.SYSTEM.SAI.saimod_sys_text&action=editor&id=${id}&lang=${lang}', 'init_saimod_sys_text_editor', '\\SYSTEM\\SAI\\saimod_sys_text'); INSERT INTO `system_page` (`id`, `group`, `name`, `state`, `parent_id`, `login`, `type`, `div`, `url`, `func`, `php_class`) VALUES (120, 42, 'todo', 'todo', -1, 0, 0, '#content', './sai.php?sai_mod=.SYSTEM.SAI.saimod_sys_todo', 'init_saimod_sys_todo', '\\SYSTEM\\SAI\\saimod_sys_todo'); -INSERT INTO `system_page` (`id`, `group`, `name`, `state`, `parent_id`, `login`, `type`, `div`, `url`, `func`, `php_class`) VALUES (121, 42, 'todolist', 'todo', 120, 0, 0, '#tab_todo', './sai.php?sai_mod=.SYSTEM.SAI.saimod_sys_todo&action=todolist', 'init_saimod_sys_todo_todo', '\\SYSTEM\\SAI\\saimod_sys_todo'); -INSERT INTO `system_page` (`id`, `group`, `name`, `state`, `parent_id`, `login`, `type`, `div`, `url`, `func`, `php_class`) VALUES (122, 42, 'doto', 'todo', 120, 0, 1, '#tab_todo', './sai.php?sai_mod=.SYSTEM.SAI.saimod_sys_todo&action=dotolist', 'init_saimod_sys_todo_doto', '\\SYSTEM\\SAI\\saimod_sys_todo'); +INSERT INTO `system_page` (`id`, `group`, `name`, `state`, `parent_id`, `login`, `type`, `div`, `url`, `func`, `php_class`) VALUES (121, 42, 'todolist', 'todo', 120, 0, 0, '#tab_todo', './sai.php?sai_mod=.SYSTEM.SAI.saimod_sys_todo&action=todolist&filter=${filter}&search=${search}', 'init_saimod_sys_todo_todo', '\\SYSTEM\\SAI\\saimod_sys_todo'); +INSERT INTO `system_page` (`id`, `group`, `name`, `state`, `parent_id`, `login`, `type`, `div`, `url`, `func`, `php_class`) VALUES (122, 42, 'doto', 'todo', 120, 0, 1, '#tab_todo', './sai.php?sai_mod=.SYSTEM.SAI.saimod_sys_todo&action=dotolist&filter=${filter}&search=${search}', 'init_saimod_sys_todo_doto', '\\SYSTEM\\SAI\\saimod_sys_todo'); + INSERT INTO `system_page` (`id`, `group`, `name`, `state`, `parent_id`, `login`, `type`, `div`, `url`, `func`, `php_class`) VALUES (123, 42, 'stats', 'todo', 120, 0, 1, '#tab_todo', './sai.php?sai_mod=.SYSTEM.SAI.saimod_sys_todo&action=stats', 'init_saimod_sys_todo_stats', '\\SYSTEM\\SAI\\saimod_sys_todo'); INSERT INTO `system_page` (`id`, `group`, `name`, `state`, `parent_id`, `login`, `type`, `div`, `url`, `func`, `php_class`) VALUES (124, 42, 'todoopen', 'todo', 120, 0, 1, '#tab_todo', './sai.php?sai_mod=.SYSTEM.SAI.saimod_sys_todo&action=todo&todo=${todo}', 'init_saimod_sys_todo_todoopen', '\\SYSTEM\\SAI\\saimod_sys_todo'); INSERT INTO `system_page` (`id`, `group`, `name`, `state`, `parent_id`, `login`, `type`, `div`, `url`, `func`, `php_class`) VALUES (125, 42, 'todoclose', 'todo', 120, 0, 1, '#tab_todo', './sai.php?sai_mod=.SYSTEM.SAI.saimod_sys_todo&action=todo&todo=${todo}', 'init_saimod_sys_todo_todoclose', '\\SYSTEM\\SAI\\saimod_sys_todo'); diff --git a/dbd/sql/mysql/data/system_sai_api.sql b/dbd/sql/mysql/data/system_sai_api.sql index f64bcaf..2da61e4 100644 --- a/dbd/sql/mysql/data/system_sai_api.sql +++ b/dbd/sql/mysql/data/system_sai_api.sql @@ -144,6 +144,10 @@ INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `nam INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (1011, 42, 2, 1000, 'edit', 'message', 'STRING'); INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (1015, 42, 2, 1000, 'priority_up', 'todo', 'INT'); INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (1016, 42, 2, 1000, 'priority_down', 'todo', 'INT'); +INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (1020, 42, 3, 1000, 'todolist', 'filter', 'STRING'); +INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (1021, 42, 3, 1000, 'todolist', 'search', 'STRING'); +INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (1025, 42, 3, 1000, 'dotolist', 'filter', 'STRING'); +INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (1026, 42, 3, 1000, 'dotolist', 'search', 'STRING'); INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (1100, 42, 0, 0, '_SYSTEM_SAI_saimod_sys_docu', 'action', NULL); diff --git a/dbd/sql/mysql/data/system_text.sql b/dbd/sql/mysql/data/system_text.sql index 0074438..06a83d6 100644 --- a/dbd/sql/mysql/data/system_text.sql +++ b/dbd/sql/mysql/data/system_text.sql @@ -26,6 +26,7 @@ INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('basic_all', 'frFR', 'Tous', 3, 3, '2015-04-20 16:31:55', '2015-04-20 16:31:55'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_all', 'basic'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_all', 'sai_log'); + INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_all', 'sai_todo'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_all', 'sai_text'); DELETE FROM `system_text` WHERE id = 'basic_analytics'; @@ -259,6 +260,13 @@ INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('basic_placeholder_username', 'jaJA', 'peter / peter@world.org', 0, 0, '2015-04-15 18:41:22', '0000-00-00 00:00:00'); INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('basic_placeholder_username', 'trTR', 'peter@world.org', 0, 0, '2015-04-15 18:29:17', '0000-00-00 00:00:00'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_placeholder_username', 'basic'); + + DELETE FROM `system_text` WHERE id = 'basic_placeholder_search'; + DELETE FROM `system_text_tag` WHERE id = 'basic_placeholder_search'; + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('basic_placeholder_search', 'deDE', 'Ich suche nach...', 0, 0, '2015-04-15 18:29:16', '0000-00-00 00:00:00'); + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('basic_placeholder_search', 'enUS', 'I\'m searching for...', 0, 0, '2015-04-15 18:29:16', '0000-00-00 00:00:00'); + INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_placeholder_search', 'basic'); + INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_placeholder_search', 'sai_todo'); DELETE FROM `system_text` WHERE id = 'basic_progress'; DELETE FROM `system_text_tag` WHERE id = 'basic_progress'; @@ -454,6 +462,7 @@ INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('basic_search', 'enUS', 'Search', 2, 1, '2015-04-16 23:11:18', '2015-04-16 23:11:18'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_search', 'basic'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_search', 'sai_security'); + INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_search', 'sai_todo'); DELETE FROM `system_text` WHERE id = 'basic_send_email'; DELETE FROM `system_text_tag` WHERE id = 'basic_send_email'; @@ -533,6 +542,48 @@ INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('basic_deassign', 'enUS', 'I don\'t Do that', 2, 1, '2015-04-16 23:11:18', '2015-04-16 23:11:18'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_deassign', 'basic'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_deassign', 'sai_todo'); + + DELETE FROM `system_text` WHERE id = 'basic_mine'; + DELETE FROM `system_text_tag` WHERE id = 'basic_mine'; + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('basic_mine', 'deDE', 'Meine', 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_mein', 'enUS', 'Mine', 2, 1, '2015-04-16 23:11:18', '2015-04-16 23:11:18'); + INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_mine', 'basic'); + INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_mine', 'sai_todo'); + + DELETE FROM `system_text` WHERE id = 'basic_free'; + DELETE FROM `system_text_tag` WHERE id = 'basic_free'; + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('basic_free', 'deDE', 'Frei', 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_free', 'enUS', 'Free', 2, 1, '2015-04-16 23:11:18', '2015-04-16 23:11:18'); + INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_free', 'basic'); + INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_free', 'sai_todo'); + + DELETE FROM `system_text` WHERE id = 'basic_others'; + DELETE FROM `system_text_tag` WHERE id = 'basic_others'; + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('basic_others', 'deDE', 'Andere', 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_others', 'enUS', 'Others', 2, 1, '2015-04-16 23:11:18', '2015-04-16 23:11:18'); + INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_others', 'basic'); + INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_others', 'sai_todo'); + + DELETE FROM `system_text` WHERE id = 'basic_generated'; + DELETE FROM `system_text_tag` WHERE id = 'basic_generated'; + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('basic_generated', 'deDE', 'Generiert', 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_generated', 'enUS', 'Generated', 2, 1, '2015-04-16 23:11:18', '2015-04-16 23:11:18'); + INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_generated', 'basic'); + INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_generated', 'sai_todo'); + + DELETE FROM `system_text` WHERE id = 'basic_user'; + DELETE FROM `system_text_tag` WHERE id = 'basic_user'; + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('basic_user', 'deDE', 'Nutzer', 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_user', 'enUS', 'User', 2, 1, '2015-04-16 23:11:18', '2015-04-16 23:11:18'); + INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_user', 'basic'); + INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_user', 'sai_todo'); + + DELETE FROM `system_text` WHERE id = 'basic_report'; + DELETE FROM `system_text_tag` WHERE id = 'basic_report'; + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('basic_report', 'deDE', 'Report', 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_report', 'enUS', 'Report', 2, 1, '2015-04-16 23:11:18', '2015-04-16 23:11:18'); + INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_report', 'basic'); + INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_report', 'sai_todo'); -- SAI DELETE FROM `system_text` WHERE id = 'sai_api_title'; diff --git a/dbd/tbl/system_todo.php b/dbd/tbl/system_todo.php index 5b24c8a..839cccf 100644 --- a/dbd/tbl/system_todo.php +++ b/dbd/tbl/system_todo.php @@ -29,6 +29,7 @@ class system_todo { const FIELD_TYPE = 'type'; const FIELD_TYPE_EXCEPTION = 0; const FIELD_TYPE_USER = 1; + const FIELD_TYPE_REPORT = 2; const FIELD_STATE = 'state'; const FIELD_STATE_OPEN = 0; const FIELD_STATE_CLOSED = 1; diff --git a/sai/modules/saimod_sys_todo/js/saimod_sys_todo.js b/sai/modules/saimod_sys_todo/js/saimod_sys_todo.js index 218861f..33d6472 100644 --- a/sai/modules/saimod_sys_todo/js/saimod_sys_todo.js +++ b/sai/modules/saimod_sys_todo/js/saimod_sys_todo.js @@ -20,17 +20,24 @@ function init_saimod_sys_todo() { }) }; +function register_search(){ + $('#btn_search').click(function(){ + system.load($(this).attr('state')+$('#input_search').val(),true); + }); +} + function init_saimod_sys_todo_todo() { $('#tabs_todo li').each(function(){ $(this).removeClass('active');}); $('#menu_todolist').parent().addClass('active'); - init_tinymce(); + register_search(); } function init_saimod_sys_todo_doto() { $('#tabs_todo li').each(function(){ $(this).removeClass('active');}); $('#menu_doto').parent().addClass('active'); + register_search(); } function init_saimod_sys_todo_stats() { diff --git a/sai/modules/saimod_sys_todo/qq/SYS_SAIMOD_TODO_LIST.php b/sai/modules/saimod_sys_todo/qq/SYS_SAIMOD_TODO_LIST.php index a449a28..e883d42 100644 --- a/sai/modules/saimod_sys_todo/qq/SYS_SAIMOD_TODO_LIST.php +++ b/sai/modules/saimod_sys_todo/qq/SYS_SAIMOD_TODO_LIST.php @@ -19,6 +19,7 @@ class SYS_SAIMOD_TODO_LIST extends \SYSTEM\DB\QP { ' LEFT JOIN '.\SYSTEM\DBD\system_user::NAME_MYS.' as creator ON todo.'.\SYSTEM\DBD\system_todo::FIELD_USER.'=creator.'.\SYSTEM\DBD\system_user::FIELD_ID. ' LEFT JOIN '.\SYSTEM\DBD\system_user::NAME_MYS.' as assignee ON assign.'.\SYSTEM\DBD\system_todo_assign::FIELD_USER.'=assignee.'.\SYSTEM\DBD\system_user::FIELD_ID. ' WHERE todo.'.\SYSTEM\DBD\system_todo::FIELD_STATE.' = ?'. + ' AND (todo.'.\SYSTEM\DBD\system_todo::FIELD_MESSAGE.' LIKE ? OR creator.'.\SYSTEM\DBD\system_user::FIELD_USERNAME.' LIKE ? OR assignee.'.\SYSTEM\DBD\system_user::FIELD_USERNAME.' LIKE ?)'. ' ORDER BY case when assign.'.\SYSTEM\DBD\system_todo_assign::FIELD_USER.' = ? then 1 else 2 end'. ' LIMIT 100'. ') as a'. diff --git a/sai/modules/saimod_sys_todo/qq/SYS_SAIMOD_TODO_LIST_FREE.php b/sai/modules/saimod_sys_todo/qq/SYS_SAIMOD_TODO_LIST_FREE.php new file mode 100644 index 0000000..389b42b --- /dev/null +++ b/sai/modules/saimod_sys_todo/qq/SYS_SAIMOD_TODO_LIST_FREE.php @@ -0,0 +1,28 @@ +id; - $res = \SYSTEM\DBD\SYS_SAIMOD_TODO_LIST::QQ(array($state,$userid)); + switch($filter){ + case 'mine': + $res = \SYSTEM\DBD\SYS_SAIMOD_TODO_LIST_MINE::QQ(array($state,$userid,$search,$search,$search)); + $vars['filter_mine'] = 'active'; + break; + case 'free': + $res = \SYSTEM\DBD\SYS_SAIMOD_TODO_LIST_FREE::QQ(array($state,$search,$search,$search)); + $vars['filter_free'] = 'active'; + break; + case 'others': + $res = \SYSTEM\DBD\SYS_SAIMOD_TODO_LIST_OTHERS::QQ(array($state,$userid,$search,$search,$search)); + $vars['filter_others'] = 'active'; + break; + case 'gen': + $res = \SYSTEM\DBD\SYS_SAIMOD_TODO_LIST_TYPE::QQ(array($state,\SYSTEM\DBD\system_todo::FIELD_TYPE_EXCEPTION,$search,$search,$search,$userid)); + $vars['filter_gen'] = 'active'; + break; + case 'user': + $res = \SYSTEM\DBD\SYS_SAIMOD_TODO_LIST_TYPE::QQ(array($state,\SYSTEM\DBD\system_todo::FIELD_TYPE_USER,$search,$search,$search,$userid)); + $vars['filter_user'] = 'active'; + break; + case 'report': + $res = \SYSTEM\DBD\SYS_SAIMOD_TODO_LIST_TYPE::QQ(array($state,\SYSTEM\DBD\system_todo::FIELD_TYPE_REPORT,$search,$search,$search,$userid)); + $vars['filter_report'] = 'active'; + break; + default: + $res = \SYSTEM\DBD\SYS_SAIMOD_TODO_LIST::QQ(array($state,$search,$search,$search,$userid)); + $vars['filter_all'] = 'active'; + break; + } while($row = $res->next()){ $row['class_row'] = self::trclass($row['type'],$row['class'],$row['assignee_id'],$userid); $row['time_elapsed'] = \SYSTEM\time::time_ago_string(strtotime($row['time'])); @@ -67,18 +102,11 @@ class saimod_sys_todo extends \SYSTEM\SAI\SaiModule { $row['message'] = $row['message']; $row['request_uri'] = htmlspecialchars($row['request_uri']); $row['openclose'] = $state == \SYSTEM\DBD\system_todo::FIELD_STATE_OPEN ? 'close' : 'open'; - if($row['type'] == \SYSTEM\DBD\system_todo::FIELD_TYPE_USER){ - $row['message'] = str_replace("\n", '
', $row['message']); - $result_user .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_todo/tpl/todo_user_list_element.tpl'), $row); - } else { - $result .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_todo/tpl/todo_list_element.tpl'), $row); - } + $row['message'] = str_replace("\n", '
', $row['message']); + $vars['todo_list_elements'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_todo/tpl/todo_user_list_element.tpl'), $row); } - $count = \SYSTEM\DBD\SYS_SAIMOD_TODO_COUNT::Q1(array($state))['count']; - $vars = array(); - $vars['todo_user_list_elements'] = $result_user; - $vars['todo_list_elements'] = $result; - $vars['count'] = $count; + $vars['count'] = \SYSTEM\DBD\SYS_SAIMOD_TODO_COUNT::Q1(array($state))['count']; + $vars['state'] = $state == \SYSTEM\DBD\system_todo::FIELD_STATE_OPEN ? 'todo' : 'todo(doto)'; $vars = array_merge($vars, \SYSTEM\PAGE\text::tag(\SYSTEM\DBD\system_text::TAG_SAI_TODO)); return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_todo/tpl/todo_list.tpl'), $vars); } diff --git a/sai/modules/saimod_sys_todo/tpl/todo_list.tpl b/sai/modules/saimod_sys_todo/tpl/todo_list.tpl index c368fbd..471a30f 100644 --- a/sai/modules/saimod_sys_todo/tpl/todo_list.tpl +++ b/sai/modules/saimod_sys_todo/tpl/todo_list.tpl @@ -1,4 +1,15 @@
+ Rows: ${count}
User ToDo's
@@ -8,23 +19,6 @@ - ${todo_user_list_elements} -
${table_author} ${table_assignee}
-
-
Generated ToDo's
- - - - - - - - - - - - - ${todo_list_elements}
${time_ago}${table_class}${table_message}${table_file}${table_line}${table_ip}${table_url}${table_user}${table_querytime}${table_count}
\ No newline at end of file From 509cfcdfba020a8ba6e2df9343c4faae80f86eee Mon Sep 17 00:00:00 2001 From: rylon Date: Wed, 10 Jun 2015 02:36:55 +0200 Subject: [PATCH 02/24] saimod todo actual shown rows amount is displayed --- sai/modules/saimod_sys_todo/saimod_sys_todo.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sai/modules/saimod_sys_todo/saimod_sys_todo.php b/sai/modules/saimod_sys_todo/saimod_sys_todo.php index d01901c..d18c368 100644 --- a/sai/modules/saimod_sys_todo/saimod_sys_todo.php +++ b/sai/modules/saimod_sys_todo/saimod_sys_todo.php @@ -94,6 +94,7 @@ class saimod_sys_todo extends \SYSTEM\SAI\SaiModule { $vars['filter_all'] = 'active'; break; } + $count_filtered = 0; while($row = $res->next()){ $row['class_row'] = self::trclass($row['type'],$row['class'],$row['assignee_id'],$userid); $row['time_elapsed'] = \SYSTEM\time::time_ago_string(strtotime($row['time'])); @@ -104,8 +105,9 @@ class saimod_sys_todo extends \SYSTEM\SAI\SaiModule { $row['openclose'] = $state == \SYSTEM\DBD\system_todo::FIELD_STATE_OPEN ? 'close' : 'open'; $row['message'] = str_replace("\n", '
', $row['message']); $vars['todo_list_elements'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_todo/tpl/todo_user_list_element.tpl'), $row); + $count_filtered++; } - $vars['count'] = \SYSTEM\DBD\SYS_SAIMOD_TODO_COUNT::Q1(array($state))['count']; + $vars['count'] = $count_filtered.'/'.\SYSTEM\DBD\SYS_SAIMOD_TODO_COUNT::Q1(array($state))['count']; $vars['state'] = $state == \SYSTEM\DBD\system_todo::FIELD_STATE_OPEN ? 'todo' : 'todo(doto)'; $vars = array_merge($vars, \SYSTEM\PAGE\text::tag(\SYSTEM\DBD\system_text::TAG_SAI_TODO)); return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_todo/tpl/todo_list.tpl'), $vars); From 277fd881052708a2fd056efec15c9ed8d27ba6a4 Mon Sep 17 00:00:00 2001 From: rylon Date: Wed, 10 Jun 2015 17:52:23 +0200 Subject: [PATCH 03/24] fixed todo total count --- .../qq/SYS_SAIMOD_TODO_COUNT_FREE.php | 18 ++++++++++++++++ .../qq/SYS_SAIMOD_TODO_COUNT_MINE.php | 18 ++++++++++++++++ .../qq/SYS_SAIMOD_TODO_COUNT_OTHERS.php | 21 +++++++++++++++++++ .../qq/SYS_SAIMOD_TODO_COUNT_TYPE.php | 21 +++++++++++++++++++ .../saimod_sys_todo/saimod_sys_todo.php | 9 +++++++- 5 files changed, 86 insertions(+), 1 deletion(-) create mode 100644 sai/modules/saimod_sys_todo/qq/SYS_SAIMOD_TODO_COUNT_FREE.php create mode 100644 sai/modules/saimod_sys_todo/qq/SYS_SAIMOD_TODO_COUNT_MINE.php create mode 100644 sai/modules/saimod_sys_todo/qq/SYS_SAIMOD_TODO_COUNT_OTHERS.php create mode 100644 sai/modules/saimod_sys_todo/qq/SYS_SAIMOD_TODO_COUNT_TYPE.php diff --git a/sai/modules/saimod_sys_todo/qq/SYS_SAIMOD_TODO_COUNT_FREE.php b/sai/modules/saimod_sys_todo/qq/SYS_SAIMOD_TODO_COUNT_FREE.php new file mode 100644 index 0000000..8064264 --- /dev/null +++ b/sai/modules/saimod_sys_todo/qq/SYS_SAIMOD_TODO_COUNT_FREE.php @@ -0,0 +1,18 @@ +id; switch($filter){ case 'mine': + $count = \SYSTEM\DBD\SYS_SAIMOD_TODO_COUNT_MINE::Q1(array($state,$userid,$search,$search,$search))['count']; $res = \SYSTEM\DBD\SYS_SAIMOD_TODO_LIST_MINE::QQ(array($state,$userid,$search,$search,$search)); $vars['filter_mine'] = 'active'; break; case 'free': + $count = \SYSTEM\DBD\SYS_SAIMOD_TODO_COUNT_FREE::Q1(array($state,$search,$search,$search))['count']; $res = \SYSTEM\DBD\SYS_SAIMOD_TODO_LIST_FREE::QQ(array($state,$search,$search,$search)); $vars['filter_free'] = 'active'; break; case 'others': + $count = \SYSTEM\DBD\SYS_SAIMOD_TODO_COUNT_OTHERS::Q1(array($state,$userid,$search,$search,$search))['count']; $res = \SYSTEM\DBD\SYS_SAIMOD_TODO_LIST_OTHERS::QQ(array($state,$userid,$search,$search,$search)); $vars['filter_others'] = 'active'; break; case 'gen': + $count = \SYSTEM\DBD\SYS_SAIMOD_TODO_COUNT_TYPE::Q1(array($state,\SYSTEM\DBD\system_todo::FIELD_TYPE_EXCEPTION,$search,$search,$search))['count']; $res = \SYSTEM\DBD\SYS_SAIMOD_TODO_LIST_TYPE::QQ(array($state,\SYSTEM\DBD\system_todo::FIELD_TYPE_EXCEPTION,$search,$search,$search,$userid)); $vars['filter_gen'] = 'active'; break; case 'user': + $count = \SYSTEM\DBD\SYS_SAIMOD_TODO_COUNT_TYPE::Q1(array($state,\SYSTEM\DBD\system_todo::FIELD_TYPE_USER,$search,$search,$search))['count']; $res = \SYSTEM\DBD\SYS_SAIMOD_TODO_LIST_TYPE::QQ(array($state,\SYSTEM\DBD\system_todo::FIELD_TYPE_USER,$search,$search,$search,$userid)); $vars['filter_user'] = 'active'; break; case 'report': + $count = \SYSTEM\DBD\SYS_SAIMOD_TODO_COUNT_TYPE::Q1(array($state,\SYSTEM\DBD\system_todo::FIELD_TYPE_REPORT,$search,$search,$search))['count']; $res = \SYSTEM\DBD\SYS_SAIMOD_TODO_LIST_TYPE::QQ(array($state,\SYSTEM\DBD\system_todo::FIELD_TYPE_REPORT,$search,$search,$search,$userid)); $vars['filter_report'] = 'active'; break; default: + $count = \SYSTEM\DBD\SYS_SAIMOD_TODO_COUNT::Q1(array($state))['count']; $res = \SYSTEM\DBD\SYS_SAIMOD_TODO_LIST::QQ(array($state,$search,$search,$search,$userid)); $vars['filter_all'] = 'active'; break; @@ -107,7 +114,7 @@ class saimod_sys_todo extends \SYSTEM\SAI\SaiModule { $vars['todo_list_elements'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_todo/tpl/todo_user_list_element.tpl'), $row); $count_filtered++; } - $vars['count'] = $count_filtered.'/'.\SYSTEM\DBD\SYS_SAIMOD_TODO_COUNT::Q1(array($state))['count']; + $vars['count'] = $count_filtered.'/'.$count; $vars['state'] = $state == \SYSTEM\DBD\system_todo::FIELD_STATE_OPEN ? 'todo' : 'todo(doto)'; $vars = array_merge($vars, \SYSTEM\PAGE\text::tag(\SYSTEM\DBD\system_text::TAG_SAI_TODO)); return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_todo/tpl/todo_list.tpl'), $vars); From 073e9c253816b03decbc4bcd7d780f6a99f0d56f Mon Sep 17 00:00:00 2001 From: rylon Date: Wed, 10 Jun 2015 18:30:11 +0200 Subject: [PATCH 04/24] saimod todo pagination --- db/result/ResultMysqliPrepare.php | 1 + dbd/sql/mysql/data/system_page.sql | 4 ++-- dbd/sql/mysql/data/system_sai_api.sql | 2 ++ .../saimod_sys_todo/js/saimod_sys_todo.js | 2 +- .../qq/SYS_SAIMOD_TODO_LIST.php | 1 - .../qq/SYS_SAIMOD_TODO_LIST_FREE.php | 1 - .../qq/SYS_SAIMOD_TODO_LIST_MINE.php | 1 - .../qq/SYS_SAIMOD_TODO_LIST_OTHERS.php | 1 - .../qq/SYS_SAIMOD_TODO_LIST_TYPE.php | 1 - .../saimod_sys_todo/saimod_sys_todo.php | 21 ++++++++++++------- sai/modules/saimod_sys_todo/tpl/todo_list.tpl | 21 +++++++++++-------- .../tpl/todo_list_pagination.tpl | 1 + 12 files changed, 33 insertions(+), 24 deletions(-) create mode 100644 sai/modules/saimod_sys_todo/tpl/todo_list_pagination.tpl diff --git a/db/result/ResultMysqliPrepare.php b/db/result/ResultMysqliPrepare.php index 7d5dcd4..9ee20f6 100644 --- a/db/result/ResultMysqliPrepare.php +++ b/db/result/ResultMysqliPrepare.php @@ -27,6 +27,7 @@ class ResultMysqliPrepare extends \SYSTEM\DB\Result{ \mysqli_free_result($this->meta); call_user_func_array(array($this->res, 'bind_result'), $this->binds); //you need 2 append the parameters - thats the right way to do that. + $this->res->store_result(); } public function __destruct() { diff --git a/dbd/sql/mysql/data/system_page.sql b/dbd/sql/mysql/data/system_page.sql index 8ddc4ba..2b1c377 100644 --- a/dbd/sql/mysql/data/system_page.sql +++ b/dbd/sql/mysql/data/system_page.sql @@ -49,8 +49,8 @@ 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 (116, 42, 'editor', 'text', 115, 0, 1, '#tab_editor', './sai.php?sai_mod=.SYSTEM.SAI.saimod_sys_text&action=editor&id=${id}&lang=${lang}', 'init_saimod_sys_text_editor', '\\SYSTEM\\SAI\\saimod_sys_text'); INSERT INTO `system_page` (`id`, `group`, `name`, `state`, `parent_id`, `login`, `type`, `div`, `url`, `func`, `php_class`) VALUES (120, 42, 'todo', 'todo', -1, 0, 0, '#content', './sai.php?sai_mod=.SYSTEM.SAI.saimod_sys_todo', 'init_saimod_sys_todo', '\\SYSTEM\\SAI\\saimod_sys_todo'); -INSERT INTO `system_page` (`id`, `group`, `name`, `state`, `parent_id`, `login`, `type`, `div`, `url`, `func`, `php_class`) VALUES (121, 42, 'todolist', 'todo', 120, 0, 0, '#tab_todo', './sai.php?sai_mod=.SYSTEM.SAI.saimod_sys_todo&action=todolist&filter=${filter}&search=${search}', 'init_saimod_sys_todo_todo', '\\SYSTEM\\SAI\\saimod_sys_todo'); -INSERT INTO `system_page` (`id`, `group`, `name`, `state`, `parent_id`, `login`, `type`, `div`, `url`, `func`, `php_class`) VALUES (122, 42, 'doto', 'todo', 120, 0, 1, '#tab_todo', './sai.php?sai_mod=.SYSTEM.SAI.saimod_sys_todo&action=dotolist&filter=${filter}&search=${search}', 'init_saimod_sys_todo_doto', '\\SYSTEM\\SAI\\saimod_sys_todo'); +INSERT INTO `system_page` (`id`, `group`, `name`, `state`, `parent_id`, `login`, `type`, `div`, `url`, `func`, `php_class`) VALUES (121, 42, 'todolist', 'todo', 120, 0, 0, '#tab_todo', './sai.php?sai_mod=.SYSTEM.SAI.saimod_sys_todo&action=todolist&filter=${filter}&search=${search}&page=${page}', 'init_saimod_sys_todo_todo', '\\SYSTEM\\SAI\\saimod_sys_todo'); +INSERT INTO `system_page` (`id`, `group`, `name`, `state`, `parent_id`, `login`, `type`, `div`, `url`, `func`, `php_class`) VALUES (122, 42, 'doto', 'todo', 120, 0, 1, '#tab_todo', './sai.php?sai_mod=.SYSTEM.SAI.saimod_sys_todo&action=dotolist&filter=${filter}&search=${search}&page=${page}', 'init_saimod_sys_todo_doto', '\\SYSTEM\\SAI\\saimod_sys_todo'); INSERT INTO `system_page` (`id`, `group`, `name`, `state`, `parent_id`, `login`, `type`, `div`, `url`, `func`, `php_class`) VALUES (123, 42, 'stats', 'todo', 120, 0, 1, '#tab_todo', './sai.php?sai_mod=.SYSTEM.SAI.saimod_sys_todo&action=stats', 'init_saimod_sys_todo_stats', '\\SYSTEM\\SAI\\saimod_sys_todo'); INSERT INTO `system_page` (`id`, `group`, `name`, `state`, `parent_id`, `login`, `type`, `div`, `url`, `func`, `php_class`) VALUES (124, 42, 'todoopen', 'todo', 120, 0, 1, '#tab_todo', './sai.php?sai_mod=.SYSTEM.SAI.saimod_sys_todo&action=todo&todo=${todo}', 'init_saimod_sys_todo_todoopen', '\\SYSTEM\\SAI\\saimod_sys_todo'); diff --git a/dbd/sql/mysql/data/system_sai_api.sql b/dbd/sql/mysql/data/system_sai_api.sql index 2da61e4..92686e6 100644 --- a/dbd/sql/mysql/data/system_sai_api.sql +++ b/dbd/sql/mysql/data/system_sai_api.sql @@ -146,8 +146,10 @@ INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `nam INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (1016, 42, 2, 1000, 'priority_down', 'todo', 'INT'); INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (1020, 42, 3, 1000, 'todolist', 'filter', 'STRING'); INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (1021, 42, 3, 1000, 'todolist', 'search', 'STRING'); +INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (1022, 42, 3, 1000, 'todolist', 'page', 'UINT0'); INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (1025, 42, 3, 1000, 'dotolist', 'filter', 'STRING'); INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (1026, 42, 3, 1000, 'dotolist', 'search', 'STRING'); +INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (1027, 42, 3, 1000, 'dotolist', 'page', 'UINT0'); INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (1100, 42, 0, 0, '_SYSTEM_SAI_saimod_sys_docu', 'action', NULL); diff --git a/sai/modules/saimod_sys_todo/js/saimod_sys_todo.js b/sai/modules/saimod_sys_todo/js/saimod_sys_todo.js index 33d6472..9e82f7b 100644 --- a/sai/modules/saimod_sys_todo/js/saimod_sys_todo.js +++ b/sai/modules/saimod_sys_todo/js/saimod_sys_todo.js @@ -22,7 +22,7 @@ function init_saimod_sys_todo() { function register_search(){ $('#btn_search').click(function(){ - system.load($(this).attr('state')+$('#input_search').val(),true); + system.load($(this).attr('state')+$('#input_search').val()+$(this).attr('state2'),true); }); } diff --git a/sai/modules/saimod_sys_todo/qq/SYS_SAIMOD_TODO_LIST.php b/sai/modules/saimod_sys_todo/qq/SYS_SAIMOD_TODO_LIST.php index e883d42..11a655a 100644 --- a/sai/modules/saimod_sys_todo/qq/SYS_SAIMOD_TODO_LIST.php +++ b/sai/modules/saimod_sys_todo/qq/SYS_SAIMOD_TODO_LIST.php @@ -21,7 +21,6 @@ class SYS_SAIMOD_TODO_LIST extends \SYSTEM\DB\QP { ' WHERE todo.'.\SYSTEM\DBD\system_todo::FIELD_STATE.' = ?'. ' AND (todo.'.\SYSTEM\DBD\system_todo::FIELD_MESSAGE.' LIKE ? OR creator.'.\SYSTEM\DBD\system_user::FIELD_USERNAME.' LIKE ? OR assignee.'.\SYSTEM\DBD\system_user::FIELD_USERNAME.' LIKE ?)'. ' ORDER BY case when assign.'.\SYSTEM\DBD\system_todo_assign::FIELD_USER.' = ? then 1 else 2 end'. - ' LIMIT 100'. ') as a'. ' GROUP BY a.todo_id'. ' ORDER BY a.'.\SYSTEM\DBD\system_todo::FIELD_PRIORITY.' DESC, a.'.\SYSTEM\DBD\system_todo::FIELD_TYPE.' DESC, a.'.\SYSTEM\DBD\system_todo::FIELD_COUNT.' DESC, a.'.\SYSTEM\DBD\system_todo::FIELD_TIME.' DESC' diff --git a/sai/modules/saimod_sys_todo/qq/SYS_SAIMOD_TODO_LIST_FREE.php b/sai/modules/saimod_sys_todo/qq/SYS_SAIMOD_TODO_LIST_FREE.php index 389b42b..885a8bc 100644 --- a/sai/modules/saimod_sys_todo/qq/SYS_SAIMOD_TODO_LIST_FREE.php +++ b/sai/modules/saimod_sys_todo/qq/SYS_SAIMOD_TODO_LIST_FREE.php @@ -21,7 +21,6 @@ class SYS_SAIMOD_TODO_LIST_FREE extends \SYSTEM\DB\QP { ' WHERE todo.'.\SYSTEM\DBD\system_todo::FIELD_STATE.' = ?'. ' AND assign.'.\SYSTEM\DBD\system_todo_assign::FIELD_USER.' IS NULL'. ' AND (todo.'.\SYSTEM\DBD\system_todo::FIELD_MESSAGE.' LIKE ? OR creator.'.\SYSTEM\DBD\system_user::FIELD_USERNAME.' LIKE ? OR assignee.'.\SYSTEM\DBD\system_user::FIELD_USERNAME.' LIKE ?)'. - ' LIMIT 100'. ') as a'. ' GROUP BY a.todo_id'. ' ORDER BY a.'.\SYSTEM\DBD\system_todo::FIELD_PRIORITY.' DESC, a.'.\SYSTEM\DBD\system_todo::FIELD_TYPE.' DESC, a.'.\SYSTEM\DBD\system_todo::FIELD_COUNT.' DESC, a.'.\SYSTEM\DBD\system_todo::FIELD_TIME.' DESC' diff --git a/sai/modules/saimod_sys_todo/qq/SYS_SAIMOD_TODO_LIST_MINE.php b/sai/modules/saimod_sys_todo/qq/SYS_SAIMOD_TODO_LIST_MINE.php index b7cdc35..b7500a7 100644 --- a/sai/modules/saimod_sys_todo/qq/SYS_SAIMOD_TODO_LIST_MINE.php +++ b/sai/modules/saimod_sys_todo/qq/SYS_SAIMOD_TODO_LIST_MINE.php @@ -21,7 +21,6 @@ class SYS_SAIMOD_TODO_LIST_MINE extends \SYSTEM\DB\QP { ' WHERE todo.'.\SYSTEM\DBD\system_todo::FIELD_STATE.' = ?'. ' AND assign.'.\SYSTEM\DBD\system_todo_assign::FIELD_USER.' = ?'. ' AND (todo.'.\SYSTEM\DBD\system_todo::FIELD_MESSAGE.' LIKE ? OR creator.'.\SYSTEM\DBD\system_user::FIELD_USERNAME.' LIKE ? OR assignee.'.\SYSTEM\DBD\system_user::FIELD_USERNAME.' LIKE ?)'. - ' LIMIT 100'. ') as a'. ' GROUP BY a.todo_id'. ' ORDER BY a.'.\SYSTEM\DBD\system_todo::FIELD_PRIORITY.' DESC, a.'.\SYSTEM\DBD\system_todo::FIELD_TYPE.' DESC, a.'.\SYSTEM\DBD\system_todo::FIELD_COUNT.' DESC, a.'.\SYSTEM\DBD\system_todo::FIELD_TIME.' DESC' diff --git a/sai/modules/saimod_sys_todo/qq/SYS_SAIMOD_TODO_LIST_OTHERS.php b/sai/modules/saimod_sys_todo/qq/SYS_SAIMOD_TODO_LIST_OTHERS.php index 7dfc9d6..8a8edff 100644 --- a/sai/modules/saimod_sys_todo/qq/SYS_SAIMOD_TODO_LIST_OTHERS.php +++ b/sai/modules/saimod_sys_todo/qq/SYS_SAIMOD_TODO_LIST_OTHERS.php @@ -21,7 +21,6 @@ class SYS_SAIMOD_TODO_LIST_OTHERS extends \SYSTEM\DB\QP { ' WHERE todo.'.\SYSTEM\DBD\system_todo::FIELD_STATE.' = ?'. ' AND NOT assign.'.\SYSTEM\DBD\system_todo_assign::FIELD_USER.' = ?'. ' AND (todo.'.\SYSTEM\DBD\system_todo::FIELD_MESSAGE.' LIKE ? OR creator.'.\SYSTEM\DBD\system_user::FIELD_USERNAME.' LIKE ? OR assignee.'.\SYSTEM\DBD\system_user::FIELD_USERNAME.' LIKE ?)'. - ' LIMIT 100'. ') as a'. ' GROUP BY a.todo_id'. ' ORDER BY a.'.\SYSTEM\DBD\system_todo::FIELD_PRIORITY.' DESC, a.'.\SYSTEM\DBD\system_todo::FIELD_TYPE.' DESC, a.'.\SYSTEM\DBD\system_todo::FIELD_COUNT.' DESC, a.'.\SYSTEM\DBD\system_todo::FIELD_TIME.' DESC' diff --git a/sai/modules/saimod_sys_todo/qq/SYS_SAIMOD_TODO_LIST_TYPE.php b/sai/modules/saimod_sys_todo/qq/SYS_SAIMOD_TODO_LIST_TYPE.php index c25de15..eff9771 100644 --- a/sai/modules/saimod_sys_todo/qq/SYS_SAIMOD_TODO_LIST_TYPE.php +++ b/sai/modules/saimod_sys_todo/qq/SYS_SAIMOD_TODO_LIST_TYPE.php @@ -22,7 +22,6 @@ class SYS_SAIMOD_TODO_LIST_TYPE extends \SYSTEM\DB\QP { ' AND todo.'.\SYSTEM\DBD\system_todo::FIELD_TYPE.' = ?'. ' AND (todo.'.\SYSTEM\DBD\system_todo::FIELD_MESSAGE.' LIKE ? OR creator.'.\SYSTEM\DBD\system_user::FIELD_USERNAME.' LIKE ? OR assignee.'.\SYSTEM\DBD\system_user::FIELD_USERNAME.' LIKE ?)'. ' ORDER BY case when assign.'.\SYSTEM\DBD\system_todo_assign::FIELD_USER.' = ? then 1 else 2 end'. - ' LIMIT 100'. ') as a'. ' GROUP BY a.todo_id'. ' ORDER BY a.'.\SYSTEM\DBD\system_todo::FIELD_PRIORITY.' DESC, a.'.\SYSTEM\DBD\system_todo::FIELD_TYPE.' DESC, a.'.\SYSTEM\DBD\system_todo::FIELD_COUNT.' DESC, a.'.\SYSTEM\DBD\system_todo::FIELD_TIME.' DESC' diff --git a/sai/modules/saimod_sys_todo/saimod_sys_todo.php b/sai/modules/saimod_sys_todo/saimod_sys_todo.php index 6324bf1..bf47def 100644 --- a/sai/modules/saimod_sys_todo/saimod_sys_todo.php +++ b/sai/modules/saimod_sys_todo/saimod_sys_todo.php @@ -49,17 +49,18 @@ class saimod_sys_todo extends \SYSTEM\SAI\SaiModule { return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_todo/tpl/saimod_sys_todo_new.tpl'), $vars); } - public static function sai_mod__SYSTEM_SAI_saimod_sys_todo_action_todolist($filter='all',$search=''){ - return self::generate_list(\SYSTEM\DBD\system_todo::FIELD_STATE_OPEN,$filter,$search);} + public static function sai_mod__SYSTEM_SAI_saimod_sys_todo_action_todolist($filter='all',$search='%',$page=0){ + return self::generate_list(\SYSTEM\DBD\system_todo::FIELD_STATE_OPEN,$filter,$search,$page);} - public static function sai_mod__SYSTEM_SAI_saimod_sys_todo_action_dotolist($filter='all',$search=''){ - return self::generate_list(\SYSTEM\DBD\system_todo::FIELD_STATE_CLOSED,$filter,$search);} + public static function sai_mod__SYSTEM_SAI_saimod_sys_todo_action_dotolist($filter='all',$search='%',$page=0){ + return self::generate_list(\SYSTEM\DBD\system_todo::FIELD_STATE_CLOSED,$filter,$search,$page);} - private static function generate_list($state,$filter,$search){ + private static function generate_list($state,$filter,$search,$page){ $vars = array(); $vars['filter'] = $filter; $vars['search'] = $search; - $search = '%'.$search.'%'; + $vars['page'] = $page; + $search = $search; $vars['todo_list_elements'] = $vars['filter_mine'] = $vars['filter_free'] = $vars['filter_others'] = $vars['filter_gen'] = $vars['filter_user'] = $vars['filter_report'] = ''; @@ -102,7 +103,8 @@ class saimod_sys_todo extends \SYSTEM\SAI\SaiModule { break; } $count_filtered = 0; - while($row = $res->next()){ + $res->seek(100*$page); + while(($row = $res->next()) && ($count_filtered < 100)){ $row['class_row'] = self::trclass($row['type'],$row['class'],$row['assignee_id'],$userid); $row['time_elapsed'] = \SYSTEM\time::time_ago_string(strtotime($row['time'])); $row['state_string'] = self::state($row['count']); @@ -114,6 +116,11 @@ class saimod_sys_todo extends \SYSTEM\SAI\SaiModule { $vars['todo_list_elements'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_todo/tpl/todo_user_list_element.tpl'), $row); $count_filtered++; } + $vars['pagination'] = ''; + for($i=0;$i < ceil($count/100);$i++){ + $data = array('page' => $i,'search' => $search, 'filter' => $filter, 'active' => ($i == $page) ? 'active' : ''); + $vars['pagination'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_todo/tpl/todo_list_pagination.tpl'), $data); + } $vars['count'] = $count_filtered.'/'.$count; $vars['state'] = $state == \SYSTEM\DBD\system_todo::FIELD_STATE_OPEN ? 'todo' : 'todo(doto)'; $vars = array_merge($vars, \SYSTEM\PAGE\text::tag(\SYSTEM\DBD\system_text::TAG_SAI_TODO)); diff --git a/sai/modules/saimod_sys_todo/tpl/todo_list.tpl b/sai/modules/saimod_sys_todo/tpl/todo_list.tpl index 471a30f..aa87af9 100644 --- a/sai/modules/saimod_sys_todo/tpl/todo_list.tpl +++ b/sai/modules/saimod_sys_todo/tpl/todo_list.tpl @@ -1,17 +1,17 @@
Rows: ${count} -
User ToDo's
+
ToDo's
@@ -21,4 +21,7 @@ ${todo_list_elements}
${time_ago}
+
    + ${pagination} +
\ No newline at end of file diff --git a/sai/modules/saimod_sys_todo/tpl/todo_list_pagination.tpl b/sai/modules/saimod_sys_todo/tpl/todo_list_pagination.tpl new file mode 100644 index 0000000..9748ade --- /dev/null +++ b/sai/modules/saimod_sys_todo/tpl/todo_list_pagination.tpl @@ -0,0 +1 @@ +
  • ${page}
  • \ No newline at end of file From e5ebfd6592b4e6a6215799aae5cccd5e8d1fd2dd Mon Sep 17 00:00:00 2001 From: rylon Date: Wed, 10 Jun 2015 18:32:25 +0200 Subject: [PATCH 05/24] small fix for filter switch -> turn back to page 0 --- sai/modules/saimod_sys_todo/tpl/todo_list.tpl | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sai/modules/saimod_sys_todo/tpl/todo_list.tpl b/sai/modules/saimod_sys_todo/tpl/todo_list.tpl index aa87af9..8631349 100644 --- a/sai/modules/saimod_sys_todo/tpl/todo_list.tpl +++ b/sai/modules/saimod_sys_todo/tpl/todo_list.tpl @@ -1,12 +1,12 @@
    From 43a028aaee5b011bbcf0de3d5009479677ddf913 Mon Sep 17 00:00:00 2001 From: rylon Date: Wed, 10 Jun 2015 18:40:38 +0200 Subject: [PATCH 06/24] texts for saimod todo --- dbd/sql/mysql/data/system_text.sql | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/dbd/sql/mysql/data/system_text.sql b/dbd/sql/mysql/data/system_text.sql index 06a83d6..f690036 100644 --- a/dbd/sql/mysql/data/system_text.sql +++ b/dbd/sql/mysql/data/system_text.sql @@ -546,7 +546,7 @@ DELETE FROM `system_text` WHERE id = 'basic_mine'; DELETE FROM `system_text_tag` WHERE id = 'basic_mine'; INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('basic_mine', 'deDE', 'Meine', 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_mein', 'enUS', 'Mine', 2, 1, '2015-04-16 23:11:18', '2015-04-16 23:11:18'); + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('basic_mine', 'enUS', 'Mine', 2, 1, '2015-04-16 23:11:18', '2015-04-16 23:11:18'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_mine', 'basic'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_mine', 'sai_todo'); @@ -584,6 +584,13 @@ INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('basic_report', 'enUS', 'Report', 2, 1, '2015-04-16 23:11:18', '2015-04-16 23:11:18'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_report', 'basic'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_report', 'sai_todo'); + + DELETE FROM `system_text` WHERE id = 'basic_priority'; + DELETE FROM `system_text_tag` WHERE id = 'basic_priority'; + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('basic_priority', 'deDE', 'Priorität', 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_priority', 'enUS', 'Priority', 2, 1, '2015-04-16 23:11:18', '2015-04-16 23:11:18'); + INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_priority', 'basic'); + INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_priority', 'sai_todo'); -- SAI DELETE FROM `system_text` WHERE id = 'sai_api_title'; @@ -1199,6 +1206,13 @@ INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('table_interface', 'enUS', 'Interface', 2, 2, '2015-04-18 13:56:53', '2015-04-18 13:56:53'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_interface', 'sai_mod'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_interface', 'table'); + + DELETE FROM `system_text` WHERE id = 'table_priority'; + DELETE FROM `system_text_tag` WHERE id = 'table_priority'; + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('table_priority', 'deDE', 'Priorität', 2, 2, '2015-04-23 01:58:25', '2015-04-23 01:58:25'); + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('table_priority', 'enUS', 'Priority', 2, 2, '2015-04-18 13:56:53', '2015-04-18 13:56:53'); + INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_priority', 'sai_todo'); + INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_priority', 'table'); -- Time From 48d15841beedfb666eb8488f899698c4e7a3e57c Mon Sep 17 00:00:00 2001 From: rylon Date: Wed, 10 Jun 2015 18:41:16 +0200 Subject: [PATCH 07/24] priority display for todo --- sai/modules/saimod_sys_todo/tpl/todo_user_list_element.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sai/modules/saimod_sys_todo/tpl/todo_user_list_element.tpl b/sai/modules/saimod_sys_todo/tpl/todo_user_list_element.tpl index 38d9b54..ed6c17b 100644 --- a/sai/modules/saimod_sys_todo/tpl/todo_user_list_element.tpl +++ b/sai/modules/saimod_sys_todo/tpl/todo_user_list_element.tpl @@ -2,5 +2,5 @@ ${time_elapsed} ${message} ${username} - ${assignee} + ${assignee}
    ${basic_priority}: ${priority} \ No newline at end of file From 5125d090123b1d6d1e1779ea319b9145e61bff2d Mon Sep 17 00:00:00 2001 From: rylon Date: Wed, 10 Jun 2015 18:47:02 +0200 Subject: [PATCH 08/24] text fix --- sai/modules/saimod_sys_todo/tpl/todo_list.tpl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sai/modules/saimod_sys_todo/tpl/todo_list.tpl b/sai/modules/saimod_sys_todo/tpl/todo_list.tpl index 8631349..29ce010 100644 --- a/sai/modules/saimod_sys_todo/tpl/todo_list.tpl +++ b/sai/modules/saimod_sys_todo/tpl/todo_list.tpl @@ -10,8 +10,7 @@ - Rows: ${count} -
    ToDo's
    +
    Rows: ${count} Page: ${page}
    From 7563357a130f66dae05314d33700ca8487107c8b Mon Sep 17 00:00:00 2001 From: rylon Date: Wed, 10 Jun 2015 20:47:32 +0200 Subject: [PATCH 09/24] saimod todo division by zero fix --- sai/modules/saimod_sys_todo/todo_stats_data.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sai/modules/saimod_sys_todo/todo_stats_data.php b/sai/modules/saimod_sys_todo/todo_stats_data.php index 4f23655..c85d3a8 100644 --- a/sai/modules/saimod_sys_todo/todo_stats_data.php +++ b/sai/modules/saimod_sys_todo/todo_stats_data.php @@ -11,6 +11,6 @@ class todo_stats_data { $this->open = $all-$closed; $this->closed = $closed; $this->all = $all; - $this->perc = round($this->closed / $this->all * 100,2); + $this->perc = round($this->closed / ($this->all == 0 ? 1 : $this->all) * 100,2); } } From 4f4aeefa978d2e0c750726ba923bc4bf28aa3a16 Mon Sep 17 00:00:00 2001 From: rylon Date: Thu, 11 Jun 2015 00:53:55 +0200 Subject: [PATCH 10/24] saimod log pagination, filter & search --- dbd/sql/mysql/data/system_page.sql | 2 +- dbd/sql/mysql/data/system_sai_api.sql | 2 + dbd/sql/mysql/data/system_text.sql | 11 +++++ .../saimod_sys_log/js/saimod_sys_log.js | 7 +++ .../qq/SYS_SAIMOD_LOG_FILTER.php | 5 ++- .../qq/SYS_SAIMOD_LOG_FILTER_COUNT.php | 4 +- sai/modules/saimod_sys_log/saimod_sys_log.php | 44 ++++++++++--------- .../tpl/saimod_sys_log_error_filter.tpl | 1 + .../tpl/saimod_sys_log_filter.tpl | 37 ++++++++-------- .../tpl/saimod_sys_log_pagination.tpl | 1 + .../saimod_sys_todo/js/saimod_sys_todo.js | 2 +- sai/modules/saimod_sys_todo/tpl/todo_list.tpl | 4 +- .../tpl/todo_list_pagination.tpl | 2 +- 13 files changed, 75 insertions(+), 47 deletions(-) create mode 100644 sai/modules/saimod_sys_log/tpl/saimod_sys_log_error_filter.tpl create mode 100644 sai/modules/saimod_sys_log/tpl/saimod_sys_log_pagination.tpl diff --git a/dbd/sql/mysql/data/system_page.sql b/dbd/sql/mysql/data/system_page.sql index 2b1c377..aaba211 100644 --- a/dbd/sql/mysql/data/system_page.sql +++ b/dbd/sql/mysql/data/system_page.sql @@ -24,7 +24,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 (61, 42, 'list', 'files', 60, 0, 0, '#tab_files', './sai.php?sai_mod=.SYSTEM.SAI.saimod_sys_files&action=tab&name=${folder}', 'init_saimod_sys_files_list', '\\SYSTEM\\SAI\\saimod_sys_files'); INSERT INTO `system_page` (`id`, `group`, `name`, `state`, `parent_id`, `login`, `type`, `div`, `url`, `func`, `php_class`) VALUES (70, 42, 'log', 'log', -1, 0, 0, '#content', './sai.php?sai_mod=.SYSTEM.SAI.saimod_sys_log', 'init_saimod_sys_log', '\\SYSTEM\\SAI\\saimod_sys_log'); -INSERT INTO `system_page` (`id`, `group`, `name`, `state`, `parent_id`, `login`, `type`, `div`, `url`, `func`, `php_class`) VALUES (71, 42, 'list', 'log', 70, 0, 0, '#tab_log', './sai.php?sai_mod=.SYSTEM.SAI.saimod_sys_log&action=filter&filter=${filter}', 'init_saimod_sys_log_log', '\\SYSTEM\\SAI\\saimod_sys_log'); +INSERT INTO `system_page` (`id`, `group`, `name`, `state`, `parent_id`, `login`, `type`, `div`, `url`, `func`, `php_class`) VALUES (71, 42, 'list', 'log', 70, 0, 0, '#tab_log', './sai.php?sai_mod=.SYSTEM.SAI.saimod_sys_log&action=filter&filter=${filter}&search=${search}&page=${page}', 'init_saimod_sys_log_log', '\\SYSTEM\\SAI\\saimod_sys_log'); INSERT INTO `system_page` (`id`, `group`, `name`, `state`, `parent_id`, `login`, `type`, `div`, `url`, `func`, `php_class`) VALUES (72, 42, 'stats', 'log', 70, 0, 1, '#tab_log', './sai.php?sai_mod=.SYSTEM.SAI.saimod_sys_log&action=stats', 'init_saimod_sys_log_stats', '\\SYSTEM\\SAI\\saimod_sys_log'); INSERT INTO `system_page` (`id`, `group`, `name`, `state`, `parent_id`, `login`, `type`, `div`, `url`, `func`, `php_class`) VALUES (73, 42, 'error', 'log', 70, 0, 1, '#tab_log', './sai.php?sai_mod=.SYSTEM.SAI.saimod_sys_log&action=error&error=${error}', '', ''); diff --git a/dbd/sql/mysql/data/system_sai_api.sql b/dbd/sql/mysql/data/system_sai_api.sql index 92686e6..de5765f 100644 --- a/dbd/sql/mysql/data/system_sai_api.sql +++ b/dbd/sql/mysql/data/system_sai_api.sql @@ -47,6 +47,8 @@ INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `nam INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (200, 42, 0, 0, '_SYSTEM_SAI_saimod_sys_log', 'action', NULL); -- INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (201, 42, 3, 200, 'filter', 'filter', 'STRING'); +INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (202, 42, 3, 200, 'filter', 'search', 'STRING'); +INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (203, 42, 3, 200, 'filter', 'page', 'UINT0'); -- INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (210, 42, 3, 200, 'error', 'error', 'INT'); -- diff --git a/dbd/sql/mysql/data/system_text.sql b/dbd/sql/mysql/data/system_text.sql index f690036..dc66e75 100644 --- a/dbd/sql/mysql/data/system_text.sql +++ b/dbd/sql/mysql/data/system_text.sql @@ -267,6 +267,7 @@ INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('basic_placeholder_search', 'enUS', 'I\'m searching for...', 0, 0, '2015-04-15 18:29:16', '0000-00-00 00:00:00'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_placeholder_search', 'basic'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_placeholder_search', 'sai_todo'); + INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_placeholder_search', 'sai_log'); DELETE FROM `system_text` WHERE id = 'basic_progress'; DELETE FROM `system_text_tag` WHERE id = 'basic_progress'; @@ -302,6 +303,7 @@ INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('basic_rows', 'frFR', 'lignes', 3, 3, '2015-04-20 16:33:19', '2015-04-20 16:33:19'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_rows', 'basic'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_rows', 'sai_log'); + INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_rows', 'sai_todo'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_rows', 'sai_security'); DELETE FROM `system_text` WHERE id = 'basic_save'; @@ -463,6 +465,7 @@ INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_search', 'basic'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_search', 'sai_security'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_search', 'sai_todo'); + INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_search', 'sai_log'); DELETE FROM `system_text` WHERE id = 'basic_send_email'; DELETE FROM `system_text_tag` WHERE id = 'basic_send_email'; @@ -591,6 +594,14 @@ INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('basic_priority', 'enUS', 'Priority', 2, 1, '2015-04-16 23:11:18', '2015-04-16 23:11:18'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_priority', 'basic'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_priority', 'sai_todo'); + + DELETE FROM `system_text` WHERE id = 'basic_page'; + DELETE FROM `system_text_tag` WHERE id = 'basic_page'; + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('basic_page', 'deDE', 'Seite', 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_page', 'enUS', 'Page', 2, 1, '2015-04-16 23:11:18', '2015-04-16 23:11:18'); + INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_page', 'basic'); + INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_page', 'sai_todo'); + INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_page', 'sai_log'); -- SAI DELETE FROM `system_text` WHERE id = 'sai_api_title'; diff --git a/sai/modules/saimod_sys_log/js/saimod_sys_log.js b/sai/modules/saimod_sys_log/js/saimod_sys_log.js index 8124a49..61d10f9 100644 --- a/sai/modules/saimod_sys_log/js/saimod_sys_log.js +++ b/sai/modules/saimod_sys_log/js/saimod_sys_log.js @@ -8,11 +8,18 @@ function init_saimod_sys_log() { }); }; +function register_search(){ + $('#btn_search').click(function(){ + system.load($(this).attr('state')+$('#input_search').val(),true); + }); +} + function init_saimod_sys_log_log() { $("#sai_mod_log_table").tablesorter(); $('#tabs_log li').each(function(){ $(this).removeClass('active');}); $('#menu_loglist').parent().addClass('active'); + register_search(); } function init_saimod_sys_log_stats() { diff --git a/sai/modules/saimod_sys_log/qq/SYS_SAIMOD_LOG_FILTER.php b/sai/modules/saimod_sys_log/qq/SYS_SAIMOD_LOG_FILTER.php index d3a4d77..e75ca91 100644 --- a/sai/modules/saimod_sys_log/qq/SYS_SAIMOD_LOG_FILTER.php +++ b/sai/modules/saimod_sys_log/qq/SYS_SAIMOD_LOG_FILTER.php @@ -10,12 +10,13 @@ class SYS_SAIMOD_LOG_FILTER extends \SYSTEM\DB\QP { ' ON '.\SYSTEM\DBD\system_log::NAME_PG.'.'.\SYSTEM\DBD\system_log::FIELD_USER. ' = '.\SYSTEM\DBD\system_user::NAME_PG.'.'.\SYSTEM\DBD\system_user::FIELD_ID. ' WHERE '.\SYSTEM\DBD\system_log::FIELD_CLASS.' LIKE $1'. -' ORDER BY '.\SYSTEM\DBD\system_log::FIELD_TIME.' DESC, '.\SYSTEM\DBD\system_log::NAME_PG.'."'.\SYSTEM\DBD\system_log::FIELD_ID.'" DESC LIMIT 100;', +' ORDER BY '.\SYSTEM\DBD\system_log::FIELD_TIME.' DESC, '.\SYSTEM\DBD\system_log::NAME_PG.'."'.\SYSTEM\DBD\system_log::FIELD_ID.'" DESC;', //mys 'SELECT * FROM '.\SYSTEM\DBD\system_log::NAME_MYS. ' LEFT JOIN '.\SYSTEM\DBD\system_user::NAME_MYS. ' ON '.\SYSTEM\DBD\system_log::NAME_MYS.'.'.\SYSTEM\DBD\system_log::FIELD_USER. ' = '.\SYSTEM\DBD\system_user::NAME_MYS.'.'.\SYSTEM\DBD\system_user::FIELD_ID. ' WHERE '.\SYSTEM\DBD\system_log::FIELD_CLASS.' LIKE ?'. -' ORDER BY '.\SYSTEM\DBD\system_log::FIELD_TIME.' DESC, '.\SYSTEM\DBD\system_log::NAME_MYS.'.'.\SYSTEM\DBD\system_log::FIELD_ID.' DESC LIMIT 100;' +' AND ('.\SYSTEM\DBD\system_log::FIELD_MESSAGE.' LIKE ? OR '.\SYSTEM\DBD\system_log::FIELD_FILE.' LIKE ? OR '.\SYSTEM\DBD\system_log::FIELD_IP.' LIKE ?)'. +' ORDER BY '.\SYSTEM\DBD\system_log::FIELD_TIME.' DESC, '.\SYSTEM\DBD\system_log::NAME_MYS.'.'.\SYSTEM\DBD\system_log::FIELD_ID.' DESC;' );}} diff --git a/sai/modules/saimod_sys_log/qq/SYS_SAIMOD_LOG_FILTER_COUNT.php b/sai/modules/saimod_sys_log/qq/SYS_SAIMOD_LOG_FILTER_COUNT.php index 70d04e7..3d24f35 100644 --- a/sai/modules/saimod_sys_log/qq/SYS_SAIMOD_LOG_FILTER_COUNT.php +++ b/sai/modules/saimod_sys_log/qq/SYS_SAIMOD_LOG_FILTER_COUNT.php @@ -11,7 +11,7 @@ class SYS_SAIMOD_LOG_FILTER_COUNT extends \SYSTEM\DB\QP { //mys 'SELECT COUNT(*) as count'. ' FROM '.\SYSTEM\DBD\system_log::NAME_MYS. -' WHERE '.\SYSTEM\DBD\system_log::FIELD_CLASS. -' LIKE ?;' +' WHERE '.\SYSTEM\DBD\system_log::FIELD_CLASS.' LIKE ?'. +' AND ('.\SYSTEM\DBD\system_log::FIELD_MESSAGE.' LIKE ? OR '.\SYSTEM\DBD\system_log::FIELD_FILE.' LIKE ? OR '.\SYSTEM\DBD\system_log::FIELD_IP.' LIKE ?);' );}} diff --git a/sai/modules/saimod_sys_log/saimod_sys_log.php b/sai/modules/saimod_sys_log/saimod_sys_log.php index 39755fc..4793647 100644 --- a/sai/modules/saimod_sys_log/saimod_sys_log.php +++ b/sai/modules/saimod_sys_log/saimod_sys_log.php @@ -292,37 +292,41 @@ class saimod_sys_log extends \SYSTEM\SAI\SaiModule { $vars = array_merge($vars,\SYSTEM\PAGE\text::tag(\SYSTEM\DBD\system_text::TAG_SAI_LOG)); return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_log/tpl/saimod_sys_log_error.tpl'), $vars);} - public static function sai_mod__SYSTEM_SAI_saimod_sys_log_action_filter($filter = "%"){ - $filter_ = $filter; + public static function sai_mod__SYSTEM_SAI_saimod_sys_log_action_filter($filter = "%",$search="%",$page=0){ $filter = str_replace('\\', '\\\\', $filter); - $count = \SYSTEM\DBD\SYS_SAIMOD_LOG_FILTER_COUNT::Q1(array($filter)); - $res = \SYSTEM\DBD\SYS_SAIMOD_LOG_FILTER::QQ(array($filter)); - $table=''; - while($r = $res->next()){ - //print_r($r); + $count = \SYSTEM\DBD\SYS_SAIMOD_LOG_FILTER_COUNT::Q1(array($filter,$search,$search,$search))['count']; + $vars = array(); + $vars['filter'] = $filter; + $vars['search'] = $search; + $vars['page'] = $page; + $res = \SYSTEM\DBD\SYS_SAIMOD_LOG_FILTER::QQ(array($filter,$search,$search,$search)); + $vars['table'] = ''; + $count_filtered = 0; + $res->seek(100*$page); + while(($r = $res->next()) && ($count_filtered < 100)){ $r['class_row'] = self::tablerow_class($r['class']); $r['time'] = \SYSTEM\time::time_ago_string(strtotime($r['time'])); $r['message'] = htmlspecialchars(substr($r['message'],0,255)); $r['request_uri'] = htmlspecialchars($r['request_uri']); - $table .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_log/tpl/saimod_sys_log_table_row.tpl'),$r); + $vars['table'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_log/tpl/saimod_sys_log_table_row.tpl'),$r); + $count_filtered++; } - $vars = array(); - $vars['count'] = $count['count']; - $vars['error_filter'] = self::generate_error_filters($filter_); + $vars['pagination'] = ''; + for($i=0;$i < ceil($count/100);$i++){ + $data = array('page' => $i,'search' => $search, 'filter' => $filter, 'active' => ($i == $page) ? 'active' : ''); + $vars['pagination'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_log/tpl/saimod_sys_log_pagination.tpl'), $data); + } + $vars['count'] = $count_filtered.'/'.$count; + $vars['error_filter'] = ''; + $res = \SYSTEM\DBD\SYS_SAIMOD_LOG_FILTERS::QQ(); + while($row = $res->next()){ + $data = array('active' => ($filter == $row['class'] ? 'active' : ''), 'filter' => $row['class'], 'search' => $search); + $vars['error_filter'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_log/tpl/saimod_sys_log_error_filter.tpl'),$data);} $vars['active'] = ($filter == '%' ? 'active' : ''); - $vars['table'] = $table; $vars = array_merge($vars, \SYSTEM\PAGE\text::tag(\SYSTEM\DBD\system_text::TAG_SAI_LOG)); return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_log/tpl/saimod_sys_log_filter.tpl'),$vars); } - private static function generate_error_filters($filter){ - $res = \SYSTEM\DBD\SYS_SAIMOD_LOG_FILTERS::QQ(); - $result = ''; - while($row = $res->next()){ - $result .= ''.$row['class'].'';} - return $result; - } - public static function sai_mod__SYSTEM_SAI_saimod_sys_log(){ $vars = \SYSTEM\PAGE\text::tag(\SYSTEM\DBD\system_text::TAG_SAI_LOG); $vars['PICPATH'] = \SYSTEM\WEBPATH(new \SYSTEM\PSAI(), 'modules/saimod_sys_log/img/'); diff --git a/sai/modules/saimod_sys_log/tpl/saimod_sys_log_error_filter.tpl b/sai/modules/saimod_sys_log/tpl/saimod_sys_log_error_filter.tpl new file mode 100644 index 0000000..e0322b9 --- /dev/null +++ b/sai/modules/saimod_sys_log/tpl/saimod_sys_log_error_filter.tpl @@ -0,0 +1 @@ +
  • ${filter}
  • \ No newline at end of file diff --git a/sai/modules/saimod_sys_log/tpl/saimod_sys_log_filter.tpl b/sai/modules/saimod_sys_log/tpl/saimod_sys_log_filter.tpl index 1e11627..8428a17 100644 --- a/sai/modules/saimod_sys_log/tpl/saimod_sys_log_filter.tpl +++ b/sai/modules/saimod_sys_log/tpl/saimod_sys_log_filter.tpl @@ -1,25 +1,26 @@
    - ${basic_rows}: ${count} +
    ${basic_rows}: ${count} ${basic_page}: ${page}
    ${time_ago}
    - - - - - - - - - - - - - - - ${table} - + + + + + + + + + + + + ${table}
    ${time_ago}${table_class}${table_message}${table_file}${table_line}${table_ip}${table_url}${table_user}${table_querytime}
    ${time_ago}${table_class}${table_message}${table_file}${table_line}${table_ip}${table_url}${table_user}${table_querytime}
    +
      + ${pagination} +
    \ No newline at end of file diff --git a/sai/modules/saimod_sys_log/tpl/saimod_sys_log_pagination.tpl b/sai/modules/saimod_sys_log/tpl/saimod_sys_log_pagination.tpl new file mode 100644 index 0000000..8fc22b9 --- /dev/null +++ b/sai/modules/saimod_sys_log/tpl/saimod_sys_log_pagination.tpl @@ -0,0 +1 @@ +
  • ${page}
  • \ No newline at end of file diff --git a/sai/modules/saimod_sys_todo/js/saimod_sys_todo.js b/sai/modules/saimod_sys_todo/js/saimod_sys_todo.js index 9e82f7b..33d6472 100644 --- a/sai/modules/saimod_sys_todo/js/saimod_sys_todo.js +++ b/sai/modules/saimod_sys_todo/js/saimod_sys_todo.js @@ -22,7 +22,7 @@ function init_saimod_sys_todo() { function register_search(){ $('#btn_search').click(function(){ - system.load($(this).attr('state')+$('#input_search').val()+$(this).attr('state2'),true); + system.load($(this).attr('state')+$('#input_search').val(),true); }); } diff --git a/sai/modules/saimod_sys_todo/tpl/todo_list.tpl b/sai/modules/saimod_sys_todo/tpl/todo_list.tpl index 29ce010..e79e11e 100644 --- a/sai/modules/saimod_sys_todo/tpl/todo_list.tpl +++ b/sai/modules/saimod_sys_todo/tpl/todo_list.tpl @@ -7,10 +7,10 @@
  • ${basic_generated}
  • ${basic_user}
  • ${basic_report}
  • - + -
    Rows: ${count} Page: ${page}
    +
    ${basic_rows}: ${count} ${basic_page}: ${page}
    diff --git a/sai/modules/saimod_sys_todo/tpl/todo_list_pagination.tpl b/sai/modules/saimod_sys_todo/tpl/todo_list_pagination.tpl index 9748ade..9ba0130 100644 --- a/sai/modules/saimod_sys_todo/tpl/todo_list_pagination.tpl +++ b/sai/modules/saimod_sys_todo/tpl/todo_list_pagination.tpl @@ -1 +1 @@ -
  • ${page}
  • \ No newline at end of file +
  • ${page}
  • \ No newline at end of file From 8ac4765a624c94ad60edba057d9c737fefcb3204 Mon Sep 17 00:00:00 2001 From: rylon Date: Thu, 11 Jun 2015 14:54:09 +0200 Subject: [PATCH 11/24] updated libs 2 fix errors --- lib/tablesorter | 2 +- lib/textillate | 2 +- lib/tinymce | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/tablesorter b/lib/tablesorter index 4765518..54f8142 160000 --- a/lib/tablesorter +++ b/lib/tablesorter @@ -1 +1 @@ -Subproject commit 4765518860d3f7f25617bc73db12ed56a7f1fdae +Subproject commit 54f81421b3002be930ab53e560cb658e5c11bcfa diff --git a/lib/textillate b/lib/textillate index 327bd4b..45ded03 160000 --- a/lib/textillate +++ b/lib/textillate @@ -1 +1 @@ -Subproject commit 327bd4bfbc61979b98b01f7a1eaa9910dea01f77 +Subproject commit 45ded03fc9c45bb3e9fce61dd700a2acabc0b9db diff --git a/lib/tinymce b/lib/tinymce index e8b11f1..852cb11 160000 --- a/lib/tinymce +++ b/lib/tinymce @@ -1 +1 @@ -Subproject commit e8b11f1d77cc3aa4187162dae17ca95211c2e567 +Subproject commit 852cb110810fc18804be991f7bfe39a71d3b2091 From 85ce1066b47dcb941de8eeb49b81098664bada03 Mon Sep 17 00:00:00 2001 From: rylon Date: Thu, 11 Jun 2015 15:01:05 +0200 Subject: [PATCH 12/24] pagination start & end --- sai/modules/saimod_sys_log/saimod_sys_log.php | 1 + sai/modules/saimod_sys_log/tpl/saimod_sys_log_filter.tpl | 2 ++ sai/modules/saimod_sys_todo/saimod_sys_todo.php | 1 + sai/modules/saimod_sys_todo/tpl/todo_list.tpl | 2 ++ 4 files changed, 6 insertions(+) diff --git a/sai/modules/saimod_sys_log/saimod_sys_log.php b/sai/modules/saimod_sys_log/saimod_sys_log.php index 4793647..0b70a94 100644 --- a/sai/modules/saimod_sys_log/saimod_sys_log.php +++ b/sai/modules/saimod_sys_log/saimod_sys_log.php @@ -312,6 +312,7 @@ class saimod_sys_log extends \SYSTEM\SAI\SaiModule { $count_filtered++; } $vars['pagination'] = ''; + $vars['page_last'] = ceil($count/100)-1; for($i=0;$i < ceil($count/100);$i++){ $data = array('page' => $i,'search' => $search, 'filter' => $filter, 'active' => ($i == $page) ? 'active' : ''); $vars['pagination'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_log/tpl/saimod_sys_log_pagination.tpl'), $data); diff --git a/sai/modules/saimod_sys_log/tpl/saimod_sys_log_filter.tpl b/sai/modules/saimod_sys_log/tpl/saimod_sys_log_filter.tpl index 8428a17..a39cc82 100644 --- a/sai/modules/saimod_sys_log/tpl/saimod_sys_log_filter.tpl +++ b/sai/modules/saimod_sys_log/tpl/saimod_sys_log_filter.tpl @@ -21,6 +21,8 @@ ${table}
    ${time_ago}
      +
    • «
    • ${pagination} +
    • »
    \ No newline at end of file diff --git a/sai/modules/saimod_sys_todo/saimod_sys_todo.php b/sai/modules/saimod_sys_todo/saimod_sys_todo.php index bf47def..40c9bb8 100644 --- a/sai/modules/saimod_sys_todo/saimod_sys_todo.php +++ b/sai/modules/saimod_sys_todo/saimod_sys_todo.php @@ -117,6 +117,7 @@ class saimod_sys_todo extends \SYSTEM\SAI\SaiModule { $count_filtered++; } $vars['pagination'] = ''; + $vars['page_last'] = ceil($count/100)-1; for($i=0;$i < ceil($count/100);$i++){ $data = array('page' => $i,'search' => $search, 'filter' => $filter, 'active' => ($i == $page) ? 'active' : ''); $vars['pagination'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_todo/tpl/todo_list_pagination.tpl'), $data); diff --git a/sai/modules/saimod_sys_todo/tpl/todo_list.tpl b/sai/modules/saimod_sys_todo/tpl/todo_list.tpl index e79e11e..bc01691 100644 --- a/sai/modules/saimod_sys_todo/tpl/todo_list.tpl +++ b/sai/modules/saimod_sys_todo/tpl/todo_list.tpl @@ -21,6 +21,8 @@ ${todo_list_elements}
      +
    • «
    • ${pagination} +
    • »
    \ No newline at end of file From d4820a26b2b7e98185311d6616ab84852da51f12 Mon Sep 17 00:00:00 2001 From: rylon Date: Fri, 12 Jun 2015 15:10:44 +0200 Subject: [PATCH 13/24] security pagination, filtering, search, texts --- dbd/sql/mysql/data/system_page.sql | 2 +- dbd/sql/mysql/data/system_sai_api.sql | 4 +- dbd/sql/mysql/data/system_text.sql | 47 +++++++++++++++++++ .../js/saimod_sys_security.js | 9 +++- .../qq/SYS_SAIMOD_SECURITY_USERS.php | 4 +- .../qq/SYS_SAIMOD_SECURITY_USERS_FILTER.php | 15 ++++++ .../SYS_SAIMOD_SECURITY_USER_COUNT_FILTER.php | 14 ++++++ .../saimod_sys_security.php | 38 +++++++++++---- .../tpl/saimod_sys_security.tpl | 2 - .../tpl/saimod_sys_security_pagination.tpl | 1 + .../tpl/saimod_sys_security_right_filter.tpl | 1 + .../tpl/saimod_sys_security_user.tpl | 5 -- .../tpl/saimod_sys_security_users.tpl | 41 +++++++++------- 13 files changed, 143 insertions(+), 40 deletions(-) create mode 100644 sai/modules/saimod_sys_security/qq/SYS_SAIMOD_SECURITY_USERS_FILTER.php create mode 100644 sai/modules/saimod_sys_security/qq/SYS_SAIMOD_SECURITY_USER_COUNT_FILTER.php create mode 100644 sai/modules/saimod_sys_security/tpl/saimod_sys_security_pagination.tpl create mode 100644 sai/modules/saimod_sys_security/tpl/saimod_sys_security_right_filter.tpl diff --git a/dbd/sql/mysql/data/system_page.sql b/dbd/sql/mysql/data/system_page.sql index aaba211..4cd2088 100644 --- a/dbd/sql/mysql/data/system_page.sql +++ b/dbd/sql/mysql/data/system_page.sql @@ -36,7 +36,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 (93, 42, 'lib', 'mod', 90, 0, 1, '#tab_mod', './sai.php?sai_mod=.SYSTEM.SAI.saimod_sys_mod&action=lib', 'init_saimod_sys_mod_lib', '\\SYSTEM\\SAI\\saimod_sys_mod'); INSERT INTO `system_page` (`id`, `group`, `name`, `state`, `parent_id`, `login`, `type`, `div`, `url`, `func`, `php_class`) VALUES (100, 42, 'security', 'security', -1, 0, 0, '#content', './sai.php?sai_mod=.SYSTEM.SAI.saimod_sys_security', 'init_saimod_sys_security', '\\SYSTEM\\SAI\\saimod_sys_security'); -INSERT INTO `system_page` (`id`, `group`, `name`, `state`, `parent_id`, `login`, `type`, `div`, `url`, `func`, `php_class`) VALUES (101, 42, 'users', 'security', 100, 0, 0, '#tab_security', './sai.php?sai_mod=.SYSTEM.SAI.saimod_sys_security&action=users&search=${search}', 'init_saimod_sys_security_users', '\\SYSTEM\\SAI\\saimod_sys_security'); +INSERT INTO `system_page` (`id`, `group`, `name`, `state`, `parent_id`, `login`, `type`, `div`, `url`, `func`, `php_class`) VALUES (101, 42, 'users', 'security', 100, 0, 0, '#tab_security', './sai.php?sai_mod=.SYSTEM.SAI.saimod_sys_security&action=users&filter=${filter}&search=${search}&page=${page}', 'init_saimod_sys_security_users', '\\SYSTEM\\SAI\\saimod_sys_security'); INSERT INTO `system_page` (`id`, `group`, `name`, `state`, `parent_id`, `login`, `type`, `div`, `url`, `func`, `php_class`) VALUES (102, 42, 'rights', 'security', 100, 0, 1, '#tab_security', './sai.php?sai_mod=.SYSTEM.SAI.saimod_sys_security&action=rights', 'init_saimod_sys_security_rights', '\\SYSTEM\\SAI\\saimod_sys_security'); INSERT INTO `system_page` (`id`, `group`, `name`, `state`, `parent_id`, `login`, `type`, `div`, `url`, `func`, `php_class`) VALUES (103, 42, 'user', 'security', 100, 0, 1, '#tab_security', './sai.php?sai_mod=.SYSTEM.SAI.saimod_sys_security&action=user&username=${username}', 'init_saimod_sys_security_user', '\\SYSTEM\\SAI\\saimod_sys_security'); INSERT INTO `system_page` (`id`, `group`, `name`, `state`, `parent_id`, `login`, `type`, `div`, `url`, `func`, `php_class`) VALUES (104, 42, 'newright', 'security', 100, 0, 1, '#tab_security', './sai.php?sai_mod=.SYSTEM.SAI.saimod_sys_security&action=newright', 'init_saimod_sys_security_newright', '\\SYSTEM\\SAI\\saimod_sys_security'); diff --git a/dbd/sql/mysql/data/system_sai_api.sql b/dbd/sql/mysql/data/system_sai_api.sql index de5765f..15735cd 100644 --- a/dbd/sql/mysql/data/system_sai_api.sql +++ b/dbd/sql/mysql/data/system_sai_api.sql @@ -60,7 +60,9 @@ INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `nam INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (300, 42, 0, 0, '_SYSTEM_SAI_saimod_sys_security', 'action', NULL); -- INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (301, 42, 2, 300, 'user', 'username', 'STRING'); -INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (302, 42, 3, 300, 'users', 'search', 'STRING'); +INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (302, 42, 3, 300, 'users', 'filter', 'STRING'); +INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (303, 42, 3, 300, 'users', 'search', 'STRING'); +INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (304, 42, 3, 300, 'users', 'page', 'UINT0'); -- INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (310, 42, 2, 300, 'addright', 'id', 'UINT'); INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (311, 42, 2, 300, 'addright', 'name', 'STRING'); diff --git a/dbd/sql/mysql/data/system_text.sql b/dbd/sql/mysql/data/system_text.sql index dc66e75..34b9ba5 100644 --- a/dbd/sql/mysql/data/system_text.sql +++ b/dbd/sql/mysql/data/system_text.sql @@ -27,6 +27,7 @@ INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_all', 'basic'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_all', 'sai_log'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_all', 'sai_todo'); + INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_all', 'sai_security'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_all', 'sai_text'); DELETE FROM `system_text` WHERE id = 'basic_analytics'; @@ -267,6 +268,7 @@ INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('basic_placeholder_search', 'enUS', 'I\'m searching for...', 0, 0, '2015-04-15 18:29:16', '0000-00-00 00:00:00'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_placeholder_search', 'basic'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_placeholder_search', 'sai_todo'); + INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_placeholder_search', 'sai_security'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_placeholder_search', 'sai_log'); DELETE FROM `system_text` WHERE id = 'basic_progress'; @@ -602,6 +604,14 @@ INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_page', 'basic'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_page', 'sai_todo'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_page', 'sai_log'); + INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_page', 'sai_security'); + + DELETE FROM `system_text` WHERE id = 'basic_add_right'; + DELETE FROM `system_text_tag` WHERE id = 'basic_add_right'; + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('basic_add_right', 'deDE', 'Recht hinzufügen', 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_add_right', 'enUS', 'Add Right', 2, 1, '2015-04-16 23:11:18', '2015-04-16 23:11:18'); + 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'); -- SAI DELETE FROM `system_text` WHERE id = 'sai_api_title'; @@ -964,6 +974,7 @@ INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_id', 'sai_log'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_id', 'sai_todo'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_id', 'sai_text'); + INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_id', 'sai_security'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_id', 'table'); DELETE FROM `system_text` WHERE id = 'table_ip'; @@ -1149,6 +1160,7 @@ INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('table_username', 'enUS', 'Username', 2, 2, '2015-04-18 13:56:53', '2015-04-18 13:56:53'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_username', 'sai_todo'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_username', 'sai_start'); + INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_username', 'sai_security'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_username', 'table'); DELETE FROM `system_text` WHERE id = 'table_open'; @@ -1224,6 +1236,41 @@ INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('table_priority', 'enUS', 'Priority', 2, 2, '2015-04-18 13:56:53', '2015-04-18 13:56:53'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_priority', 'sai_todo'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_priority', 'table'); + + DELETE FROM `system_text` WHERE id = 'table_email'; + DELETE FROM `system_text_tag` WHERE id = 'table_email'; + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('table_email', 'deDE', 'E-Mail', 2, 2, '2015-04-23 01:58:25', '2015-04-23 01:58:25'); + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('table_email', 'enUS', 'EMail', 2, 2, '2015-04-18 13:56:53', '2015-04-18 13:56:53'); + INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_email', 'sai_security'); + INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_email', 'table'); + + DELETE FROM `system_text` WHERE id = 'table_join_date'; + DELETE FROM `system_text_tag` WHERE id = 'table_join_date'; + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('table_join_date', 'deDE', 'Beitrittsdatum', 2, 2, '2015-04-23 01:58:25', '2015-04-23 01:58:25'); + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('table_join_date', 'enUS', 'Join Date', 2, 2, '2015-04-18 13:56:53', '2015-04-18 13:56:53'); + INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_join_date', 'sai_security'); + INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_join_date', 'table'); + + DELETE FROM `system_text` WHERE id = 'table_language'; + DELETE FROM `system_text_tag` WHERE id = 'table_language'; + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('table_language', 'deDE', 'Sprache', 2, 2, '2015-04-23 01:58:25', '2015-04-23 01:58:25'); + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('table_language', 'enUS', 'Language', 2, 2, '2015-04-18 13:56:53', '2015-04-18 13:56:53'); + INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_language', 'sai_security'); + INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_language', 'table'); + + DELETE FROM `system_text` WHERE id = 'table_last_active'; + DELETE FROM `system_text_tag` WHERE id = 'table_last_active'; + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('table_last_active', 'deDE', 'Zuletzt aktiv', 2, 2, '2015-04-23 01:58:25', '2015-04-23 01:58:25'); + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('table_last_active', 'enUS', 'Last active', 2, 2, '2015-04-18 13:56:53', '2015-04-18 13:56:53'); + INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_last_active', 'sai_security'); + INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_last_active', 'table'); + + DELETE FROM `system_text` WHERE id = 'table_reset_password'; + DELETE FROM `system_text_tag` WHERE id = 'table_reset_password'; + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('table_reset_password', 'deDE', 'Passwort zurücksetzen', 2, 2, '2015-04-23 01:58:25', '2015-04-23 01:58:25'); + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('table_reset_password', 'enUS', 'Reset Password', 2, 2, '2015-04-18 13:56:53', '2015-04-18 13:56:53'); + INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_reset_password', 'sai_security'); + INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_reset_password', 'table'); -- Time diff --git a/sai/modules/saimod_sys_security/js/saimod_sys_security.js b/sai/modules/saimod_sys_security/js/saimod_sys_security.js index 8e31b7d..4f52573 100644 --- a/sai/modules/saimod_sys_security/js/saimod_sys_security.js +++ b/sai/modules/saimod_sys_security/js/saimod_sys_security.js @@ -6,15 +6,20 @@ function init_saimod_sys_security() { $(this).parent().addClass('active'); }); - $('#user_go').click(function(){ - system.load('security;search.'+encodeURIComponent($('#user_search').val()));}) }; +function register_search(){ + $('#btn_search').click(function(){ + system.load($(this).attr('state')+$('#input_search').val(),true); + }); +} + function init_saimod_sys_security_users() { $("#sai_mod_security_table").tablesorter(); $('#securitytab li').each(function(){ $(this).removeClass('active');}); $('#menu_users').parent().addClass('active'); + register_search(); } function init_saimod_sys_security_user() { diff --git a/sai/modules/saimod_sys_security/qq/SYS_SAIMOD_SECURITY_USERS.php b/sai/modules/saimod_sys_security/qq/SYS_SAIMOD_SECURITY_USERS.php index 34b1a86..ef68526 100644 --- a/sai/modules/saimod_sys_security/qq/SYS_SAIMOD_SECURITY_USERS.php +++ b/sai/modules/saimod_sys_security/qq/SYS_SAIMOD_SECURITY_USERS.php @@ -5,7 +5,7 @@ class SYS_SAIMOD_SECURITY_USERS extends \SYSTEM\DB\QP { protected static function query(){ return new \SYSTEM\DB\QQuery(get_class(), //pg -'SELECT id,username,email,joindate,locale, EXTRACT(EPOCH FROM last_active) as last_active, account_flag FROM system.user WHERE username LIKE $1 OR email LIKE $1 ORDER BY last_active DESC LIMIT 100;', +'SELECT id,username,email,joindate,locale, EXTRACT(EPOCH FROM last_active) as last_active, account_flag FROM system.user WHERE username LIKE $1 OR email LIKE $1 ORDER BY last_active DESC;', //mys -'SELECT id,username,email,joindate,locale,unix_timestamp(last_active)as last_active, account_flag FROM system_user WHERE username LIKE ? OR email LIKE ? ORDER BY last_active DESC LIMIT 100;' +'SELECT id,username,email,joindate,locale,unix_timestamp(last_active)as last_active, account_flag FROM system_user WHERE username LIKE ? OR email LIKE ? ORDER BY last_active DESC;' );}} \ No newline at end of file diff --git a/sai/modules/saimod_sys_security/qq/SYS_SAIMOD_SECURITY_USERS_FILTER.php b/sai/modules/saimod_sys_security/qq/SYS_SAIMOD_SECURITY_USERS_FILTER.php new file mode 100644 index 0000000..8852704 --- /dev/null +++ b/sai/modules/saimod_sys_security/qq/SYS_SAIMOD_SECURITY_USERS_FILTER.php @@ -0,0 +1,15 @@ +next()){ + public static function sai_mod__SYSTEM_SAI_saimod_sys_security_action_users($filter = "all",$search="%",$page=0){ + $count = $filter == "all" ? \SYSTEM\DBD\SYS_SAIMOD_SECURITY_USER_COUNT::Q1(array($search,$search))['count'] : + \SYSTEM\DBD\SYS_SAIMOD_SECURITY_USER_COUNT_FILTER::Q1(array($search,$search,$filter))['count']; + $vars = array(); + $vars['filter'] = $filter; + $vars['search'] = $search; + $vars['page'] = $page; + $vars['table'] = ''; + $res = $filter == "all" ? \SYSTEM\DBD\SYS_SAIMOD_SECURITY_USERS::QQ(array($search),array($search,$search)) : + \SYSTEM\DBD\SYS_SAIMOD_SECURITY_USERS_FILTER::QQ(array($search,$search,$filter)); + $count_filtered = 0; + $res->seek(100*$page); + while(($r = $res->next()) && ($count_filtered < 100)){ $r['class'] = self::tablerow_class($r['last_active']); $r['time_elapsed'] = \SYSTEM\time::time_ago_string($r['last_active']); - $rows .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_security/tpl/saimod_sys_security_user.tpl'),$r); + $vars['table'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_security/tpl/saimod_sys_security_user.tpl'),$r); + $count_filtered++; } - $vars = array(); - $vars['rows'] = $rows; - $vars['count'] = $count['count']; + $vars['pagination'] = ''; + $vars['page_last'] = ceil($count/100)-1; + for($i=0;$i < ceil($count/100);$i++){ + $data = array('page' => $i,'search' => $search, 'filter' => $filter, 'active' => ($i == $page) ? 'active' : ''); + $vars['pagination'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_security/tpl/saimod_sys_security_pagination.tpl'), $data); + } + $vars['count'] = $count_filtered.'/'.$count; + $vars['right_filter'] = ''; + $res = \SYSTEM\DBD\SYS_SAIMOD_SECURITY_RIGHTS::QQ(); + while($row = $res->next()){ + $data = array('active' => ($filter == $row['ID'] ? 'active' : ''), 'filter' => $row['ID'], 'search' => $search, 'name' => $row['name']); + $vars['right_filter'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_security/tpl/saimod_sys_security_right_filter.tpl'),$data);} + $vars['active'] = ($filter == 'all' ? 'active' : ''); $vars = array_merge($vars,\SYSTEM\PAGE\text::tag(\SYSTEM\DBD\system_text::TAG_SAI_SECURITY)); return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_security/tpl/saimod_sys_security_users.tpl'),$vars); } diff --git a/sai/modules/saimod_sys_security/tpl/saimod_sys_security.tpl b/sai/modules/saimod_sys_security/tpl/saimod_sys_security.tpl index bf46324..c82cb83 100644 --- a/sai/modules/saimod_sys_security/tpl/saimod_sys_security.tpl +++ b/sai/modules/saimod_sys_security/tpl/saimod_sys_security.tpl @@ -5,8 +5,6 @@
  • Users
  • Rights
  • - -
    diff --git a/sai/modules/saimod_sys_security/tpl/saimod_sys_security_pagination.tpl b/sai/modules/saimod_sys_security/tpl/saimod_sys_security_pagination.tpl new file mode 100644 index 0000000..250bd56 --- /dev/null +++ b/sai/modules/saimod_sys_security/tpl/saimod_sys_security_pagination.tpl @@ -0,0 +1 @@ +
  • ${page}
  • \ No newline at end of file diff --git a/sai/modules/saimod_sys_security/tpl/saimod_sys_security_right_filter.tpl b/sai/modules/saimod_sys_security/tpl/saimod_sys_security_right_filter.tpl new file mode 100644 index 0000000..ee0cfd4 --- /dev/null +++ b/sai/modules/saimod_sys_security/tpl/saimod_sys_security_right_filter.tpl @@ -0,0 +1 @@ +
  • ${name}
  • \ No newline at end of file diff --git a/sai/modules/saimod_sys_security/tpl/saimod_sys_security_user.tpl b/sai/modules/saimod_sys_security/tpl/saimod_sys_security_user.tpl index c7d3dc9..925f4b5 100644 --- a/sai/modules/saimod_sys_security/tpl/saimod_sys_security_user.tpl +++ b/sai/modules/saimod_sys_security/tpl/saimod_sys_security_user.tpl @@ -5,11 +5,6 @@ ${joindate} ${locale} ${time_elapsed} - ${account_flag} - diff --git a/sai/modules/saimod_sys_security/tpl/saimod_sys_security_users.tpl b/sai/modules/saimod_sys_security/tpl/saimod_sys_security_users.tpl index ce5a57f..0a32863 100644 --- a/sai/modules/saimod_sys_security/tpl/saimod_sys_security_users.tpl +++ b/sai/modules/saimod_sys_security/tpl/saimod_sys_security_users.tpl @@ -1,19 +1,26 @@ -Users: ${count} - - + +
    +
    ${basic_rows}: ${count} ${basic_page}: ${page}
    +
    - - - - - - - - - + + + + + + + - - - ${rows} - -
    IDUsernameE-MailJoinDateLocaleLast ActiveFlagreset password${table_id}${table_username}${table_email}${table_join_date}${table_language}${table_last_active}${table_reset_password}
    \ No newline at end of file + ${table} + +
      +
    • «
    • + ${pagination} +
    • »
    • +
    +
    \ No newline at end of file From 51522c1646cb0ee1e62de8ed95a7a745ae1d0049 Mon Sep 17 00:00:00 2001 From: rylon Date: Fri, 12 Jun 2015 19:45:50 +0200 Subject: [PATCH 14/24] saimod text pagination, search, filter --- dbd/sql/mysql/data/system_page.sql | 4 +- dbd/sql/mysql/data/system_sai_api.sql | 5 +- dbd/sql/mysql/data/system_text.sql | 4 ++ .../saimod_sys_text/js/saimod_sys_text.js | 18 +++--- .../qq/SYS_SAIMOD_TEXT_COUNT.php | 15 +++++ .../qq/SYS_SAIMOD_TEXT_COUNT_FILTER.php | 16 +++++ .../qq/SYS_SAIMOD_TEXT_COUNT_NOTAG.php | 19 ++++++ .../qq/SYS_SAIMOD_TEXT_COUNT_NOTAG_FILTER.php | 20 ++++++ .../qq/SYS_SAIMOD_TEXT_COUNT_TAG.php | 17 ++++++ .../qq/SYS_SAIMOD_TEXT_COUNT_TAG_FILTER.php | 18 ++++++ .../qq/SYS_SAIMOD_TEXT_GETTEXTS.php | 22 ------- .../qq/SYS_SAIMOD_TEXT_GETTEXTS_ALL.php | 21 ------- .../qq/SYS_SAIMOD_TEXT_GETTEXTS_NOTAG.php | 23 ------- .../qq/SYS_SAIMOD_TEXT_TEXT.php | 18 ++++++ .../qq/SYS_SAIMOD_TEXT_TEXT_FILTER.php | 19 ++++++ .../qq/SYS_SAIMOD_TEXT_TEXT_NOTAG.php | 22 +++++++ .../qq/SYS_SAIMOD_TEXT_TEXT_NOTAG_FILTER.php | 23 +++++++ .../qq/SYS_SAIMOD_TEXT_TEXT_TAG.php | 19 ++++++ .../qq/SYS_SAIMOD_TEXT_TEXT_TAG_FILTER.php | 19 ++++++ .../saimod_sys_text/saimod_sys_text.php | 61 ++++++++++++++++--- .../saimod_sys_text/tpl/saimod_sys_text.tpl | 2 +- .../tpl/saimod_sys_text_lang_filter.tpl | 1 + .../tpl/saimod_sys_text_list.tpl | 22 +++++-- .../tpl/saimod_sys_text_list_entry.tpl | 2 +- .../tpl/saimod_sys_text_pagination.tpl | 1 + 25 files changed, 315 insertions(+), 96 deletions(-) create mode 100644 sai/modules/saimod_sys_text/qq/SYS_SAIMOD_TEXT_COUNT.php create mode 100644 sai/modules/saimod_sys_text/qq/SYS_SAIMOD_TEXT_COUNT_FILTER.php create mode 100644 sai/modules/saimod_sys_text/qq/SYS_SAIMOD_TEXT_COUNT_NOTAG.php create mode 100644 sai/modules/saimod_sys_text/qq/SYS_SAIMOD_TEXT_COUNT_NOTAG_FILTER.php create mode 100644 sai/modules/saimod_sys_text/qq/SYS_SAIMOD_TEXT_COUNT_TAG.php create mode 100644 sai/modules/saimod_sys_text/qq/SYS_SAIMOD_TEXT_COUNT_TAG_FILTER.php delete mode 100644 sai/modules/saimod_sys_text/qq/SYS_SAIMOD_TEXT_GETTEXTS.php delete mode 100644 sai/modules/saimod_sys_text/qq/SYS_SAIMOD_TEXT_GETTEXTS_ALL.php delete mode 100644 sai/modules/saimod_sys_text/qq/SYS_SAIMOD_TEXT_GETTEXTS_NOTAG.php create mode 100644 sai/modules/saimod_sys_text/qq/SYS_SAIMOD_TEXT_TEXT.php create mode 100644 sai/modules/saimod_sys_text/qq/SYS_SAIMOD_TEXT_TEXT_FILTER.php create mode 100644 sai/modules/saimod_sys_text/qq/SYS_SAIMOD_TEXT_TEXT_NOTAG.php create mode 100644 sai/modules/saimod_sys_text/qq/SYS_SAIMOD_TEXT_TEXT_NOTAG_FILTER.php create mode 100644 sai/modules/saimod_sys_text/qq/SYS_SAIMOD_TEXT_TEXT_TAG.php create mode 100644 sai/modules/saimod_sys_text/qq/SYS_SAIMOD_TEXT_TEXT_TAG_FILTER.php create mode 100644 sai/modules/saimod_sys_text/tpl/saimod_sys_text_lang_filter.tpl create mode 100644 sai/modules/saimod_sys_text/tpl/saimod_sys_text_pagination.tpl diff --git a/dbd/sql/mysql/data/system_page.sql b/dbd/sql/mysql/data/system_page.sql index 4cd2088..170bd28 100644 --- a/dbd/sql/mysql/data/system_page.sql +++ b/dbd/sql/mysql/data/system_page.sql @@ -43,8 +43,8 @@ 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 (105, 42, 'delright', 'security', 100, 0, 1, '#tab_security', './sai.php?sai_mod=.SYSTEM.SAI.saimod_sys_security&action=deleterightconfirm&id=${id}', 'init_saimod_sys_security_delright', '\\SYSTEM\\SAI\\saimod_sys_security'); INSERT INTO `system_page` (`id`, `group`, `name`, `state`, `parent_id`, `login`, `type`, `div`, `url`, `func`, `php_class`) VALUES (110, 42, 'text', 'text', -1, 0, 0, '#content', './sai.php?sai_mod=.SYSTEM.SAI.saimod_sys_text', 'init_saimod_sys_text', '\\SYSTEM\\SAI\\saimod_sys_text'); -INSERT INTO `system_page` (`id`, `group`, `name`, `state`, `parent_id`, `login`, `type`, `div`, `url`, `func`, `php_class`) VALUES (111, 42, 'tag', 'text', 110, 0, 0, '#tab_content', './sai.php?sai_mod=.SYSTEM.SAI.saimod_sys_text&action=tag&tag=${tag}', 'init_saimod_sys_text_tag', '\\SYSTEM\\SAI\\saimod_sys_text'); -INSERT INTO `system_page` (`id`, `group`, `name`, `state`, `parent_id`, `login`, `type`, `div`, `url`, `func`, `php_class`) VALUES (112, 42, 'notag', 'text', 110, 0, 1, '#tab_content', './sai.php?sai_mod=.SYSTEM.SAI.saimod_sys_text&action=notag', 'init_saimod_sys_text_notag', '\\SYSTEM\\SAI\\saimod_sys_text'); +INSERT INTO `system_page` (`id`, `group`, `name`, `state`, `parent_id`, `login`, `type`, `div`, `url`, `func`, `php_class`) VALUES (111, 42, 'tag', 'text', 110, 0, 0, '#tab_content', './sai.php?sai_mod=.SYSTEM.SAI.saimod_sys_text&action=tag&tag=${tag}&filter=${filter}&search=${search}&page=${page}', 'init_saimod_sys_text_tag', '\\SYSTEM\\SAI\\saimod_sys_text'); +-- INSERT INTO `system_page` (`id`, `group`, `name`, `state`, `parent_id`, `login`, `type`, `div`, `url`, `func`, `php_class`) VALUES (112, 42, 'notag', 'text', 110, 0, 1, '#tab_content', './sai.php?sai_mod=.SYSTEM.SAI.saimod_sys_text&action=notag', 'init_saimod_sys_text_notag', '\\SYSTEM\\SAI\\saimod_sys_text'); INSERT INTO `system_page` (`id`, `group`, `name`, `state`, `parent_id`, `login`, `type`, `div`, `url`, `func`, `php_class`) VALUES (115, 42, 'edittext', 'text', 110, 0, 1, '#tab_content', './sai.php?sai_mod=.SYSTEM.SAI.saimod_sys_text&action=edittext&id=${id}&lang=${lang}', '', ''); INSERT INTO `system_page` (`id`, `group`, `name`, `state`, `parent_id`, `login`, `type`, `div`, `url`, `func`, `php_class`) VALUES (116, 42, 'editor', 'text', 115, 0, 1, '#tab_editor', './sai.php?sai_mod=.SYSTEM.SAI.saimod_sys_text&action=editor&id=${id}&lang=${lang}', 'init_saimod_sys_text_editor', '\\SYSTEM\\SAI\\saimod_sys_text'); diff --git a/dbd/sql/mysql/data/system_sai_api.sql b/dbd/sql/mysql/data/system_sai_api.sql index 15735cd..b79db12 100644 --- a/dbd/sql/mysql/data/system_sai_api.sql +++ b/dbd/sql/mysql/data/system_sai_api.sql @@ -102,7 +102,10 @@ INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `nam INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (700, 42, 0, 0, '_SYSTEM_SAI_saimod_sys_text', 'action', NULL); -- INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (703, 42, 3, 700, 'tag', 'tag', 'STRING'); -INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (705, 42, 2, 700, 'loadByTag', 'lang', 'LANG'); +INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (704, 42, 3, 700, 'tag', 'filter', 'STRING'); +INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (705, 42, 3, 700, 'tag', 'search', 'STRING'); +INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (706, 42, 3, 700, 'tag', 'page', 'UINT0'); +INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (710, 42, 2, 700, 'loadByTag', 'lang', 'LANG'); -- INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (712, 42, 2, 700, 'edittext', 'id', 'STRING'); INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (713, 42, 2, 700, 'edittext', 'lang', 'LANG'); diff --git a/dbd/sql/mysql/data/system_text.sql b/dbd/sql/mysql/data/system_text.sql index 34b9ba5..ed3a0d2 100644 --- a/dbd/sql/mysql/data/system_text.sql +++ b/dbd/sql/mysql/data/system_text.sql @@ -270,6 +270,7 @@ INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_placeholder_search', 'sai_todo'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_placeholder_search', 'sai_security'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_placeholder_search', 'sai_log'); + INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_placeholder_search', 'sai_text'); DELETE FROM `system_text` WHERE id = 'basic_progress'; DELETE FROM `system_text_tag` WHERE id = 'basic_progress'; @@ -306,6 +307,7 @@ INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_rows', 'basic'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_rows', 'sai_log'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_rows', 'sai_todo'); + INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_rows', 'sai_text'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_rows', 'sai_security'); DELETE FROM `system_text` WHERE id = 'basic_save'; @@ -467,6 +469,7 @@ INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_search', 'basic'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_search', 'sai_security'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_search', 'sai_todo'); + INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_search', 'sai_text'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_search', 'sai_log'); DELETE FROM `system_text` WHERE id = 'basic_send_email'; @@ -604,6 +607,7 @@ INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_page', 'basic'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_page', 'sai_todo'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_page', 'sai_log'); + INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_page', 'sai_text'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_page', 'sai_security'); DELETE FROM `system_text` WHERE id = 'basic_add_right'; diff --git a/sai/modules/saimod_sys_text/js/saimod_sys_text.js b/sai/modules/saimod_sys_text/js/saimod_sys_text.js index 9a18ae9..c100e49 100644 --- a/sai/modules/saimod_sys_text/js/saimod_sys_text.js +++ b/sai/modules/saimod_sys_text/js/saimod_sys_text.js @@ -13,11 +13,17 @@ function init_saimod_sys_text() { }); } +function register_search(){ + $('#btn_search').click(function(){ + system.load($(this).attr('state')+$('#input_search').val(),true); + }); +} + function text_menu(){ $('#tabs_text li').each(function(){ $(this).removeClass('active');}); if(system.cur_state().split('.')[1]){ - $('#menu_tag_'+system.cur_state().split(';')[1].split('.')[1]).parent().addClass('active'); + $('#menu_tag_'+system.cur_state().split(';')[1].split('.')[1].split(';')[0]).parent().addClass('active'); } else { $('#menu_tag_all').parent().addClass('active');} }; @@ -26,22 +32,16 @@ function text2_menu(){ $('#tabs2_text li').each(function(){ $(this).removeClass('active');}); if($('#menu_lang_'+system.cur_state().split('.')[2]).length){ - $('#menu_lang_'+system.cur_state().split('.')[2]).parent().addClass('active'); + $('#menu_lang_'+system.cur_state().split('.')[2].split(';')[0]).parent().addClass('active'); } else { $('.menu_lang_default').parent().addClass('active');} }; -function init_saimod_sys_text_notag(){ - $("#sai_mod_text_table").tablesorter(); - $('#tabs_text li').each(function(){ - $(this).removeClass('active');}); - $('#menu_tag_notag').parent().addClass('active'); -} - function init_saimod_sys_text_tag(){ $("#sai_mod_text_table").tablesorter(); text_menu(); text2_menu(); + register_search(); }; function init_saimod_sys_text_editor(){ diff --git a/sai/modules/saimod_sys_text/qq/SYS_SAIMOD_TEXT_COUNT.php b/sai/modules/saimod_sys_text/qq/SYS_SAIMOD_TEXT_COUNT.php new file mode 100644 index 0000000..04f13c5 --- /dev/null +++ b/sai/modules/saimod_sys_text/qq/SYS_SAIMOD_TEXT_COUNT.php @@ -0,0 +1,15 @@ +next()){ - $entries .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_text/tpl/saimod_sys_text_list_entry.tpl'), $r); + if($filter == 'all'){ + $count = \SYSTEM\DBD\SYS_SAIMOD_TEXT_COUNT_TAG::Q1(array($tag,$search,$search,$search))['count']; + $res = \SYSTEM\DBD\SYS_SAIMOD_TEXT_TEXT_TAG::QQ(array($tag,$search,$search,$search)); + } else { + $count = \SYSTEM\DBD\SYS_SAIMOD_TEXT_COUNT_TAG_FILTER::Q1(array($tag,$filter,$search,$search,$search))['count']; + $res = \SYSTEM\DBD\SYS_SAIMOD_TEXT_TEXT_TAG_FILTER::QQ(array($tag,$filter,$search,$search,$search)); + } } - $vars = \SYSTEM\PAGE\text::tag(\SYSTEM\DBD\system_text::TAG_SAI_TEXT); - $vars['entries'] = $entries; + $vars = array(); + $vars['tag'] = $tag; + $vars['filter'] = $filter; + $vars['search'] = $search; + $vars['page'] = $page; + $vars['entries'] = ''; + $count_filtered = 0; + $res->seek(100*$page); + while(($r = $res->next()) && ($count_filtered < 100)){ + $vars['entries'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_text/tpl/saimod_sys_text_list_entry.tpl'), $r); + $count_filtered++;} + $vars['pagination'] = ''; + $vars['page_last'] = ceil($count/100)-1; + for($i=0;$i < ceil($count/100);$i++){ + $data = array('page' => $i,'search' => $search, 'filter' => $filter, 'active' => ($i == $page) ? 'active' : '', 'tag' => $tag); + $vars['pagination'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_text/tpl/saimod_sys_text_pagination.tpl'), $data); + } + $vars['count'] = $count_filtered.'/'.$count; + $vars['lang_filter'] = ''; + $res = \SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_LANGS); + foreach($res as $lang){ + $data = array('active' => ($filter == $lang ? 'active' : ''), 'filter' => $lang, 'search' => $search, 'name' => $lang, 'tag' => $tag); + $vars['lang_filter'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_text/tpl/saimod_sys_text_lang_filter.tpl'),$data);} + $vars['active'] = ($filter == 'all' ? 'active' : ''); + $vars = array_merge($vars,\SYSTEM\PAGE\text::tag(\SYSTEM\DBD\system_text::TAG_SAI_TEXT)); return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_text/tpl/saimod_sys_text_list.tpl'), $vars); } diff --git a/sai/modules/saimod_sys_text/tpl/saimod_sys_text.tpl b/sai/modules/saimod_sys_text/tpl/saimod_sys_text.tpl index 84b1eb8..f72f450 100644 --- a/sai/modules/saimod_sys_text/tpl/saimod_sys_text.tpl +++ b/sai/modules/saimod_sys_text/tpl/saimod_sys_text.tpl @@ -3,7 +3,7 @@
    \ No newline at end of file diff --git a/sai/modules/saimod_sys_text/tpl/saimod_sys_text_list_entry.tpl b/sai/modules/saimod_sys_text/tpl/saimod_sys_text_list_entry.tpl index bcc0694..0fd81ff 100644 --- a/sai/modules/saimod_sys_text/tpl/saimod_sys_text_list_entry.tpl +++ b/sai/modules/saimod_sys_text/tpl/saimod_sys_text_list_entry.tpl @@ -1,6 +1,6 @@ ${id} - ${lang} (${count}) + ${lang} ${text} ${author_name} ${time_create} diff --git a/sai/modules/saimod_sys_text/tpl/saimod_sys_text_pagination.tpl b/sai/modules/saimod_sys_text/tpl/saimod_sys_text_pagination.tpl new file mode 100644 index 0000000..900428f --- /dev/null +++ b/sai/modules/saimod_sys_text/tpl/saimod_sys_text_pagination.tpl @@ -0,0 +1 @@ +
  • ${page}
  • \ No newline at end of file From 1926999f3eac45592e7ca5e8e0889cbd58dc16f2 Mon Sep 17 00:00:00 2001 From: rylon Date: Fri, 12 Jun 2015 21:18:10 +0200 Subject: [PATCH 15/24] saimod todo small fix for searchfield --- sai/modules/saimod_sys_text/js/saimod_sys_text.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sai/modules/saimod_sys_text/js/saimod_sys_text.js b/sai/modules/saimod_sys_text/js/saimod_sys_text.js index c100e49..ca7934a 100644 --- a/sai/modules/saimod_sys_text/js/saimod_sys_text.js +++ b/sai/modules/saimod_sys_text/js/saimod_sys_text.js @@ -39,9 +39,9 @@ function text2_menu(){ function init_saimod_sys_text_tag(){ $("#sai_mod_text_table").tablesorter(); - text_menu(); - text2_menu(); - register_search(); + register_search(); + text_menu(); + text2_menu(); }; function init_saimod_sys_text_editor(){ From 2bbebe581fb7ba64da882aaee28ec4e28eee9d60 Mon Sep 17 00:00:00 2001 From: rylon Date: Sat, 13 Jun 2015 11:23:06 +0200 Subject: [PATCH 16/24] implemented todo bug report, as well as coresponding api call --- api/api_system.php | 3 ++ dbd/sql/mysql/data/system_api.sql | 7 +++ dbd/sql/mysql/data/system_sai_api.sql | 2 + .../qq/SYS_SAIMOD_TODO_EXCEPTION_INSERT.php | 17 ++----- .../SYS_SAIMOD_TODO_USER_EXCEPTION_INSERT.php | 33 -------------- .../saimod_sys_todo/saimod_sys_todo.php | 44 ++++++------------- 6 files changed, 30 insertions(+), 76 deletions(-) delete mode 100644 sai/modules/saimod_sys_todo/qq/SYS_SAIMOD_TODO_USER_EXCEPTION_INSERT.php diff --git a/api/api_system.php b/api/api_system.php index 832ca95..64fd869 100644 --- a/api/api_system.php +++ b/api/api_system.php @@ -19,4 +19,7 @@ class api_system extends api_login{ \SYSTEM\locale::set($lang);} public static function static__result($result){ \SYSTEM\CONFIG\config::set(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DEFAULT_RESULT, $result);} + + public static function call_bug($message,$data){ + return \SYSTEM\SAI\saimod_sys_todo::report($message,$data);} } \ No newline at end of file diff --git a/dbd/sql/mysql/data/system_api.sql b/dbd/sql/mysql/data/system_api.sql index 4ac7aff..8e48fb9 100644 --- a/dbd/sql/mysql/data/system_api.sql +++ b/dbd/sql/mysql/data/system_api.sql @@ -20,6 +20,13 @@ INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `nam INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (50, 0, 2, 10, 'pages', 'group', 'UINT'); INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (51, 0, 2, 10, 'pages', 'state', 'STRING'); +INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (52, 0, 1, 50, NULL, 'js', NULL); +INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (53, 0, 2, 51, NULL, 'group', 'UINT'); +INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (55, 0, 1, 50, NULL, 'css', NULL); +INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (56, 0, 2, 55, NULL, 'group', 'UINT'); + +INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (60, 0, 2, 10, 'bug', 'message', 'STRING'); +INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (61, 0, 2, 10, 'bug', 'data', 'JSON'); INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (90, 0, 4, -1, NULL, '_lang', 'LANG'); INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (91, 0, 4, -1, NULL, '_result', 'RESULT'); diff --git a/dbd/sql/mysql/data/system_sai_api.sql b/dbd/sql/mysql/data/system_sai_api.sql index b79db12..e822f8a 100644 --- a/dbd/sql/mysql/data/system_sai_api.sql +++ b/dbd/sql/mysql/data/system_sai_api.sql @@ -27,6 +27,8 @@ INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `nam INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (53, 42, 2, 51, NULL, 'group', 'UINT'); INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (55, 42, 1, 50, NULL, 'css', NULL); INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (56, 42, 2, 55, NULL, 'group', 'UINT'); +INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (60, 42, 2, 10, 'bug', 'message', 'STRING'); +INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (61, 42, 2, 10, 'bug', 'data', 'JSON'); INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (90, 42, 4, -1, NULL, '_lang', 'LANG'); INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (91, 42, 4, -1, NULL, '_result', 'RESULT'); INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (92, 42, 4, -1, NULL, '_escaped_fragment_', 'STRING'); diff --git a/sai/modules/saimod_sys_todo/qq/SYS_SAIMOD_TODO_EXCEPTION_INSERT.php b/sai/modules/saimod_sys_todo/qq/SYS_SAIMOD_TODO_EXCEPTION_INSERT.php index fce1c3b..54b2392 100644 --- a/sai/modules/saimod_sys_todo/qq/SYS_SAIMOD_TODO_EXCEPTION_INSERT.php +++ b/sai/modules/saimod_sys_todo/qq/SYS_SAIMOD_TODO_EXCEPTION_INSERT.php @@ -5,17 +5,7 @@ class SYS_SAIMOD_TODO_EXCEPTION_INSERT extends \SYSTEM\DB\QP { protected static function query(){ return new \SYSTEM\DB\QQuery(get_class(), //pg -'INSERT INTO '.\SYSTEM\DBD\system_todo::NAME_PG. -'("'.\SYSTEM\DBD\system_todo::FIELD_CLASS.'","'.\SYSTEM\DBD\system_todo::FIELD_MESSAGE.'","'. - \SYSTEM\DBD\system_todo::FIELD_CODE.'","'.\SYSTEM\DBD\system_todo::FIELD_FILE.'","'. - \SYSTEM\DBD\system_todo::FIELD_LINE.'","'.\SYSTEM\DBD\system_todo::FIELD_TRACE.'","'. - \SYSTEM\DBD\system_todo::FIELD_IP.'","'.\SYSTEM\DBD\system_todo::FIELD_QUERYTIME.'","'. - \SYSTEM\DBD\system_todo::FIELD_SERVER_NAME.'","'.\SYSTEM\DBD\system_todo::FIELD_SERVER_PORT.'","'. - \SYSTEM\DBD\system_todo::FIELD_REQUEST_URI.'","'.\SYSTEM\DBD\system_todo::FIELD_POST.'","'. - \SYSTEM\DBD\system_todo::FIELD_HTTP_REFERER.'","'.\SYSTEM\DBD\system_todo::FIELD_HTTP_USER_AGENT.'","'. - \SYSTEM\DBD\system_todo::FIELD_USER.'","'.\SYSTEM\DBD\system_todo::FIELD_THROWN.'","'.\SYSTEM\DBD\system_todo::FIELD_MESSAGE_HASH.'")'. -'VALUES($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17)'. -';',//'ON DUPLICATE KEY UPDATE '.\SYSTEM\DBD\system_todo::FIELD_COUNT.'='.\SYSTEM\DBD\system_todo::FIELD_COUNT.'+1, '.\SYSTEM\DBD\system_todo::FIELD_TIME.'=VALUES('.\SYSTEM\DBD\system_todo::FIELD_TIME.'), '.\SYSTEM\DBD\system_todo::FIELD_STATE.'='.\SYSTEM\DBD\system_todo::FIELD_STATE_OPEN.';', +'todo', //mys 'INSERT INTO '.\SYSTEM\DBD\system_todo::NAME_MYS. '('.\SYSTEM\DBD\system_todo::FIELD_CLASS.','.\SYSTEM\DBD\system_todo::FIELD_MESSAGE.','. @@ -26,8 +16,9 @@ class SYS_SAIMOD_TODO_EXCEPTION_INSERT extends \SYSTEM\DB\QP { \SYSTEM\DBD\system_todo::FIELD_SERVER_PORT.','.\SYSTEM\DBD\system_todo::FIELD_REQUEST_URI.','. \SYSTEM\DBD\system_todo::FIELD_POST.','.\SYSTEM\DBD\system_todo::FIELD_HTTP_REFERER.','. \SYSTEM\DBD\system_todo::FIELD_HTTP_USER_AGENT.','.\SYSTEM\DBD\system_todo::FIELD_USER.','. - \SYSTEM\DBD\system_todo::FIELD_THROWN.','.\SYSTEM\DBD\system_todo::FIELD_MESSAGE_HASH.')'. -'VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, SHA1(?))'. + \SYSTEM\DBD\system_todo::FIELD_THROWN.','.\SYSTEM\DBD\system_todo::FIELD_MESSAGE_HASH.','. + \SYSTEM\DBD\system_todo::FIELD_TYPE.')'. +'VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, SHA1(?),?)'. 'ON DUPLICATE KEY '. ' UPDATE '. \SYSTEM\DBD\system_todo::FIELD_COUNT.'='.\SYSTEM\DBD\system_todo::FIELD_COUNT.'+1, '. \SYSTEM\DBD\system_todo::FIELD_TIME.'=VALUES('.\SYSTEM\DBD\system_todo::FIELD_TIME.'), '. diff --git a/sai/modules/saimod_sys_todo/qq/SYS_SAIMOD_TODO_USER_EXCEPTION_INSERT.php b/sai/modules/saimod_sys_todo/qq/SYS_SAIMOD_TODO_USER_EXCEPTION_INSERT.php deleted file mode 100644 index da39fbc..0000000 --- a/sai/modules/saimod_sys_todo/qq/SYS_SAIMOD_TODO_USER_EXCEPTION_INSERT.php +++ /dev/null @@ -1,33 +0,0 @@ -todo_logged){ return false;} //alrdy logged(this prevents proper thrown value for every system exception) - if($user){ - \SYSTEM\DBD\SYS_SAIMOD_TODO_USER_EXCEPTION_INSERT::Q1( array( get_class($E), $E->getMessage(), $E->getCode(), $E->getFile(), $E->getLine(), $E->getTraceAsString(), - getenv('REMOTE_ADDR'),round(microtime(true) - \SYSTEM\time::getStartTime(),5), - $_SERVER["SERVER_NAME"],$_SERVER["SERVER_PORT"],$_SERVER['REQUEST_URI'], serialize($_POST), - array_key_exists('HTTP_REFERER', $_SERVER) ? $_SERVER['HTTP_REFERER'] : null, - array_key_exists('HTTP_USER_AGENT',$_SERVER) ? $_SERVER['HTTP_USER_AGENT'] : null, - ($user = \SYSTEM\SECURITY\Security::getUser()) ? $user->id : null, $thrown ? 1 : 0, sha1($E->getMessage())), - array( get_class($E), $E->getMessage(), $E->getCode(), $E->getFile(), $E->getLine(), $E->getTraceAsString(), - getenv('REMOTE_ADDR'),round(microtime(true) - \SYSTEM\time::getStartTime(),5),date('Y-m-d H:i:s', microtime(true)), - $_SERVER["SERVER_NAME"],$_SERVER["SERVER_PORT"],$_SERVER['REQUEST_URI'], serialize($_POST), - array_key_exists('HTTP_REFERER', $_SERVER) ? $_SERVER['HTTP_REFERER'] : null, - array_key_exists('HTTP_USER_AGENT',$_SERVER) ? $_SERVER['HTTP_USER_AGENT'] : null, - ($user = \SYSTEM\SECURITY\Security::getUser()) ? $user->id : null,$thrown,$E->getMessage())); - } else { - \SYSTEM\DBD\SYS_SAIMOD_TODO_EXCEPTION_INSERT::Q1( array( get_class($E), $E->getMessage(), $E->getCode(), $E->getFile(), $E->getLine(), $E->getTraceAsString(), - getenv('REMOTE_ADDR'),round(microtime(true) - \SYSTEM\time::getStartTime(),5), - $_SERVER["SERVER_NAME"],$_SERVER["SERVER_PORT"],$_SERVER['REQUEST_URI'], serialize($_POST), - array_key_exists('HTTP_REFERER', $_SERVER) ? $_SERVER['HTTP_REFERER'] : null, - array_key_exists('HTTP_USER_AGENT',$_SERVER) ? $_SERVER['HTTP_USER_AGENT'] : null, - ($user = \SYSTEM\SECURITY\Security::getUser()) ? $user->id : null, $thrown ? 1 : 0, sha1($E->getMessage())), - array( get_class($E), $E->getMessage(), $E->getCode(), $E->getFile(), $E->getLine(), $E->getTraceAsString(), - getenv('REMOTE_ADDR'),round(microtime(true) - \SYSTEM\time::getStartTime(),5),date('Y-m-d H:i:s', microtime(true)), - $_SERVER["SERVER_NAME"],$_SERVER["SERVER_PORT"],$_SERVER['REQUEST_URI'], serialize($_POST), - array_key_exists('HTTP_REFERER', $_SERVER) ? $_SERVER['HTTP_REFERER'] : null, - array_key_exists('HTTP_USER_AGENT',$_SERVER) ? $_SERVER['HTTP_USER_AGENT'] : null, - ($user = \SYSTEM\SECURITY\Security::getUser()) ? $user->id : null,$thrown,$E->getMessage())); - } + + \SYSTEM\DBD\SYS_SAIMOD_TODO_EXCEPTION_INSERT::Q1( array( get_class($E), $E->getMessage(), $E->getCode(), $E->getFile(), $E->getLine(), $E->getTraceAsString(), + getenv('REMOTE_ADDR'),round(microtime(true) - \SYSTEM\time::getStartTime(),5),date('Y-m-d H:i:s', microtime(true)), + $_SERVER["SERVER_NAME"],$_SERVER["SERVER_PORT"],$_SERVER['REQUEST_URI'], serialize($_POST), + array_key_exists('HTTP_REFERER', $_SERVER) ? $_SERVER['HTTP_REFERER'] : null, + array_key_exists('HTTP_USER_AGENT',$_SERVER) ? $_SERVER['HTTP_USER_AGENT'] : null, + ($user = \SYSTEM\SECURITY\Security::getUser()) ? $user->id : null,$thrown,$E->getMessage(),$type)); if(\property_exists(get_class($E), 'logged')){ $E->todo_logged = true;} //we just did log } catch (\Exception $E){return false;} //Error -> Ignore - return false; //We just log and do not handle the error! } } \ No newline at end of file From 4847d8ef26cfb2bc822900984f1cb5800ca2f87b Mon Sep 17 00:00:00 2001 From: rylon Date: Sat, 13 Jun 2015 13:58:36 +0200 Subject: [PATCH 17/24] removed old qq, changed order of extraction of sqlite export --- dbd/qq/SYS_LOG_MONTH.php | 4 ++-- dbd/qq/SYS_LOG_MONTH_DEL.php | 11 ----------- 2 files changed, 2 insertions(+), 13 deletions(-) delete mode 100644 dbd/qq/SYS_LOG_MONTH_DEL.php diff --git a/dbd/qq/SYS_LOG_MONTH.php b/dbd/qq/SYS_LOG_MONTH.php index 19ddf45..8501a9a 100644 --- a/dbd/qq/SYS_LOG_MONTH.php +++ b/dbd/qq/SYS_LOG_MONTH.php @@ -5,7 +5,7 @@ class SYS_LOG_MONTH extends \SYSTEM\DB\QP { protected static function query(){ return new \SYSTEM\DB\QQuery(get_class(), //pg -'SELECT extract(epoch from time) as time_pg,* FROM '.\SYSTEM\DBD\system_log::NAME_PG.' WHERE EXTRACT(MONTH FROM time)::INTEGER = $1 AND EXTRACT(YEAR FROM time)::INTEGER = $2 LIMIT 10000;',//ORDER BY time ASC +'todo', //mys -'SELECT * FROM '.\SYSTEM\DBD\system_log::NAME_MYS.' WHERE MONTH(time) = ? AND YEAR(time) = ? ORDER BY time ASC LIMIT 10000;' +'SELECT * FROM '.\SYSTEM\DBD\system_log::NAME_MYS.' WHERE MONTH(time) = ? AND YEAR(time) = ? ORDER BY time DESC LIMIT 10000;' );}} \ No newline at end of file diff --git a/dbd/qq/SYS_LOG_MONTH_DEL.php b/dbd/qq/SYS_LOG_MONTH_DEL.php deleted file mode 100644 index ce1a642..0000000 --- a/dbd/qq/SYS_LOG_MONTH_DEL.php +++ /dev/null @@ -1,11 +0,0 @@ - Date: Sat, 13 Jun 2015 15:40:32 +0200 Subject: [PATCH 18/24] added lib/bootstrap_growl/ --- lib/autoload.inc | 3 ++- lib/bootstrap_growl | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) create mode 160000 lib/bootstrap_growl diff --git a/lib/autoload.inc b/lib/autoload.inc index 4c4865a..62dcd8a 100644 --- a/lib/autoload.inc +++ b/lib/autoload.inc @@ -8,4 +8,5 @@ require_once dirname(__FILE__).'/bootstrap/autoload.inc'; require_once dirname(__FILE__).'/tinymce/autoload.inc'; require_once dirname(__FILE__).'/textillate/autoload.inc'; require_once dirname(__FILE__).'/animate/autoload.inc'; -require_once dirname(__FILE__).'/lettering/autoload.inc'; \ No newline at end of file +require_once dirname(__FILE__).'/lettering/autoload.inc'; +require_once dirname(__FILE__).'/bootstrap-growl/autoload.inc'; \ No newline at end of file diff --git a/lib/bootstrap_growl b/lib/bootstrap_growl new file mode 160000 index 0000000..49319a0 --- /dev/null +++ b/lib/bootstrap_growl @@ -0,0 +1 @@ +Subproject commit 49319a08905fe6eb70a437ca5454df3f2a7497e6 From 694489df4ef692bffb4a52670cfcaeac15feed49 Mon Sep 17 00:00:00 2001 From: Messerbill Date: Sat, 13 Jun 2015 15:52:03 +0200 Subject: [PATCH 19/24] linked-in growl --- sai/page/default_page.php | 1 + 1 file changed, 1 insertion(+) diff --git a/sai/page/default_page.php b/sai/page/default_page.php index a5d9f65..4087961 100644 --- a/sai/page/default_page.php +++ b/sai/page/default_page.php @@ -44,6 +44,7 @@ class default_page extends \SYSTEM\PAGE\Page { ''. ''. ''. + ''. ''. ''. //''. From a7c1903f58d0cc0bc380963d987a496d3632497a Mon Sep 17 00:00:00 2001 From: Messerbill Date: Sat, 13 Jun 2015 15:58:58 +0200 Subject: [PATCH 20/24] path changes --- lib/autoload.inc | 2 +- lib/bootstrap_growl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/autoload.inc b/lib/autoload.inc index 62dcd8a..d3f46f9 100644 --- a/lib/autoload.inc +++ b/lib/autoload.inc @@ -9,4 +9,4 @@ require_once dirname(__FILE__).'/tinymce/autoload.inc'; require_once dirname(__FILE__).'/textillate/autoload.inc'; require_once dirname(__FILE__).'/animate/autoload.inc'; require_once dirname(__FILE__).'/lettering/autoload.inc'; -require_once dirname(__FILE__).'/bootstrap-growl/autoload.inc'; \ No newline at end of file +require_once dirname(__FILE__).'/bootstrap_growl/autoload.inc'; \ No newline at end of file diff --git a/lib/bootstrap_growl b/lib/bootstrap_growl index 49319a0..481a603 160000 --- a/lib/bootstrap_growl +++ b/lib/bootstrap_growl @@ -1 +1 @@ -Subproject commit 49319a08905fe6eb70a437ca5454df3f2a7497e6 +Subproject commit 481a60301d5df6ddb59beb179317d2764c54c6bd From c07ecdb07cfd19b491072ab84dd90918bb5505e0 Mon Sep 17 00:00:00 2001 From: Messerbill Date: Sat, 13 Jun 2015 15:59:24 +0200 Subject: [PATCH 21/24] path changes growl --- sai/page/default_page.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sai/page/default_page.php b/sai/page/default_page.php index 4087961..c26c1f2 100644 --- a/sai/page/default_page.php +++ b/sai/page/default_page.php @@ -44,7 +44,7 @@ class default_page extends \SYSTEM\PAGE\Page { ''. ''. ''. - ''. + ''. ''. ''. //''. From 3cff0ef7b4f141e621b02bef7b522e9a3fdfa702 Mon Sep 17 00:00:00 2001 From: Messerbill Date: Sat, 13 Jun 2015 16:02:54 +0200 Subject: [PATCH 22/24] further path changes --- lib/bootstrap_growl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/bootstrap_growl b/lib/bootstrap_growl index 481a603..5940b96 160000 --- a/lib/bootstrap_growl +++ b/lib/bootstrap_growl @@ -1 +1 @@ -Subproject commit 481a60301d5df6ddb59beb179317d2764c54c6bd +Subproject commit 5940b96a932d940580ccf0d3ba46b4c381f90c08 From 9861b837e609c0e43cd9dc2e0457e3e14e24e38d Mon Sep 17 00:00:00 2001 From: Messerbill Date: Sun, 14 Jun 2015 04:56:01 +0200 Subject: [PATCH 23/24] added some language strings --- dbd/sql/mysql/data/system_text.sql | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/dbd/sql/mysql/data/system_text.sql b/dbd/sql/mysql/data/system_text.sql index ed3a0d2..7712622 100644 --- a/dbd/sql/mysql/data/system_text.sql +++ b/dbd/sql/mysql/data/system_text.sql @@ -622,6 +622,9 @@ DELETE FROM `system_text_tag` WHERE id = 'sai_api_title'; INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_api_title', 'deDE', 'System API', 2, 2, '2015-04-17 19:29:25', '2015-04-17 19:29:25'); INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_api_title', 'enUS', 'System API', 2, 2, '2015-04-17 19:29:25', '2015-04-17 19:29:25'); + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_api_title', 'frFR', 'System API', 2, 2, '2015-04-17 19:29:25', '2015-04-17 19:29:25'); + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_api_title', 'esES', 'System API', 2, 2, '2015-04-17 19:29:25', '2015-04-17 19:29:25'); + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_api_title', 'trTR', 'System API', 2, 2, '2015-04-17 19:29:25', '2015-04-17 19:29:25'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('sai_api_title', 'sai'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('sai_api_title', 'sai_api'); @@ -643,6 +646,9 @@ DELETE FROM `system_text_tag` WHERE id = 'sai_copyright'; INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_copyright', 'deDE', '${project} © WebCraft Media 2015', 2, 2, '2015-04-17 19:15:03', '2015-04-17 19:15:03'); INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_copyright', 'enUS', '${project} © WebCraft Media 2015', 2, 2, '2015-04-17 19:15:03', '2015-04-17 19:15:03'); + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_copyright', 'trTR', '${project} © WebCraft Media 2015', 2, 2, '2015-04-17 19:15:03', '2015-04-17 19:15:03'); + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_copyright', 'frFR', '${project} © WebCraft Media 2015', 2, 2, '2015-04-17 19:15:03', '2015-04-17 19:15:03'); + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_copyright', 'esES', '${project} © WebCraft Media 2015', 2, 2, '2015-04-17 19:15:03', '2015-04-17 19:15:03'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('sai_copyright', 'sai'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('sai_copyright', 'sai_default'); @@ -697,6 +703,8 @@ INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_menu_api', 'deDE', 'API', 1, 1, '2015-04-19 20:48:44', '2015-04-19 20:48:44'); INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_menu_api', 'enUS', 'API', 2, 2, '2015-04-17 19:17:28', '2015-04-17 19:17:28'); INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_menu_api', 'frFR', 'API', 3, 3, '2015-04-20 19:11:39', '2015-04-20 19:11:39'); + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_menu_api', 'trTR', 'API', 3, 3, '2015-04-20 19:11:39', '2015-04-20 19:11:39'); + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_menu_api', 'esES', 'API', 3, 3, '2015-04-20 19:11:39', '2015-04-20 19:11:39'); INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_menu_api', 'jaJA', 'エーピーアイ', 1, 1, '2015-04-19 21:02:19', '2015-04-19 21:02:19'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('sai_menu_api', 'sai'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('sai_menu_api', 'sai_default'); @@ -706,6 +714,8 @@ INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_menu_cache', 'deDE', 'Cache', 2, 2, '2015-04-17 19:18:07', '2015-04-17 19:18:07'); INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_menu_cache', 'enUS', 'Cache', 2, 2, '2015-04-17 19:18:07', '2015-04-17 19:18:07'); INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_menu_cache', 'frFR', 'Cache', 3, 3, '2015-04-20 19:14:00', '2015-04-20 19:14:00'); + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_menu_cache', 'esES', 'Cache', 3, 3, '2015-04-20 19:14:00', '2015-04-20 19:14:00'); + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_menu_cache', 'trTR', 'Cache', 3, 3, '2015-04-20 19:14:00', '2015-04-20 19:14:00'); INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_menu_cache', 'jaJA', 'キャッシュ', 1, 1, '2015-04-19 21:13:51', '2015-04-19 21:13:51'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('sai_menu_cache', 'sai'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('sai_menu_cache', 'sai_default'); @@ -721,8 +731,11 @@ DELETE FROM `system_text` WHERE id = 'sai_menu_cron'; DELETE FROM `system_text_tag` WHERE id = 'sai_menu_cron'; - INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_menu_cron', 'deDE', 'Timer', 1, 1, '2015-04-19 21:17:24', '2015-04-19 21:17:24'); + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_menu_cron', 'deDE', 'Cron', 1, 1, '2015-04-19 21:17:24', '2015-04-19 21:17:24'); INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_menu_cron', 'enUS', 'Cron', 2, 2, '2015-04-17 19:18:22', '2015-04-17 19:18:22'); + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_menu_cron', 'esES', 'Cron', 2, 2, '2015-04-17 19:18:22', '2015-04-17 19:18:22'); + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_menu_cron', 'trTR', 'Cron', 2, 2, '2015-04-17 19:18:22', '2015-04-17 19:18:22'); + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_menu_cron', 'frFR', 'Cron', 2, 2, '2015-04-17 19:18:22', '2015-04-17 19:18:22'); INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_menu_cron', 'jaJA', 'スケジューラ', 1, 1, '2015-04-19 21:17:04', '2015-04-19 21:17:04'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('sai_menu_cron', 'sai'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('sai_menu_cron', 'sai_default'); @@ -732,6 +745,7 @@ INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_menu_docu', 'deDE', 'Docu', 2, 2, '2015-04-17 19:18:38', '2015-04-17 19:18:38'); INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_menu_docu', 'enUS', 'Docu', 2, 2, '2015-04-17 19:18:38', '2015-04-17 19:18:38'); INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_menu_docu', 'frFR', 'Docu', 3, 3, '2015-04-20 19:11:20', '2015-04-20 19:11:20'); + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_menu_docu', 'esES', 'Docu', 3, 3, '2015-04-20 19:11:20', '2015-04-20 19:11:20'); INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_menu_docu', 'jaJA', 'ドキュメンテーション', 1, 1, '2015-04-19 21:00:25', '2015-04-19 21:00:25'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('sai_menu_docu', 'sai'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('sai_menu_docu', 'sai_default'); @@ -749,6 +763,9 @@ DELETE FROM `system_text_tag` WHERE id = 'sai_menu_git'; INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_menu_git', 'deDE', 'Git', 2, 2, '2015-05-19 00:44:29', '2015-05-19 00:44:29'); INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_menu_git', 'enUS', 'Git', 2, 2, '2015-05-19 00:44:20', '2015-05-19 00:44:20'); + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_menu_git', 'frFR', 'Git', 2, 2, '2015-05-19 00:44:20', '2015-05-19 00:44:20'); + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_menu_git', 'trTR', 'Git', 2, 2, '2015-05-19 00:44:20', '2015-05-19 00:44:20'); + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_menu_git', 'esES', 'Git', 2, 2, '2015-05-19 00:44:20', '2015-05-19 00:44:20'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('sai_menu_git', 'sai'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('sai_menu_git', 'sai_default'); @@ -827,14 +844,18 @@ DELETE FROM `system_text_tag` WHERE id = 'sai_menu_todo'; INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_menu_todo', 'deDE', 'To-do', 1, 2, '2015-04-20 01:39:54', '2015-04-20 01:39:54'); INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_menu_todo', 'enUS', 'ToDo', 2, 2, '2015-04-17 19:19:37', '2015-04-17 19:19:37'); + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_menu_todo', 'frFR', 'ToDo', 2, 2, '2015-04-17 19:19:37', '2015-04-17 19:19:37'); + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_menu_todo', 'trTR', 'ToDo', 2, 2, '2015-04-17 19:19:37', '2015-04-17 19:19:37'); + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_menu_todo', 'esES', 'ToDo', 2, 2, '2015-04-17 19:19:37', '2015-04-17 19:19:37'); INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_menu_todo', 'jaJA', 'ToDoリスト', 1, 1, '2015-04-19 21:05:14', '2015-04-19 21:05:14'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('sai_menu_todo', 'sai'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('sai_menu_todo', 'sai_default'); DELETE FROM `system_text` WHERE id = 'sai_mod_login_text'; DELETE FROM `system_text_tag` WHERE id = 'sai_mod_login_text'; - INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_mod_login_text', 'deDE', 'Please login for developer access (if you are a developer).', 0, 2, '2015-04-17 20:34:48', '2015-04-17 20:34:48'); + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_mod_login_text', 'deDE', 'Für Entwicklerzugriff bitte einloggen (falls Sie Entwickler sind).', 0, 2, '2015-04-17 20:34:48', '2015-04-17 20:34:48'); INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_mod_login_text', 'enUS', 'Please login for developer access (if you are a developer).', 0, 0, '2015-04-16 20:27:32', '0000-00-00 00:00:00'); + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_mod_login_text', 'frFR', 'Connectez pour accès de développeur (si vous êtes un développeur).', 0, 0, '2015-04-16 20:27:32', '0000-00-00 00:00:00'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('sai_mod_login_text', 'sai'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('sai_mod_login_text', 'sai_login'); @@ -899,6 +920,9 @@ DELETE FROM `system_text_tag` WHERE id = 'sai_todo_title'; INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_todo_title', 'deDE', 'System To-do', 2, 2, '2015-04-23 01:53:37', '2015-04-23 01:53:37'); INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_todo_title', 'enUS', 'System ToDo', 2, 2, '2015-04-17 19:22:57', '2015-04-17 19:22:57'); + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_todo_title', 'frFR', 'System ToDo', 2, 2, '2015-04-17 19:22:57', '2015-04-17 19:22:57'); + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_todo_title', 'esES', 'System ToDo', 2, 2, '2015-04-17 19:22:57', '2015-04-17 19:22:57'); + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_todo_title', 'trTR', 'System ToDo', 2, 2, '2015-04-17 19:22:57', '2015-04-17 19:22:57'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('sai_todo_title', 'sai'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('sai_todo_title', 'sai_todo'); From c822f8de473dd3bf88fde20502ff2f635dbd8e0d Mon Sep 17 00:00:00 2001 From: Messerbill Date: Mon, 15 Jun 2015 15:54:58 +0200 Subject: [PATCH 24/24] added growl to submodule --- .gitmodules | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitmodules b/.gitmodules index 76eac3b..e29da0e 100644 --- a/.gitmodules +++ b/.gitmodules @@ -10,6 +10,9 @@ [submodule "lib/tinymce"] path = lib/tinymce url = git@mojotrollz.eu:webcraft/lib_tinymce.git +[submodule "lib/bootstrap_growl"] + path = lib/bootstrap_growl + url = git@mojotrollz.eu:webcraft/lib_bootstrap-growl.git [submodule "lib/textillate"] path = lib/textillate url = git@mojotrollz.eu:webcraft/lib_textillate.git