mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
Remove 'set as homepage' link from menu configuration screen
This commit is contained in:
parent
af11056fae
commit
0432e20dfc
4 changed files with 24 additions and 67 deletions
|
|
@ -15,6 +15,5 @@
|
|||
|
||||
<action name="procInstallAdminInstall" type="controller" />
|
||||
<action name="procInstallAdminUpdate" type="controller" />
|
||||
<action name="procInstallAdminUpdateIndexModule" type="controller" />
|
||||
</actions>
|
||||
</module>
|
||||
|
|
|
|||
|
|
@ -44,40 +44,6 @@ class installAdminController extends install
|
|||
return $output;
|
||||
}
|
||||
|
||||
function procInstallAdminUpdateIndexModule()
|
||||
{
|
||||
if(!Context::get('index_module_srl') || !Context::get('menu_item_srl'))
|
||||
{
|
||||
return new Object(-1, 'msg_invalid_request');
|
||||
}
|
||||
|
||||
$site_args = new stdClass();
|
||||
$site_args->site_srl = 0;
|
||||
$site_args->index_module_srl = Context::get('index_module_srl');
|
||||
$oModuleController = getController('module');
|
||||
$oModuleController->updateSite($site_args);
|
||||
|
||||
// get menu item info
|
||||
$menuItemSrl = Context::get('menu_item_srl');
|
||||
$oMenuAdminModel = getAdminModel('menu');
|
||||
$output = $oMenuAdminModel->getMenuItemInfo($menuItemSrl);
|
||||
|
||||
// update homeSitemap.php cache file
|
||||
$oMenuAdminController = getAdminController('menu');
|
||||
$homeMenuCacheFile = $oMenuAdminController->getHomeMenuCacheFile();
|
||||
if(file_exists($homeMenuCacheFile))
|
||||
{
|
||||
include($homeMenuCacheFile);
|
||||
}
|
||||
|
||||
if(!$homeMenuSrl || $homeMenuSrl != $output->menu_srl)
|
||||
{
|
||||
$oMenuAdminController->makeHomemenuCacheFile($output->menu_srl);
|
||||
}
|
||||
|
||||
$this->setMessage('success_updated');
|
||||
}
|
||||
|
||||
function procInstallAdminRemoveFTPInfo()
|
||||
{
|
||||
$ftp_config_file = Context::getFTPConfigFile();
|
||||
|
|
|
|||
|
|
@ -488,7 +488,9 @@ class menuAdminModel extends menu
|
|||
$oModuleModel = getModel('module');
|
||||
$oMenuAdminController = getAdminController('menu');
|
||||
$columnList = array('modules.mid', 'modules.browser_title', 'sites.index_module_srl');
|
||||
$start_module = $oModuleModel->getSiteInfo(0, $columnList);
|
||||
|
||||
$start_module_list = executeQuery('module.getDomainInfo', new stdClass);
|
||||
$start_module = $start_module_list->data;
|
||||
|
||||
$menuList = array();
|
||||
if($menuSrl)
|
||||
|
|
@ -657,6 +659,11 @@ class menuAdminModel extends menu
|
|||
private function _menuInfoSetting(&$menu, &$start_module, &$isMenuFixed, $menuSrl,$siteSrl = 0)
|
||||
{
|
||||
$oModuleModel = getModel('module');
|
||||
if(!is_array($start_module))
|
||||
{
|
||||
$start_module = $start_module ? array($start_module) : array();
|
||||
}
|
||||
|
||||
// if url is empty and is_shortcut is 'N', change to is_shortcut 'Y'
|
||||
if(!$menu['url'] && $menu['is_shortcut'] == 'N')
|
||||
{
|
||||
|
|
@ -703,11 +710,23 @@ class menuAdminModel extends menu
|
|||
$menu['setup_index_act'] = $moduleInfo->default_index_act;
|
||||
}
|
||||
|
||||
if($menu['is_shortcut'] == 'N' && $midInfo->mid == $start_module->mid)
|
||||
if($menu['is_shortcut'] == 'N')
|
||||
{
|
||||
$menu['is_start_module'] = true;
|
||||
$this->menuSrlWithinHome = $menuSrl;
|
||||
foreach($start_module as $start_module_info)
|
||||
{
|
||||
if($midInfo->mid == $start_module_info->mid)
|
||||
{
|
||||
$menu['is_start_module'] = true;
|
||||
$menu['is_start_module_of'] = $start_module_info->domain;
|
||||
if($start_module_info->is_default_domain === 'Y')
|
||||
{
|
||||
$this->menuSrlWithinHome = $menuSrl;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// setting layout srl for layout management
|
||||
$menu['layout_srl'] = $midInfo->layout_srl;
|
||||
$menu['browser_title'] = $midInfo->browser_title;
|
||||
|
|
|
|||
|
|
@ -123,13 +123,6 @@
|
|||
<li class="ex"><button type="button" class="_edit_copy">{$lang->copy}</button></li>
|
||||
<li class="ex"><button type="button" class="_edit_paste" disabled>{$lang->paste}</button></li>
|
||||
<li class="ex"><button type="button" class="_deleteMenu">{$lang->cmd_delete}</button></li>
|
||||
<li class="homepage">
|
||||
<label style="padding:0 0 0 8px;margin:0">
|
||||
<input type="checkbox" class="_chkUseAsHome" hidden>
|
||||
<span>{$lang->set_as_homepage}|{$lang->has_been_set_as_homepage}</span>
|
||||
<a class="x_icon-question-sign" href="./common/manual/admin/index.html#UMAN_setting_startpage" target="_blank" style="padding:0;margin:0;background-color:transparent">{$lang->help}</a>
|
||||
</label>
|
||||
</li>
|
||||
<li><a href="#imgbtn" data-admin-show="#imgbtn">{$lang->menu_img_btn} <i class="x_icon-circle-arrow-right"></i></a></li>
|
||||
<li class="design"><a href="#design" data-admin-show="#design">{$lang->design} <i class="x_icon-circle-arrow-right"></i></a></li>
|
||||
<li><a href="#auth" data-admin-show="#auth">{$lang->grant} <i class="x_icon-circle-arrow-right"></i></a></li>
|
||||
|
|
@ -1149,7 +1142,7 @@ function createTreeMarkup(aNode, sParentSrl, sMenuTree, sMenuTreeNode){
|
|||
nNodeType = 3;
|
||||
}
|
||||
|
||||
sResult += $.tmpl( sMenuTreeNode, {MenuTitleWithHome:sTextWithIcons,MenuTitle:sText,MenuId:sNodeSrl,MenuUrl:sURL,NodeType:nNodeType,SubTree:sSubTree,Target:sTargetPanel} ).get()[0].outerHTML.replace("${h}", "<i class='x_icon-home' title='Home Page'>[HOME]</i>").replace("${s}", "<i class='x_icon-share' title='Shortcut'></i>");
|
||||
sResult += $.tmpl( sMenuTreeNode, {MenuTitleWithHome:sTextWithIcons,MenuTitle:sText,MenuId:sNodeSrl,MenuUrl:sURL,NodeType:nNodeType,SubTree:sSubTree,Target:sTargetPanel} ).get()[0].outerHTML.replace("${h}", "<i class='x_icon-home' title='" + aNode[i].is_start_module_of + "'>[HOME]</i>").replace("${s}", "<i class='x_icon-share' title='Shortcut'></i>");
|
||||
}
|
||||
|
||||
return $.tmpl( sMenuTree, {Nodes:sResult} ).get()[0].outerHTML;
|
||||
|
|
@ -1712,11 +1705,6 @@ jQuery(function($){
|
|||
$(ev.target).addClass('prop-general');
|
||||
$(ev.target).removeClass('prop-shortcut');
|
||||
}
|
||||
if(htInfo.is_start_module){
|
||||
$(ev.target).find('._chkUseAsHome').attr('checked', 'checked').attr('disabled', 'disabled').next('span').text(xe.lang.has_been_set_as_homepage);
|
||||
}else{
|
||||
$(ev.target).find('._chkUseAsHome').removeAttr('disabled').removeAttr('checked').next('span').text(xe.lang.set_as_homepage);
|
||||
}
|
||||
|
||||
if(!htInfo.bShortCut){
|
||||
loadFullSetup();
|
||||
|
|
@ -1755,21 +1743,6 @@ jQuery(function($){
|
|||
|
||||
$("#siteMapTree").jstree("deselect_all");
|
||||
});
|
||||
$('#properties ._chkUseAsHome').click(function(){
|
||||
if($(this).attr('checked')){
|
||||
var params = {
|
||||
menu_item_srl : $._xeAdminVar.sSelectedMenuSrl,
|
||||
index_module_srl : htNodeInfo[$._xeAdminVar.sSelectedMenuSrl].module_srl
|
||||
};
|
||||
|
||||
$.exec_json("admin.procInstallAdminUpdateIndexModule", params, function(htData){
|
||||
// select currently selected menu
|
||||
$._xeAdminVar.sSelectOnload = $._xeAdminVar.sSelectedMenuSrl;
|
||||
loadSiteMap();
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$('#add').bind("hide", function(){
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue