* [bug#50959,0.4h] adjust repo file linkage for repo.

This commit is contained in:
caoyanyi
2024-06-13 12:00:33 +00:00
committed by 田淑杰
parent 558e272096
commit 18a9a663e3
3 changed files with 26 additions and 31 deletions
+26
View File
@@ -2,6 +2,14 @@ $(function()
{
$('#log').on('click', '.btn-close', closeRelation);
window.onScmChange();
$('#monacoTabs').on('show.zui.tab', function(e, tab)
{
$('#monacoTree .listitem').removeClass('selected');
const fileKey = tab[tab.length - 1].substring(5).replace(/-/g, '=');
$('li[z-key="' + fileKey + '"] .listitem').addClass('selected');
});
});
/**
@@ -345,3 +353,21 @@ window.onAclChange = function(event)
$('#whitelist').addClass('hidden');
}
}
/**
* 点击左侧菜单打开详情tab。
* Open new tab when click tree item.
*
* @access public
* @return void
*/
window.treeClick = function(info)
{
if(info.item.items && (info.item.items.length > 0 || info.item.items.url)) return;
$('#monacoTree .listitem').removeClass('selected');
$('li[z-key="' + info.item.id + '"] .listitem').addClass('selected');
openTab(info.item.id, info.item.text);
arrowTabs('monacoTabs', -2);
}
-15
View File
@@ -59,21 +59,6 @@ window.downloadCode = function()
return;
}
/**
* 点击左侧菜单打开详情tab。
* Open new tab when click tree item.
*
* @access public
* @return void
*/
window.treeClick = function(info)
{
if (info.item.items && info.item.items.length > 0) return;
$('li[z-key="' + info.item.id + '"] .listitem').addClass('selected');
openTab(info.item.id, info.item.text);
arrowTabs('monacoTabs', -2);
}
/**
* Change code encoding.
*
-16
View File
@@ -78,22 +78,6 @@ $('.repoDropDownMenu').on('click', function()
return;
})
/**
* 点击左侧菜单打开详情tab。
* Open new tab when click tree item.
*
* @access public
* @return void
*/
window.treeClick = function(info)
{
if(info.item.items && (info.item.items.length > 0 || info.item.items.url)) return;
$('li[z-key="' + info.item.id + '"] .listitem').addClass('selected');
openTab(info.item.id, info.item.text);
arrowTabs('monacoTabs', -2);
}
/**
* 打开新tab。
* Open new tab.