* Finish task #5026.

This commit is contained in:
Yagami
2018-10-18 14:08:30 +08:00
parent 213ea0af50
commit 5c71ee281d
4 changed files with 8 additions and 13 deletions

View File

@@ -73,3 +73,5 @@ td.c-name a:visited{color: #082999}
.main-col .panel-heading a:visited{color: #082999}
.panel-title.font-normal .btn-group{margin-left: 20px;}
.querybox-opened{color: #0c64eb; background: rgba(0,0,0,.075);}

View File

@@ -4,8 +4,6 @@ function browseByModule()
$('.divider').removeClass('hidden');
$('#bymoduleTab').addClass('active');
$('#allTab').removeClass('active');
$('#bysearchTab').removeClass('active');
$('#queryBox').removeClass('show');
}
function browseBySearch()
@@ -13,15 +11,9 @@ function browseBySearch()
$('.divider').addClass('hidden');
$('#bymoduleTab').removeClass('active');
$('#allTab').addClass('active');
$('#bysearchTab').addClass('active');
$('#queryBox').addClass('show');
}
$(function(){
if(browseType == 'bysearch') return;
$('#' + browseType + 'Tab').addClass('active');
if(browseType == "bysearch")
{
$.toggleQueryBox(true);
browseBySearch();
}
});

View File

@@ -1489,6 +1489,7 @@ class docModel extends model
public function setFastMenu($fastLib)
{
$actions = '';
if($this->app->methodName == 'browse') $actions .= '<a class="btn btn-link querybox-toggle" id="bysearchTab"><i class="icon icon-search muted"></i>' . $this->lang->doc->search . '</a>';
$actions .= "<a data-toggle='dropdown' class='btn btn-secondary' title=$fastLib>" . $fastLib . " <span class='caret'></span></a>";
$actions .= "<ul class='dropdown-menu'>";
foreach($this->lang->doc->fastMenuList as $key => $fastMenu)
@@ -1497,7 +1498,6 @@ class docModel extends model
$actions .= '<li>' . html::a($link, "<i class='icon {$this->lang->doc->fastMenuIconList[$key]}'></i> {$fastMenu}") . '</li>';
}
$actions .='</ul>';
$actions .= '<a class="btn btn-secondary querybox-toggle" id="bysearchTab"><i class="icon icon-search muted"></i>' . $this->lang->doc->search . '</a>';
return $actions;
}

View File

@@ -28,6 +28,7 @@ var browseType = '<?php echo $browseType;?>';
<?php include dirname(__FILE__) . '/browsebygrid.html.php';?>
<?php else:?>
<div class="main-col" data-min-width="400">
<div class="cell<?php if($browseType == 'bysearch') echo ' show';?>" id="queryBox"></div>
<div class="panel block-files block-sm no-margin">
<div class="panel-heading">
<div class="panel-title font-normal">
@@ -102,11 +103,11 @@ var browseType = '<?php echo $browseType;?>';
<?php endforeach;?>
<?php endif;?>
<?php if(!empty($attachLibs)):?>
<?php foreach($attachLibs as $libID => $attachLib):?>
<?php foreach($attachLibs as $libType => $attachLib):?>
<tr>
<?php if($libID == 'project'):?>
<?php if($libType == 'project'):?>
<td class="c-name"><?php echo html::a(inlink('allLibs', "type=project&product={$currentLib->product}"), "<i class='icon icon-folder text-yellow'></i> &nbsp;" . $attachLib->name);?></td>
<?php elseif($libID == 'files'):?>
<?php elseif($libType == 'files'):?>
<td class="c-name"><?php echo html::a(inlink('showFiles', "type=$type&objectID={$currentLib->$type}"), "<i class='icon icon-folder text-yellow'></i> &nbsp;" . $attachLib->name);?></td>
<?php endif;?>
<td class="c-num"></td>