* code for task #48563.

This commit is contained in:
王怡栋
2022-02-08 17:17:27 +08:00
parent d6e50b5609
commit de7a31718e
29 changed files with 29 additions and 193 deletions
@@ -0,0 +1 @@
<?php include $this->app->getExtensionRoot() . 'biz/flow/ext/view/' . basename(__FILE__);?>
@@ -0,0 +1 @@
<?php include $this->app->getExtensionRoot() . 'biz/flow/ext/view/' . basename(__FILE__);?>
@@ -1,28 +1 @@
<?php
$class = $currentApp ? '' : "class='active'";
$method = 'browseFlow';
$featurabar = "<div id='featurebar'><ul class='nav'>";
$featurabar .= "<li $class>" . html::a(inlink($method, "status=&app=&orderBy=$orderBy"), $lang->workflow->all) . '</li>';
$flowApps = $this->workflow->getFlowApps();
foreach($flowApps as $appCode)
{
$appName = zget($apps, $appCode, '');
if($appCode == 'project') $appName = $lang->project->common;
if($appCode == 'scrum') continue;
if(!$appName) continue;
$class = $appCode == $currentApp ? "class='active'" : '';
$featurabar .= "<li $class>" . html::a(inlink($method, "status=&app=$appCode&orderBy=$orderBy"), $appName) . '</li>';
}
$featurabar .= "</ul></div>";
?>
<script>
$(function()
{
if($('#featurebar').length == 0) $('#main .container').prepend(<?php echo json_encode($featurabar);?>);
$('a[disabled=disabled]').addClass('disabled');
$('.deleter').attr('data-toggle', 'ajax');
});
</script>
<?php include $this->app->getExtensionRoot() . 'biz/workflow/ext/view/' . basename(__FILE__);?>
@@ -1,27 +1 @@
<style>
.col-md-5 .main-table td.actions .btn{
display: inline-block;
width: 26px;
padding: 2px;
overflow: hidden;
line-height: 20px;
color: #16a8f8;
background: 0 0;
border-color: transparent;
}
</style>
<script>
$(function()
{
$('tr.data-url').removeAttr('data-url');
var html = $('.col-md-5 .main-table td.actions a.fields:first').html();
$('.col-md-5 .main-table td.actions a.fields').attr('title', html).addClass('btn').html("<i class='icon icon-fields'></i>");
var html = $('.col-md-5 .main-table td.actions a.edit:first').html();
$('.col-md-5 .main-table td.actions a.edit').attr('title', html).addClass('btn').html("<i class='icon icon-edit'></i>");
var html = $('.col-md-5 .main-table td.actions a.deleter:first').html();
$('.col-md-5 .main-table td.actions a.deleter').attr('title', html).addClass('btn').html("<i class='icon icon-trash'></i>");
$('.col-md-5 .main-table tr').removeAttr('data-url');
})
</script>
<?php include $this->app->getExtensionRoot() . 'biz/workflow/ext/view/' . basename(__FILE__);?>
@@ -1,31 +1 @@
<?php if($source->type == 'flow'):?>
<?php
$select = html::select('navigator', $lang->workflow->navigators, '', "class='form-control'");
$navigator = <<<EOT
<tr>
<th class='w-80px'>{$lang->workflow->navigator}</th>
<td>{$select}</td>
<td class='w-40px'></td>
</tr>
EOT;
?>
<script>
$('#app').parents('tr').before(<?php echo json_encode($navigator);?>).hide();
$('div.required.required-wrapper').remove();
setRequiredFields();
$('#navigator').change(function()
{
if($(this).val() == 'primary')
{
$('#app').parents('tr').hide();
$('select#positionModule').load(createLink('workflow', 'ajaxGetApps'));
}
if($(this).val() == 'secondary')
{
$('#app').parents('tr').show();
$('select#positionModule').load(createLink('workflow', 'ajaxGetAppMenus', 'app=' + $('#app').val() + '&exclude=<?php echo $source->module;?>'));
}
});
</script>
<?php endif;?>
<?php include $this->app->getExtensionRoot() . 'biz/workflow/ext/view/' . basename(__FILE__);?>
@@ -1,40 +1 @@
<?php if($flow->type == 'flow'):?>
<?php
$select = html::select('navigator', $lang->workflow->navigators, $flow->navigator, "class='form-control'");
$navigator = <<<EOT
<tr>
<th class='w-80px'>{$lang->workflow->navigator}</th>
<td>{$select}</td>
<td class='w-40px'></td>
</tr>
EOT;
?>
<script>
$('#app').parents('tr').before(<?php echo json_encode($navigator);?>);
$('div.required.required-wrapper').remove();
setRequiredFields();
$('#navigator').change(function()
{
var app = '<?php echo $flow->app;?>';
var position = '<?php echo $flow->positionModule;?>';
var link = createLink('workflow', 'ajaxGetApps', 'exclude=<?php echo $flow->module;?>');
if($(this).val() == 'primary') $('#app').parents('tr').hide();
if($(this).val() == 'secondary')
{
$('#app').parents('tr').show();
$('#app').load(link, function()
{
$(this).val(app).trigger('chosen:updated');
});
link = createLink('workflow', 'ajaxGetAppMenus', 'app=' + $('#app').val() + '&exclude=' + currentModule);
}
$('select#positionModule').load(link, function()
{
$(this).val(position);
});
});
$('#navigator').change();
</script>
<?php endif;?>
<?php include $this->app->getExtensionRoot() . 'biz/workflow/ext/view/' . basename(__FILE__);?>
@@ -1,3 +1 @@
<script>
if(typeof(readonlyActions) == 'undefined') readonlyActions = '';
</script>
<?php include $this->app->getExtensionRoot() . 'biz/workflow/ext/view/' . basename(__FILE__);?>
@@ -1,52 +1 @@
<?php if(isset($flow) and $flow->type == 'flow'):?>
<?php
$select = html::select('navigator', $lang->workflow->navigators, $flow->navigator, "class='form-control'");
$navigator = <<<EOT
<tr>
<th class='w-80px'>{$lang->workflow->navigator}</th>
<td>{$select}</td>
<td class='w-40px'></td>
</tr>
EOT;
?>
<?php
js::set('positionModule', $flow->positionModule);
js::set('position', $flow->position);
js::set('app', $flow->app);
?>
<script>
$('#app').parents('tr').before(<?php echo json_encode($navigator);?>).hide();
$('div.required.required-wrapper').remove();
var $inputGroup = $('#app').closest('.input-group');
$inputGroup.find('#name').remove();
$inputGroup.find('#code').remove();
$inputGroup.find('.input-group-addon').remove();
setRequiredFields();
$('#navigator').change(function()
{
if($(this).val() == 'primary')
{
$('#app').parents('tr').hide();
$('select#positionModule').load(createLink('workflow', 'ajaxGetApps'), function()
{
$('#positionModule').val(positionModule);
$('#position').val(position);
});
}
if($(this).val() == 'secondary')
{
$('#app').parents('tr').show();
$('select#positionModule').load(createLink('workflow', 'ajaxGetAppMenus', 'app=' + $('#app').val() + '&exclude=<?php echo $flow->module;?>'), function()
{
$('#app').val(app);
$('#positionModule').val(positionModule);
$('#position').val(position);
});
}
});
$('#navigator').change();
</script>
<?php endif;?>
<?php include $this->app->getExtensionRoot() . 'biz/workflow/ext/view/' . basename(__FILE__);?>
@@ -1 +1 @@
<?php include dirname(dirname(dirname(dirname(__FILE__)))) . '/workflowfield/ext/view/setexport.flow.html.hook.php';?>
<?php include $this->app->getExtensionRoot() . 'biz/workflow/ext/view/' . basename(__FILE__);?>
@@ -1 +1 @@
<?php include dirname(dirname(dirname(dirname(__FILE__)))) . '/workflowfield/ext/view/setexport.flow.html.hook.php';?>
<?php include $this->app->getExtensionRoot() . 'biz/workflow/ext/view/' . basename(__FILE__);?>
@@ -1,10 +1 @@
<script>
if(typeof(fieldDefaultOptions) == 'undefined') fieldDefaultOptions = '';
$(function()
{
$('a.btn[href="#confirmReleaseModal"]').click(function()
{
saveFields(function(result){});
})
})
</script>
<?php include $this->app->getExtensionRoot() . 'biz/workflow/ext/view/' . basename(__FILE__);?>
@@ -0,0 +1 @@
<?php include $this->app->getExtensionRoot() . 'biz/workflowaction/ext/view/' . basename(__FILE__);?>
@@ -0,0 +1 @@
<?php include $this->app->getExtensionRoot() . 'biz/workflowaction/ext/view/' . basename(__FILE__);?>
@@ -0,0 +1 @@
<?php include $this->app->getExtensionRoot() . 'biz/workflowaction/ext/view/' . basename(__FILE__);?>
@@ -0,0 +1 @@
<?php include $this->app->getExtensionRoot() . 'biz/workflowaction/ext/view/' . basename(__FILE__);?>
@@ -0,0 +1 @@
<?php include $this->app->getExtensionRoot() . 'biz/workflowdatasource/ext/view/' . basename(__FILE__);?>
@@ -0,0 +1 @@
<?php include $this->app->getExtensionRoot() . 'biz/workflowdatasource/ext/view/' . basename(__FILE__);?>
@@ -0,0 +1 @@
<?php include $this->app->getExtensionRoot() . 'biz/workflowdatasource/ext/view/' . basename(__FILE__);?>
@@ -0,0 +1 @@
<?php include $this->app->getExtensionRoot() . 'biz/workflowfield/ext/view/' . basename(__FILE__);?>
@@ -0,0 +1 @@
<?php include $this->app->getExtensionRoot() . 'biz/workflowfield/ext/view/' . basename(__FILE__);?>
@@ -0,0 +1 @@
<?php include $this->app->getExtensionRoot() . 'biz/workflowfield/ext/view/' . basename(__FILE__);?>
@@ -0,0 +1 @@
<?php include "setexport.flow.html.hook.php";?>
@@ -0,0 +1 @@
<?php include $this->app->getExtensionRoot() . 'biz/workflowhook/ext/view/' . basename(__FILE__);?>
@@ -0,0 +1 @@
<?php include $this->app->getExtensionRoot() . 'biz/workflowhook/ext/view/' . basename(__FILE__);?>
@@ -0,0 +1 @@
<?php include $this->app->getExtensionRoot() . 'biz/workflowlabel/ext/view/' . basename(__FILE__);?>
@@ -0,0 +1 @@
<?php include $this->app->getExtensionRoot() . 'biz/workflowlayout/ext/view/' . basename(__FILE__);?>
@@ -0,0 +1 @@
<?php include $this->app->getExtensionRoot() . 'biz/workflowrelation/ext/view/' . basename(__FILE__);?>
@@ -0,0 +1 @@
<?php include $this->app->getExtensionRoot() . 'biz/workflowrule/ext/view/' . basename(__FILE__);?>
@@ -0,0 +1 @@
<?php include $this->app->getExtensionRoot() . 'biz/workflowrule/ext/view/' . basename(__FILE__);?>