#18965740 : apply mobile layout and mobile view option to all connected menu items

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@7548 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
haneul 2010-06-24 07:50:39 +00:00
parent 220743afea
commit f29f234ddb
5 changed files with 46 additions and 5 deletions

View file

@ -70,6 +70,7 @@
unset($extra_vars->layout);
unset($extra_vars->title);
unset($extra_vars->apply_layout);
unset($extra_vars->apply_mobile_view);
$args = Context::gets('layout_srl','title');
@ -87,7 +88,10 @@
$menu_srl_list[] = $menu_srl;
$menu_name_list[$menu_srl] = $output->title;
if(Context::get('apply_layout')=='Y') {
$apply_layout = Context::get('apply_layout');
$apply_mobile_view = Context::get('apply_mobile_view');
if($apply_layout=='Y' || $apply_mobile_view=='Y') {
$menu_args = null;
$menu_args->menu_srl = $menu_srl;
$menu_args->site_srl = $layout_info->site_srl;
@ -100,8 +104,21 @@
if(count($modules)) {
$update_args->module_srls = implode(',',$modules);
$update_args->layout_srl = $args->layout_srl;
$output = executeQuery('layout.updateModuleLayout', $update_args);
if($apply_layout == "Y") {
$update_args->layout_srl = $args->layout_srl;
}
if($layout_info->layout_type == "M")
{
if(Context::get('apply_mobile_view') == "Y")
{
$update_args->use_mobile = "Y";
}
$output = executeQuery('layout.updateModuleMLayout', $update_args);
}
else
{
$output = executeQuery('layout.updateModuleLayout', $update_args);
}
}
}
}