removed start state enforce - start state is now also loaded on blank url, saimod docu menu fix
This commit is contained in:
parent
f6265bdda8
commit
1d7c0a4070
@ -15,7 +15,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 (50, 42, 'docu', 'docu', -1, 0, 0, '#content', './sai.php?sai_mod=.SYSTEM.SAI.saimod_sys_docu', 'init_saimod_sys_docu', '\\SYSTEM\\SAI\\saimod_sys_docu');
|
||||
INSERT INTO `system_page` (`id`, `group`, `name`, `state`, `parent_id`, `login`, `type`, `div`, `url`, `func`, `php_class`) VALUES (51, 42, 'cat', 'docu', 50, 0, 0, '#tab_docu', './sai.php?sai_mod=.SYSTEM.SAI.saimod_sys_docu&action=cat&cat=${cat}', 'init_saimod_sys_docu_cat', '\\SYSTEM\\SAI\\saimod_sys_docu');
|
||||
INSERT INTO `system_page` (`id`, `group`, `name`, `state`, `parent_id`, `login`, `type`, `div`, `url`, `func`, `php_class`) VALUES (55, 42, 'doc', 'docu', 51, 0, 0, '#tab2_docu', './sai.php?sai_mod=.SYSTEM.SAI.saimod_sys_docu&action=doc&cat=${cat}&doc=${doc}', '', '');
|
||||
INSERT INTO `system_page` (`id`, `group`, `name`, `state`, `parent_id`, `login`, `type`, `div`, `url`, `func`, `php_class`) VALUES (55, 42, 'doc', 'docu', 51, 0, 0, '#tab2_docu', './sai.php?sai_mod=.SYSTEM.SAI.saimod_sys_docu&action=doc&cat=${cat}&doc=${doc}', 'init_saimod_sys_docu_doc', '\\SYSTEM\\SAI\\saimod_sys_docu');
|
||||
|
||||
INSERT INTO `system_page` (`id`, `group`, `name`, `state`, `parent_id`, `login`, `type`, `div`, `url`, `func`, `php_class`) VALUES (60, 42, 'files', 'files', -1, 0, 0, '#content', './sai.php?sai_mod=.SYSTEM.SAI.saimod_sys_files', 'init_saimod_sys_files', '\\SYSTEM\\SAI\\saimod_sys_files');
|
||||
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');
|
||||
|
||||
@ -119,10 +119,11 @@ SYSTEM.prototype.handle_call_pages = function (data,id,forced,cached) {
|
||||
//cache state info data
|
||||
this.state_info[id] = data;
|
||||
//update history?
|
||||
if(id !== this.cur_state()){
|
||||
if( !(id === this.start_state && this.cur_state() === '') && //avoid start state in url unless called explicit
|
||||
id !== this.cur_state()){//new state?
|
||||
window.history.pushState(null, "", '#!'+id);}
|
||||
data['result'].forEach(
|
||||
function(entry) { system.handle_call_pages_entry(entry,id,forced,cached);});
|
||||
data['result'].forEach(
|
||||
function(entry) { system.handle_call_pages_entry(entry,id,forced,cached);});
|
||||
} else {
|
||||
this.log_info('Problem with your Pages: '+data['result']['message']);
|
||||
}
|
||||
|
||||
@ -16,6 +16,11 @@ function init_saimod_sys_docu_cat() {
|
||||
docu2_menu();
|
||||
};
|
||||
|
||||
function init_saimod_sys_docu_doc() {
|
||||
docu_menu();
|
||||
docu2_menu();
|
||||
}
|
||||
|
||||
function docu_menu(){
|
||||
$('#tabs_docu li').each(function(){
|
||||
$(this).removeClass('active');});
|
||||
|
||||
@ -8,7 +8,7 @@ class saistart_sys_sai extends \SYSTEM\SAI\SaiModule {
|
||||
\SYSTEM\locale::getStrings(\SYSTEM\DBD\system_locale_string::VALUE_CATEGORY_SYSTEM_SAI),
|
||||
\SYSTEM\locale::getStrings(\SYSTEM\DBD\system_locale_string::VALUE_CATEGORY_SYSTEM_SAI_ERROR));
|
||||
return \SYSTEM\PAGE\replace::replaceFile( \SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'modules/saistart_sys_sai/tpl/saistart.tpl'),$vars);}
|
||||
public static function html_li_menu(){return '<li class="active"><a id="menu_start" href="#!start">'.\SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_SAI_CONFIG_TITLE).'</a></li>';}
|
||||
public static function html_li_menu(){return '<li class="active"><a id="menu_start" href="">'.\SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_SAI_CONFIG_TITLE).'</a></li>';}
|
||||
public static function right_public(){return true;}
|
||||
public static function right_right(){return true;}
|
||||
|
||||
|
||||
@ -16,5 +16,8 @@ $(document).ready(function() {
|
||||
function sys_hashchange(state){
|
||||
$('.nav li,#sai_navbar li, #project_navbar li').each(function(){
|
||||
$(this).removeClass('active');});
|
||||
$('#menu_'+state).parent().addClass('active');
|
||||
if($('#menu_'+state).parent().length){
|
||||
$('#menu_'+state).parent().addClass('active');
|
||||
} else {
|
||||
$('#menu_start').parent().addClass('active');}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user