* [bug#54447] Fix Bug on repo view.

This commit is contained in:
liyang
2024-08-27 11:27:36 +08:00
committed by 曹延义
parent 653aac41d1
commit 6cbac13709
2 changed files with 5 additions and 3 deletions
+4 -3
View File
@@ -63,9 +63,9 @@ $('body').off('click', '.dropmenu-tree .dropmenu-item').on('click', '.dropmenu-t
openUrl(currentLink, {app: appTab});
})
$('.repoDropDownMenu').on('click', function()
window.dropdownClick = function(event)
{
const url = $(this).data('link');
const url = $(event).data('link');
const file = $('#monacoTabs .nav-item .active').attr('href').substring(5).replace(/-/g, '=');
if(url.indexOf('blame') >=0 && url.indexOf('download') == -1)
{
@@ -75,8 +75,9 @@ $('.repoDropDownMenu').on('click', function()
{
window.open(url.replace('{path}', file), '_self');
}
return;
})
}
/**
* 打开新tab。
+1
View File
@@ -58,6 +58,7 @@ div(
set::id('monacoTabs'),
set::className('relative'),
on::click('.monaco-close')->call('closeTab', jsRaw('this')),
on::click('.repoDropDownMenu')->call('dropdownClick', jsRaw('this')),
div(setStyle(array('position' => 'absolute', 'width' => '100%', 'height' => '40px', 'background' => '#efefef', 'top' => '0px'))),
tabPane
(