diff --git a/module/mr/view/link.html.php b/module/mr/view/link.html.php
index 57ffa878a5..71d9b4e22a 100644
--- a/module/mr/view/link.html.php
+++ b/module/mr/view/link.html.php
@@ -41,7 +41,7 @@
'>
diff --git a/module/repo/css/ajaxgeteditorcontent.css b/module/repo/css/ajaxgeteditorcontent.css
index 59fd859d12..c44b1c5b30 100644
--- a/module/repo/css/ajaxgeteditorcontent.css
+++ b/module/repo/css/ajaxgeteditorcontent.css
@@ -3,10 +3,14 @@
#log {background: #fff; margin-top: 2px; color: #707070; display: none; padding: 5px;}
#log .history {margin-left: 5px;}
#related {display: none; margin-top: 2px; background: #fff;}
+
+#relationTabs .nav > li > a {padding: 8px 10px; display: flex; white-space: pre;}
+#relationTabs .nav-tabs > li > a > span {margin-right: 5px;}
#relationTabs .tab-pane {display: none;}
#relationTabs .tabs-navbar {background: #F4F5F7;}
#relationTabs .tab-pane.active {display: block;}
#relationTabs .tab-nav-item {max-width: none !important;}
+#relationTabs .tab-nav-item .icon {line-height: inherit;}
#relationTabs > .tabs-navbar {overflow: hidden; padding-bottom: 10px; position: relative; height: 35px;}
#relationTabs > .tabs-navbar > .nav-tabs {position: absolute; display: flex;}
#related .content, #related .btn {background-color: #F4F5F7; border: none;}
diff --git a/module/repo/css/common.css b/module/repo/css/common.css
index c299a069b0..809ee039dd 100644
--- a/module/repo/css/common.css
+++ b/module/repo/css/common.css
@@ -234,3 +234,5 @@ h3 {font-size: 16px;}
.file-tree #modules .icon {color: #9EA3B0;}
.file-tree #modules .icon-folder {padding-left: 5px;}
li.selected .doc-title .icon, li.selected .doc-title a {color: #438EFF !important;}
+
+.btn-left, .btn-right {display: none;}
diff --git a/module/repo/js/common.js b/module/repo/js/common.js
index a2e805f948..e1ca5fdf60 100644
--- a/module/repo/js/common.js
+++ b/module/repo/js/common.js
@@ -61,6 +61,46 @@ $("input:checkbox[name='revision[]']").click(function(){
}
});
+var distance = 0;
+
+/**
+ * Aarrow tabs area.
+ *
+ * @param string domID
+ * @param number shift 1|-1
+ * @param bool hideRightBtn
+ * @access public
+ * @return void
+ */
+function arrowTabs(domID, shift, hideRightBtn)
+{
+ $('.btn-right, .btn-left').show();
+ if(hideRightBtn) $('.btn-right').hide();
+
+ var tabItemWidth = $('#' + domID + ' > .tabs-navbar > .nav-tabs')[0].clientWidth;
+ var tabsWidth = $('#' + domID + '')[0].clientWidth;
+ if(tabItemWidth < tabsWidth)
+ {
+ $('.btn-right, .btn-left').hide();
+ return;
+ }
+
+ distance += tabsWidth * shift * 0.2;
+ if(distance > 0) distance = 0;
+ if(distance == 0)
+ {
+ $('.btn-left').hide();
+ }
+
+ if((tabItemWidth + distance) < tabsWidth * 0.75)
+ {
+ $('.btn-right').hide();
+ return arrowTabs(domID, 1, true);
+ }
+
+ $('#' + domID + ' > .tabs-navbar > .tabs-nav')[0].style.transform = 'translateX('+ distance +'px)';
+}
+
$(function()
{
$(document).on('click', '.ajaxPager', function()
diff --git a/module/repo/js/monaco.js b/module/repo/js/monaco.js
index ff3d66f057..ade52cf187 100644
--- a/module/repo/js/monaco.js
+++ b/module/repo/js/monaco.js
@@ -1,27 +1,7 @@
$(function()
{
- var distance = 0;
-
- /**
- * Arrow tab line.
- *
- * @param int $num
- * @access public
- * @return void
- */
- function arrow(num){
- var tabItemWidth = $('#fileTabs > .tabs-navbar > .nav-tabs')[0].clientWidth;
- var tabsWidth = $('#fileTabs')[0].clientWidth;
- if(tabItemWidth < tabsWidth) return;
-
- distance += tabsWidth * num * 0.2;
- if(distance > 0) distance = 0;
- if((tabItemWidth + distance) < tabsWidth * 0.7) return;
-
- $('#fileTabs > .tabs-navbar > .tabs-nav')[0].style.transform = 'translateX('+ distance +'px)';
- }
- $('.btn-left').click(function() {arrow(1);});
- $('.btn-right').click(function() {arrow(-1);});
+ $('.btn-left').click(function() {arrowTabs('fileTabs', 1);});
+ $('.btn-right').click(function() {arrowTabs('fileTabs', -2);});
/**
* Create file tab.
@@ -67,6 +47,7 @@ $(function()
$tabs.open(createTab(name, path));
setHeight();
+ arrowTabs('fileTabs', -2);
});
/* Remove file path for opened files. */
@@ -78,6 +59,8 @@ $(function()
openedFiles.splice(index, 1)
$('[data-path="' + filepath + '"]').closest('li').removeClass('selected');
}
+
+ if(index == openedFiles.length) arrowTabs('fileTabs', -2);
});
/* Append file path into the title. */
diff --git a/module/repo/view/ajaxgeteditorcontent.html.php b/module/repo/view/ajaxgeteditorcontent.html.php
index b84de046c1..9f02ebf556 100644
--- a/module/repo/view/ajaxgeteditorcontent.html.php
+++ b/module/repo/view/ajaxgeteditorcontent.html.php
@@ -42,7 +42,7 @@ js::import($jsRoot . 'monaco-editor/min/vs/loader.js');
-
+
@@ -51,11 +51,16 @@ js::import($jsRoot . 'monaco-editor/min/vs/loader.js');
+