Merge branch 'master' of github.com:easysoft/zentaopms

This commit is contained in:
wangyidong
2016-04-18 10:07:25 +08:00
35 changed files with 341 additions and 87 deletions
+1 -1
View File
@@ -528,7 +528,7 @@ class block extends control
{
$this->app->loadLang('build');
$projects = $this->loadModel('project')->getPairs();
$this->view->builds = $this->dao->select('t1.*,t2.productName')->from(TABLE_BUILD)->alias('t1')
$this->view->builds = $this->dao->select('t1.*, t2.name as productName')->from(TABLE_BUILD)->alias('t1')
->leftJoin(TABLE_PRODUCT)->alias('t2')->on('t1.product=t2.id')
->where('t1.deleted')->eq('0')
->andWhere('t1.project')->in(array_keys($projects))
+36 -1
View File
@@ -51,6 +51,12 @@ function checkEmpty()
$dashboard.find('.dashboard-empty-message').toggleClass('hide', hasBlocks);
}
/**
* Resize block
* @param object $event
* @access public
* @return void
*/
function resizeBlock(event)
{
var blockID = event.element.find('.panel').data('id');
@@ -60,6 +66,33 @@ function resizeBlock(event)
});
}
/**
* Init table header
* @access public
* @return void
*/
function initTableHeader()
{
$('#dashboard .panel-block').each(function()
{
var $panel = $(this);
var $table = $panel.find('.table:first');
console.log($table.length, $table.children('thead').length, this);
if(!$table.length || !$table.children('thead').length) return;
console.log('ok');
var $header = $panel.children('.table-header-fixed');
if(!$header.length)
{
$header = $('<div class="table-header-fixed"><table class="table table-fixed"></table></div>').css('right', $panel.width() - $table.width() - 2);
$header.find('.table').append($table.find('thead').clone());
$panel.addClass('with-fixed-header').append($header);
var $heading = $panel.children('.panel-heading');
if($heading.length) $header.css('top', $heading.outerHeight());
}
});
}
$(function()
{
@@ -73,12 +106,14 @@ $(function()
sensitive : true,
panelRemovingTip : config.confirmRemoveBlock,
resizable : true,
onResize : resizeBlock
onResize : resizeBlock,
afterRefresh : initTableHeader
});
$dashboard.find('ul.dashboard-actions').addClass('hide').children('li').addClass('right').appendTo($('#modulemenu > .nav'));
$dashboard.find('[data-toggle=tooltip]').tooltip({container: 'body'});
checkEmpty();
initTableHeader();
});
+1
View File
@@ -15,6 +15,7 @@ $jsRoot = $webRoot . "js/";
$themeRoot = $webRoot . "theme/";
if(isset($pageCSS)) css::internal($pageCSS);
?>
<?php include '../../common/view/sparkline.html.php';?>
<div class='dashboard dashboard-draggable' id='dashboard' data-confirm-remove-block='<?php echo $lang->block->confirmRemoveBlock;?>'>
<ul class='dashboard-actions hide'><li><a href='<?php echo $this->createLink("block", "admin", "id=0&module=$module"); ?>' data-toggle='modal' data-type='ajax' data-width='600'><i class='icon icon-list-alt'></i> <?php echo $lang->block->createBlock?></a></li></ul>
<div class='dashboard-empty-message hide'>