* Modify icon and page style.
This commit is contained in:
@@ -41,7 +41,7 @@
|
||||
<li><?php echo html::a(inlink('diff', "MRID={$MR->id}"), $lang->mr->viewDiff);?></li>
|
||||
<li class='<?php if($type == 'story') echo 'active'?>'><a href='#stories' data-toggle='tab'><?php echo html::icon($lang->icons['story'], 'text-primary') . ' ' . $lang->productplan->linkedStories;?></a></li>
|
||||
<li class='<?php if($type == 'bug') echo 'active'?>'><a href='#bugs' data-toggle='tab'><?php echo html::icon($lang->icons['bug'], 'text-red') . ' ' . $lang->productplan->linkedBugs;?></a></li>
|
||||
<li class='<?php if($type == 'task') echo 'active'?>'><a href='#tasks' data-toggle='tab'><?php echo html::icon('todo', 'text-info') . ' ' . $lang->mr->linkedTasks;?></a></li>
|
||||
<li class='<?php if($type == 'task') echo 'active'?>'><a href='#tasks' data-toggle='tab'><?php echo html::icon('check-sign', 'text-info') . ' ' . $lang->mr->linkedTasks;?></a></li>
|
||||
</ul>
|
||||
<div class='tab-content'>
|
||||
<div id='stories' class='tab-pane <?php if($type == 'story') echo 'active'?>'>
|
||||
|
||||
@@ -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;}
|
||||
|
||||
@@ -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;}
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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. */
|
||||
|
||||
@@ -42,7 +42,7 @@ js::import($jsRoot . 'monaco-editor/min/vs/loader.js');
|
||||
</ul>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<div class="btn btn-right pull-right"><i class="icon icon-chevron-right"></i></div>
|
||||
<div class="btn btn-right pull-right"><i class="icon icon-chevron-right"></i></div>
|
||||
<div class='panel-title'>
|
||||
<div class="tabs w-10" id="relationTabs"></div>
|
||||
</div>
|
||||
@@ -51,11 +51,16 @@ js::import($jsRoot . 'monaco-editor/min/vs/loader.js');
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.lite.html.php';?>
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
$('.btn-left').click(function() {arrowTabs('relationTabs', 1);});
|
||||
$('.btn-right').click(function() {arrowTabs('relationTabs', -2);});
|
||||
|
||||
var codeHeight = $(window).innerHeight() - $('#mainHeader').height() - $('#appsBar').height() - $('#fileTabs .tabs-navbar').height();
|
||||
$('#codeContainer').css('height', codeHeight);
|
||||
if(codeHeight > 0) $.cookie('codeContainerHeight', codeHeight);
|
||||
$('#codeContainer').css('height', $.cookie('codeContainerHeight'));
|
||||
|
||||
/**
|
||||
* Get relation by commit.
|
||||
@@ -100,6 +105,8 @@ $(function()
|
||||
$('#relationTabs').tabs({tabs: tabs});
|
||||
}
|
||||
}
|
||||
|
||||
arrowTabs('relationTabs', 1);
|
||||
});
|
||||
$('#related').show();
|
||||
}
|
||||
@@ -121,7 +128,7 @@ $(function()
|
||||
return {
|
||||
id: titleObj.type + '-' + titleObj.id,
|
||||
title: ' ' + titleObj.title,
|
||||
icon: titleObj.type == 'story' ? 'icon-lightbulb' : (titleObj.type == 'task' ? 'icon-check-sign' : 'icon-bug'),
|
||||
icon: titleObj.type == 'story' ? 'icon-lightbulb text-primary' : (titleObj.type == 'task' ? 'icon-check-sign text-info' : 'icon-bug text-red'),
|
||||
type: 'iframe',
|
||||
url: createLink('repo', 'ajaxGetRelationInfo', 'objectID=' + titleObj.id + '&objectType=' + titleObj.type)
|
||||
};
|
||||
|
||||
@@ -60,7 +60,7 @@ $encodePath = $this->repo->encodePath($entry);
|
||||
<button class="btn" type="button" data-toggle="context-dropdown"><i class="icon icon-ellipsis-v icon-rotate-90"></i></button>
|
||||
<ul class="dropdown-menu">
|
||||
<?php
|
||||
if(common::hasPriv('repo', 'blame')) echo '<li>' . html::a($this->repo->createLink('blame', "repoID=$repoID&objectID=$objectID&entry=$encodePath&revision=$revision&encoding=$encoding"), '<i class="icon icon-change"></i> ' . $lang->repo->blame, '', "data-app='{$app->tab}'") . '</li>';
|
||||
if(common::hasPriv('repo', 'blame')) echo '<li>' . html::a($this->repo->createLink('blame', "repoID=$repoID&objectID=$objectID&entry=$encodePath&revision=$revision&encoding=$encoding"), '<i class="icon icon-blame"></i> ' . $lang->repo->blame, '', "data-app='{$app->tab}'") . '</li>';
|
||||
if(common::hasPriv('repo', 'download')) echo '<li>' . html::a($this->repo->createLink('download', "repoID=$repoID&path=$encodePath&fromRevision=$revision"), '<i class="icon icon-download"></i> ' . $lang->repo->download, 'hiddenwin') . '</li>';
|
||||
?>
|
||||
</ul>
|
||||
|
||||
Reference in New Issue
Block a user