This commit is contained in:
songchenxuan
2023-08-18 10:48:05 +08:00
parent cd4ec22b5c
commit 9d91f9888b
2 changed files with 16 additions and 4 deletions
+12
View File
@@ -165,3 +165,15 @@ function initPager(pageID, recPerPage, recTotal, fieldCount)
$('#queryResult').html(viewResult.replace('%s', recTotal).replace('%s', fieldCount));
}
/**
* Set export show or hidden.
*
* @param string stat show|hide
* @access public
* @return void
*/
function setExport(stat)
{
if(stat == 'show') $('.dataview-export').removeClass('hidden');
else $('.dataview-export').addClass('hidden');
}
+4 -4
View File
@@ -28,7 +28,7 @@
<div class='btn-toolbar pull-left'><?php // common::printAdminSubMenu('dev');?></div>
<div class="btn-toolbar pull-right">
<?php if($selectedTable):?>
<?php if(common::hasPriv('dataview', 'export')) echo html::a($this->createLink('dataview', 'export', "type=$type&table=$selectedTable", '', true), "<i class='icon icon-export'></i> {$lang->dataview->export}", '', "class='iframe btn btn-link'");?>
<?php if(common::hasPriv('dataview', 'export')) echo html::a($this->createLink('dataview', 'export', "type=$type&table=$selectedTable", '', true), "<i class='icon icon-export'></i> {$lang->dataview->export}", '', "class='iframe btn btn-link dataview-export'");?>
<?php endif;?>
<?php if(common::hasPriv('dataview', 'create')) echo html::a($this->createLink('dataview', 'create'), "<i class='icon icon-plus'></i><span class='text'>" . $lang->dataview->create . "</span>", '', "class='btn btn-secondary'");?>
</div>
@@ -84,10 +84,10 @@
<div class='detail-content'>
<div class='tabs'>
<ul class='nav nav-tabs'>
<li class='active'><a href='#data' data-toggle='tab'><?php echo $lang->dataview->data;?></a></li>
<li><a href='#schema' data-toggle='tab'><?php echo $lang->dataview->schema;?></a></li>
<li class='active'><a href='#data' data-toggle='tab' onclick="setExport('show')"><?php echo $lang->dataview->data;?></a></li>
<li><a href='#schema' data-toggle='tab' onclick="setExport('hide')"><?php echo $lang->dataview->schema;?></a></li>
<?php if(!empty($dataview)):?>
<li><a href='#details' data-toggle='tab'><?php echo $lang->dataview->details;?></a></li>
<li><a href='#details' data-toggle='tab' onclick="setExport('hide')"><?php echo $lang->dataview->details;?></a></li>
<?php endif;?>
</ul>
<div class='tab-content '>