Merge branch 'main' of https://gitfox.zcorp.cc/git/zentao/zentaopms into main
This commit is contained in:
@@ -60,9 +60,6 @@ class productsBox extends wg
|
||||
return div
|
||||
(
|
||||
setClass('productsBox'),
|
||||
on::click('.productsBox .addLine', 'window.addNewLine'),
|
||||
on::click('.productsBox .removeLine', 'window.removeLine'),
|
||||
on::change('.productsBox [name^=products]', 'window.loadBranches'),
|
||||
jsVar('multiBranchProducts', data('multiBranchProducts')),
|
||||
jsVar('project', \zget($project, 'id', 0)),
|
||||
jsVar('errorSameProducts', $errorSameProducts),
|
||||
@@ -104,6 +101,7 @@ class productsBox extends wg
|
||||
$hasNewProduct ? set::checkbox(array('text' => $lang->project->addProduct, 'name' => 'addProduct', 'checked' => false)) : false,
|
||||
picker
|
||||
(
|
||||
on::change()->call('loadBranches', jsRaw('event')),
|
||||
set::name('products[0]'),
|
||||
set::items($productItems),
|
||||
!empty($project) && empty($project->hasProduct) ? set::value(current(array_keys($productItems))) : null,
|
||||
@@ -148,11 +146,13 @@ class productsBox extends wg
|
||||
setClass('pl-2 flex self-center line-btn c-actions first-action'),
|
||||
btn
|
||||
(
|
||||
on::click()->call('addNewLine', jsRaw('event')),
|
||||
setClass('btn btn-link text-gray addLine'),
|
||||
icon('plus')
|
||||
),
|
||||
btn
|
||||
(
|
||||
on::click()->call('removeLine', jsRaw('event')),
|
||||
setClass('btn btn-link text-gray removeLine'),
|
||||
setClass('hidden'),
|
||||
icon('trash')
|
||||
@@ -258,6 +258,7 @@ class productsBox extends wg
|
||||
setClass('grow'),
|
||||
picker
|
||||
(
|
||||
on::change()->call('loadBranches', jsRaw('event')),
|
||||
set::name("products[$i]"),
|
||||
set::value($product->id),
|
||||
set::items($productItems),
|
||||
@@ -323,11 +324,13 @@ class productsBox extends wg
|
||||
setClass('pl-2 flex self-center line-btn c-actions', $i == 0 ? 'first-action' : ''),
|
||||
btn
|
||||
(
|
||||
on::click()->call('addNewLine', jsRaw('event')),
|
||||
setClass('btn btn-link text-gray addLine'),
|
||||
icon('plus')
|
||||
),
|
||||
btn
|
||||
(
|
||||
on::click()->call('removeLine', jsRaw('event')),
|
||||
setClass('btn btn-link text-gray removeLine'),
|
||||
setClass($i == 0 ? 'hidden' : ''),
|
||||
icon('trash')
|
||||
|
||||
@@ -36,7 +36,9 @@ class treemap extends wg
|
||||
'nodeTemplate?: string', // 节点元素模板。
|
||||
'onNodeClick?: function', // 节点元素模板。
|
||||
'afterDrawLines?: function', // 节点元素模板。
|
||||
'afterRender?: function' // 节点元素模板。
|
||||
'afterRender?: function', // 节点元素模板。
|
||||
'onContextMenu?: function', // 上下文菜单事件回调函数。
|
||||
'onReady?: function' // 组件就绪回调函数。
|
||||
);
|
||||
|
||||
protected function build(): array
|
||||
@@ -46,7 +48,7 @@ class treemap extends wg
|
||||
list($width, $height) = $this->prop(array('width', 'height'));
|
||||
$dataVarName = "_treemap_$this->gid";
|
||||
$treemapPath = $app->getWebRoot() . 'js/zui/treemap/index.html?options=' . $dataVarName;
|
||||
$options = $this->props->pick(array('hotkeyEnable', 'hotkeys', 'lang', 'langs', 'data', 'nodeTeamplate', 'hSpace', 'vSpace', 'canvasPadding', 'removingNodeTip', 'lineCurvature', 'subLineWidth', 'lineColor', 'lineOpacity', 'lineSaturation', 'lineLightness', 'nodeLineWidth', 'showToggleButton', 'readonly', 'minimap', 'toolbar', 'zoom', 'zoomMax', 'zoomMin', 'minimapHeight', 'onNodeClick', 'afterDrawLines', 'afterRender'));
|
||||
$options = $this->props->pick(array('hotkeyEnable', 'hotkeys', 'lang', 'langs', 'data', 'nodeTeamplate', 'hSpace', 'vSpace', 'canvasPadding', 'removingNodeTip', 'lineCurvature', 'subLineWidth', 'lineColor', 'lineOpacity', 'lineSaturation', 'lineLightness', 'nodeLineWidth', 'showToggleButton', 'readonly', 'minimap', 'toolbar', 'zoom', 'zoomMax', 'zoomMin', 'minimapHeight', 'onNodeClick', 'afterDrawLines', 'afterRender', 'onReady', 'onContextMenu'));
|
||||
return array
|
||||
(
|
||||
h::jsVar("window.$dataVarName", $options),
|
||||
|
||||
@@ -96,7 +96,6 @@ $lang->job->paramValueList['$zentao_repopath'] = 'Current version library path';
|
||||
|
||||
$lang->job->engineList = array();
|
||||
$lang->job->engineList[''] = '';
|
||||
$lang->job->engineList['gitfox'] = 'GitFox';
|
||||
$lang->job->engineList['gitlab'] = 'GitLab';
|
||||
$lang->job->engineList['jenkins'] = 'Jenkins';
|
||||
|
||||
|
||||
@@ -96,7 +96,6 @@ $lang->job->paramValueList['$zentao_repopath'] = 'Current version library path';
|
||||
|
||||
$lang->job->engineList = array();
|
||||
$lang->job->engineList[''] = '';
|
||||
$lang->job->engineList['gitfox'] = 'GitFox';
|
||||
$lang->job->engineList['gitlab'] = 'GitLab';
|
||||
$lang->job->engineList['jenkins'] = 'Jenkins';
|
||||
|
||||
|
||||
@@ -96,7 +96,6 @@ $lang->job->paramValueList['$zentao_repopath'] = 'Current version library path';
|
||||
|
||||
$lang->job->engineList = array();
|
||||
$lang->job->engineList[''] = '';
|
||||
$lang->job->engineList['gitfox'] = 'GitFox';
|
||||
$lang->job->engineList['gitlab'] = 'GitLab';
|
||||
$lang->job->engineList['jenkins'] = 'Jenkins';
|
||||
|
||||
|
||||
@@ -96,7 +96,6 @@ $lang->job->paramValueList['$zentao_repopath'] = '当前版本库路径';
|
||||
|
||||
$lang->job->engineList = array();
|
||||
$lang->job->engineList[''] = '';
|
||||
$lang->job->engineList['gitfox'] = 'GitFox';
|
||||
$lang->job->engineList['gitlab'] = 'GitLab';
|
||||
$lang->job->engineList['jenkins'] = 'Jenkins';
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@ if(file_exists($viewFile)) include_once $viewFile;
|
||||
if($this->config->edition != 'open')
|
||||
{
|
||||
$pivotPath = $this->app->getModuleExtPath('pivot', 'ui');
|
||||
if($method == 'show') $exportMode = 'preview';
|
||||
include $pivotPath['common'] . 'exportdata.html.php';
|
||||
}
|
||||
|
||||
|
||||
@@ -137,6 +137,11 @@ class projectZen extends project
|
||||
private function checkProductAndBranch(object $project, object $rawdata): bool
|
||||
{
|
||||
$linkedProductsCount = $this->project->getLinkedProductsCount($project, $rawdata);
|
||||
if(!empty($project->parent) && empty($linkedProductsCount))
|
||||
{
|
||||
dao::$errors['products[0]'] = $this->lang->project->errorNoProducts;
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!empty($rawdata->products))
|
||||
{
|
||||
|
||||
@@ -177,7 +177,6 @@ $lang->repo->logStyles['D'] = 'Delete';
|
||||
$lang->repo->encodingList['utf_8'] = 'UTF-8';
|
||||
$lang->repo->encodingList['gbk'] = 'GBK';
|
||||
|
||||
$lang->repo->scmList['GitFox'] = 'GitFox';
|
||||
$lang->repo->scmList['Gitlab'] = 'GitLab';
|
||||
if(!$config->inQuickon)
|
||||
{
|
||||
|
||||
@@ -177,7 +177,6 @@ $lang->repo->logStyles['D'] = 'Delete';
|
||||
$lang->repo->encodingList['utf_8'] = 'UTF-8';
|
||||
$lang->repo->encodingList['gbk'] = 'GBK';
|
||||
|
||||
$lang->repo->scmList['GitFox'] = 'GitFox';
|
||||
$lang->repo->scmList['Gitlab'] = 'GitLab';
|
||||
if(!$config->inQuickon)
|
||||
{
|
||||
|
||||
@@ -177,7 +177,6 @@ $lang->repo->logStyles['D'] = 'Suppression';
|
||||
$lang->repo->encodingList['utf_8'] = 'UTF-8';
|
||||
$lang->repo->encodingList['gbk'] = 'GBK';
|
||||
|
||||
$lang->repo->scmList['GitFox'] = 'GitFox';
|
||||
$lang->repo->scmList['Gitlab'] = 'GitLab';
|
||||
if(!$config->inQuickon)
|
||||
{
|
||||
|
||||
@@ -177,7 +177,6 @@ $lang->repo->logStyles['D'] = '删除';
|
||||
$lang->repo->encodingList['utf_8'] = 'UTF-8';
|
||||
$lang->repo->encodingList['gbk'] = 'GBK';
|
||||
|
||||
$lang->repo->scmList['GitFox'] = 'GitFox';
|
||||
$lang->repo->scmList['Gitlab'] = 'GitLab';
|
||||
if(!$config->inQuickon)
|
||||
{
|
||||
|
||||
@@ -28,7 +28,6 @@ if($config->inQuickon) $lang->space->featureBar['browse']['running'] = 'Running
|
||||
if($config->inQuickon) $lang->space->featureBar['browse']['stopped'] = 'Stopped';
|
||||
if($config->inQuickon) $lang->space->featureBar['browse']['abnormal'] = 'Abnormal';
|
||||
|
||||
$lang->space->appType['gitfox'] = 'GitFox';
|
||||
$lang->space->appType['gitlab'] = 'GitLab';
|
||||
$lang->space->appType['jenkins'] = 'Jenkins';
|
||||
$lang->space->appType['sonarqube'] = 'SonarQube';
|
||||
|
||||
@@ -28,7 +28,6 @@ if($config->inQuickon) $lang->space->featureBar['browse']['running'] = 'Running
|
||||
if($config->inQuickon) $lang->space->featureBar['browse']['stopped'] = 'Stopped';
|
||||
if($config->inQuickon) $lang->space->featureBar['browse']['abnormal'] = 'Abnormal';
|
||||
|
||||
$lang->space->appType['gitfox'] = 'GitFox';
|
||||
$lang->space->appType['gitlab'] = 'GitLab';
|
||||
$lang->space->appType['jenkins'] = 'Jenkins';
|
||||
$lang->space->appType['sonarqube'] = 'SonarQube';
|
||||
|
||||
@@ -28,7 +28,6 @@ if($config->inQuickon) $lang->space->featureBar['browse']['running'] = 'Running
|
||||
if($config->inQuickon) $lang->space->featureBar['browse']['stopped'] = 'Stopped';
|
||||
if($config->inQuickon) $lang->space->featureBar['browse']['abnormal'] = 'Abnormal';
|
||||
|
||||
$lang->space->appType['gitfox'] = 'GitFox';
|
||||
$lang->space->appType['gitlab'] = 'GitLab';
|
||||
$lang->space->appType['jenkins'] = 'Jenkins';
|
||||
$lang->space->appType['sonarqube'] = 'SonarQube';
|
||||
|
||||
@@ -28,7 +28,6 @@ if($config->inQuickon) $lang->space->featureBar['browse']['running'] = '运行
|
||||
if($config->inQuickon) $lang->space->featureBar['browse']['stopped'] = '已关闭';
|
||||
if($config->inQuickon) $lang->space->featureBar['browse']['abnormal'] = '异常';
|
||||
|
||||
$lang->space->appType['gitfox'] = 'GitFox';
|
||||
$lang->space->appType['gitlab'] = 'GitLab';
|
||||
$lang->space->appType['jenkins'] = 'Jenkins';
|
||||
$lang->space->appType['sonarqube'] = 'SonarQube';
|
||||
|
||||
@@ -29,6 +29,7 @@ if(!options.manual) $('#mindmap').mindmap(options);
|
||||
parent.createMindmap = function(userOptions){return $('#mindmap').mindmap($.extend({}, options, userOptions)).data('zui.mindmap');};
|
||||
parent.getMindmap = function(){return $('#mindmap').data('zui.mindmap');};
|
||||
parent.mindmap$ = $;
|
||||
$('body').on('click', () => window.parent.$(window.frameElement).trigger('click'));
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -25,6 +25,28 @@ window.parent.$(function()
|
||||
$('#treemap').treemap($.extend({}, window.parent[$.getSearchParam('options')]));
|
||||
const treemap = $('#treemap').data('zui.treemap');
|
||||
window.parent.getTreemap = function() {return treemap;};
|
||||
if(treemap.options.onReady) treemap.options.onReady(treemap, window);
|
||||
$('body').on('click', () => window.parent.$(window.frameElement).trigger('click'));
|
||||
if(treemap.options.onContextMenu)
|
||||
{
|
||||
treemap.$nodes.on('contextmenu', function(e)
|
||||
{
|
||||
const $node = $(e.target).closest('.treemap-node');
|
||||
const node = $node.data('node');
|
||||
const frameBounding = window.frameElement.getBoundingClientRect();
|
||||
const clientX = e.clientX + frameBounding.left;
|
||||
const clientY = e.clientY + frameBounding.top;
|
||||
let result = treemap.options.onContextMenu({node: node, clientX: clientX, clientY: clientY, treemap: treemap, event: e});
|
||||
if(!result) return;
|
||||
if(Array.isArray(result)) result = {items: result};
|
||||
window.parent.zui.ContextMenu.show($.extend(
|
||||
{
|
||||
element: {getBoundingClientRect: () => ({x: clientX, y: clientY, width: 0, height: 0, left: clientX, top: clientY})},
|
||||
}, result));
|
||||
e.preventDefault();
|
||||
return false;
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user