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

This commit is contained in:
chenfeiCF
2018-07-09 08:53:39 +08:00
56 changed files with 429 additions and 289 deletions
+4 -1
View File
@@ -21,7 +21,7 @@ class block extends control
{
parent::__construct($moduleName, $methodName);
/* Mark the call from zentao or ranzhi. */
$this->selfCall = !$this->server->http_referer || strpos($this->server->http_referer, common::getSysURL() . $this->config->webRoot) === 0 || $this->session->blockModule;
$this->selfCall = !isset($_GET['hash']);
if($this->methodName != 'admin' and $this->methodName != 'dashboard' and !$this->selfCall and !$this->loadModel('sso')->checkKey()) die('');
}
@@ -385,9 +385,12 @@ class block extends control
$this->app->setClientLang($lang);
$this->app->loadLang('common');
$this->app->loadLang('block');
if(!$this->block->checkAPI($this->get->hash)) die();
}
$mode = strtolower($this->get->mode);
if($mode == 'getblocklist')
{
$blocks = $this->block->getAvailableBlocks($module);
+1
View File
@@ -64,6 +64,7 @@ function refreshBlock($panel, afterRefresh)
else if($panel.find('#assigntomeBlock').length) $panel.find('#assigntomeBlock').empty().append($data.children());
else
{
$panel.children('.panel-move-handler,style').remove();
$panel.find('.panel-body,.empty-tip').replaceWith($data);
}
if($.isFunction(afterRefresh))
+21
View File
@@ -618,6 +618,27 @@ class blockModel extends model
*/
public function isLongBlock($block)
{
if(empty($block)) return true;
return $block->grid >= 6;
}
/**
* Check API for ranzhi
*
* @param string $hash
* @access public
* @return bool
*/
public function checkAPI($hash)
{
if(empty($hash)) return false;
$key = $this->dao->select('value')->from(TABLE_CONFIG)
->where('owner')->eq('system')
->andWhere('module')->eq('sso')
->andWhere('`key`')->eq('key')
->fetch('value');
return $key == $hash;
}
}
+1 -1
View File
@@ -23,7 +23,7 @@
.block-bugs.block-sm .c-status .label-dot {display: none;}
.block-bugs.block-sm .c-status {text-align: center;}
</style>
<div class='panel-body has-table'>
<div class='panel-body has-table scrollbar-hover'>
<table class='table table-borderless table-fixed-head table-hover tablesorter block-bugs <?php if(!$longBlock) echo 'block-sm'?>'>
<thead>
<tr>
+1 -1
View File
@@ -13,7 +13,7 @@
<?php if(empty($builds)): ?>
<div class='empty-tip'><?php echo $lang->block->emptyTip;?></div>
<?php else:?>
<div class='panel-body has-table'>
<div class='panel-body has-table scrollbar-hover'>
<table class='table table-borderless table-hover table-fixed-head tablesorter block-builds'>
<thead>
<tr>
+1 -1
View File
@@ -14,7 +14,7 @@
<?php if(empty($cases)): ?>
<div class='empty-tip'><?php echo $lang->block->emptyTip;?></div>
<?php else:?>
<div class='panel-body has-table'>
<div class='panel-body has-table scrollbar-hover'>
<style>
.block-cases.block-sm .c-status{text-align:center}
.block-cases.block-sm .c-status .status-text{display:none;}
+1 -1
View File
@@ -17,7 +17,7 @@ if(isset($pageCSS)) css::internal($pageCSS);
$useGuest = $this->app->user->account == 'guest';
?>
<?php include '../../common/view/tablesorter.html.php';?>
<div class='dashboard' id='dashboard' data-confirm-remove-block='<?php echo $lang->block->confirmRemoveBlock;?>'>
<div class='dashboard auto-fade-in fade' id='dashboard' data-confirm-remove-block='<?php echo $lang->block->confirmRemoveBlock;?>'>
<div class="row">
<div class='col-main'>
<?php foreach($longBlocks as $index => $block):?>
+1 -1
View File
@@ -20,7 +20,7 @@
.block-flowchart .flowchart-title {font-size: 14px;font-weight: bold;color: #3c4353;}
.block-flowchart .flowchart-step {display: inline-block;width: 24px;height: 24px;font-size: 14px;line-height: 24px;color: #fff; border-radius: 50%;}
</style>
<div class='panel-body has-table'>
<div class='panel-body has-table scrollbar-hover'>
<table class="table table-borderless">
<thead>
<tr>
+1 -1
View File
@@ -13,7 +13,7 @@
<?php if(empty($plans)): ?>
<div class='empty-tip'><?php echo $lang->block->emptyTip;?></div>
<?php else:?>
<div class='panel-body has-table'>
<div class='panel-body has-table scrollbar-hover'>
<table class='table table-borderless table-hover table-fixed-head tablesorter block-plan'>
<thead>
<tr>
+1 -1
View File
@@ -16,7 +16,7 @@
<style>
.block-products.block-sm .c-project {display: none;}
</style>
<div class="panel-body has-table block-products">
<div class="panel-body has-table scrollbar-hover block-products">
<table class='table table-borderless table-hover table-fixed-head tablesorter table-fixed'>
<thead>
<tr>
@@ -34,7 +34,7 @@
.block-statistic .tile {margin-bottom: 30px;}
.block-statistic .tile-title {font-size: 18px; color: #A6AAB8;}
.block-statistic .tile-amount {font-size: 48px; margin-bottom: 10px;}
.block-statistic .col-nav {border-left: 1px solid #EBF2FB; width: 260px; padding-left: 0;}
.block-statistic .col-nav {border-left: 1px solid #EBF2FB; width: 260px; padding: 0;}
.block-statistic .nav-secondary > li > a {font-size: 14px; color: #838A9D; position: relative; box-shadow: none; padding-left: 20px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; transition: all .2s;}
.block-statistic .nav-secondary > li.active > a {color: #3C4353; background: transparent; box-shadow: none;}
.block-statistic .nav-secondary > li.active > a:hover,
@@ -162,7 +162,7 @@
<?php endforeach;?>
</div>
<div class="col col-nav">
<ul class="nav nav-stacked nav-secondary">
<ul class="nav nav-stacked nav-secondary scrollbar-hover">
<?php foreach($products as $product):?>
<li <?php if($product == reset($products)) echo "class='active'";?>><a href="javascript:;" data-target="#tab<?php echo $product->code;?>" data-toggle="tab" title='<?php echo $product->name;?>'><?php echo $product->name;?></a></li>
<?php endforeach;?>
+1 -1
View File
@@ -13,7 +13,7 @@
<?php if(empty($projectStats)): ?>
<div class='empty-tip'><?php common::printLink('project', 'create', '', "<i class='icon-plus'></i> " . $lang->project->create, '', "class='btn btn-primary'")?></div>
<?php else:?>
<div class="panel-body has-table">
<div class="panel-body has-table scrollbar-hover">
<table class='table table-borderless table-hover table-fixed-head tablesorter block-projects tablesorter'>
<thead>
<tr class='text-center'>
@@ -21,7 +21,7 @@
.block-statistic .tile {margin-bottom: 30px;}
.block-statistic .tile-title {font-size: 18px; color: #A6AAB8;}
.block-statistic .tile-amount {font-size: 48px; margin-bottom: 10px;}
.block-statistic .col-nav {border-left: 1px solid #EBF2FB; width: 260px; padding-left: 0;}
.block-statistic .col-nav {border-left: 1px solid #EBF2FB; width: 260px; padding: 0;}
.block-statistic .nav-secondary > li > a {font-size: 14px; color: #838A9D; position: relative; box-shadow: none; padding-left: 20px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; transition: all .2s;}
.block-statistic .nav-secondary > li.active > a {color: #3C4353; background: transparent; box-shadow: none;}
.block-statistic .nav-secondary > li.active > a:hover,
@@ -116,7 +116,7 @@
<?php endforeach;?>
</div>
<div class="col col-nav">
<ul class="nav nav-stacked nav-secondary">
<ul class="nav nav-stacked nav-secondary scrollbar-hover">
<?php foreach($projects as $project):?>
<li <?php if($project == reset($projects)) echo "class='active'";?>><a href="###" data-target="#tab3Content<?php echo $project->id;?>" data-toggle="tab"><?php echo $project->name;?></a></li>
<?php endforeach;?>
+3 -2
View File
@@ -17,11 +17,12 @@
.product-info .type-value {font-size: 14px;}
.product-info .type-value > strong {font-size: 20px; color: #3C4353;}
.product-info .actions {position: absolute; left: 10px; top: 14px;}
.block-statistic .panel-body {padding-top: 0;}
.block-statistic .tile {margin-bottom: 30px;}
.block-statistic .tile-title {font-size: 18px; color: #A6AAB8;}
.block-statistic .tile-amount {font-size: 48px; margin-bottom: 10px;}
.block-statistic .col-nav {border-left: 1px solid #EBF2FB; width: 260px; padding-left: 0;}
.block-statistic .nav-secondary > li > a {font-size: 16px; color: #838A9D; position: relative; box-shadow: none; padding-left: 20px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; transition: all .2s;}
.block-statistic .col-nav {border-left: 1px solid #EBF2FB; width: 260px; padding: 0;}
.block-statistic .nav-secondary > li > a {font-size: 14px; color: #838A9D; position: relative; box-shadow: none; padding-left: 20px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; transition: all .2s;}
.block-statistic .nav-secondary > li.active > a {color: #3C4353; background: transparent; box-shadow: none;}
.block-statistic .nav-secondary > li.active > a:hover,
.block-statistic .nav-secondary > li.active > a:focus,
+1 -1
View File
@@ -13,7 +13,7 @@
<?php if(empty($releases)): ?>
<div class='empty-tip'><?php echo $lang->block->emptyTip;?></div>
<?php else:?>
<div class='panel-body has-table'>
<div class='panel-body has-table scrollbar-hover'>
<table class='table table-borderless table-hover table-fixed tablesorter block-release'>
<thead>
<tr>
+1 -1
View File
@@ -24,7 +24,7 @@
.block-stories.block-sm .c-status .label-dot {display: none;}
.block-stories.block-sm .c-status {text-align: center;}
</style>
<div class='panel-body has-table'>
<div class='panel-body has-table scrollbar-hover'>
<table class='table table-borderless table-hover table-fixed-head tablesorter block-stories <?php if(!$longBlock) echo 'block-sm'?>'>
<thead>
<tr>
+1 -1
View File
@@ -24,7 +24,7 @@
.block-tasks.block-sm .c-status .label-dot {display: none;}
.block-tasks.block-sm .c-status {text-align: center;}
</style>
<div class='panel-body has-table'>
<div class='panel-body has-table scrollbar-hover'>
<table class='table table-borderless table-hover table-fixed-head tablesorter block-tasks <?php if(!$longBlock) echo 'block-sm';?>'>
<thead>
<tr>
+1 -1
View File
@@ -13,7 +13,7 @@
<?php if(empty($testtasks)): ?>
<div class='empty-tip'><?php echo $lang->block->emptyTip;?></div>
<?php else:?>
<div class='panel-body has-table'>
<div class='panel-body has-table scrollbar-hover'>
<table class='table table-borderless table-hover table-fixed-head tablesorter block-testtask'>
<thead>
<tr class='text-center'>
+1 -1
View File
@@ -26,7 +26,7 @@
.block-todoes .todo-check {position: absolute; top: 5px; left: 10px; display: block; width: 20px; height: 20px; font-size: 20px; color: transparent; cursor: pointer; background: #fff; border: 2px solid #eee; border-radius: 50%;}
.block-todoes .todo-check:hover {border-color: #8e939a;}
.block-todoes .active > .todo-check {color: #00da88; background: transparent;border: none;}
.block-todoes .todoes-form {position: absolute; top: -45px; right: 0; left: 0; z-index: 15; max-width: 500px; padding: 12px 20px 20px; visibility: hidden; background: #fff; -webkit-box-shadow: 0 0 20px 0 #bdc9d8; box-shadow: 0 0 20px 0 #bdc9d8; opacity: 0;-webkit-transition: .4s cubic-bezier(.175, .885, .32, 1); -o-transition: .4s cubic-bezier(.175, .885, .32, 1); transition: .4s cubic-bezier(.175, .885, .32, 1); -webkit-transition-property: opacity, visibility; -o-transition-property: opacity, visibility; transition-property: opacity, visibility;}
.block-todoes .todoes-form {position: absolute; top: -45px; right: 0; left: 0; z-index: 1011; max-width: 500px; padding: 12px 20px 20px; visibility: hidden; background: #fff; -webkit-box-shadow: 0 0 20px 0 #bdc9d8; box-shadow: 0 0 20px 0 #bdc9d8; opacity: 0;-webkit-transition: .4s cubic-bezier(.175, .885, .32, 1); -o-transition: .4s cubic-bezier(.175, .885, .32, 1); transition: .4s cubic-bezier(.175, .885, .32, 1); -webkit-transition-property: opacity, visibility; -o-transition-property: opacity, visibility; transition-property: opacity, visibility;}
.block-todoes .todoes-form .form-group > label {padding-left: 0;}
.block-todoes .todoes-form .form-group > label.text-center {text-align: center!important;}
.block-todoes .todoes-form > .form-group:last-child {margin-bottom: 0;}