This commit is contained in:
wangyidong
2023-04-07 17:38:21 +08:00
parent 56d2615fb4
commit 6042806e2a
3 changed files with 22 additions and 12 deletions
+16 -6
View File
@@ -343,25 +343,35 @@ function locateNewLib(type, objectID, libID)
*/
function setSavePath()
{
var getSubPath = function($obj)
{
var $td = $obj.parent();
var usePicker = $td.find('.picker').length == 1;
var subPath = $obj.find('option:checked').text();
if(usePicker) subPath = $td.find('.picker .picker-selection-text').text();
return subPath;
}
savePath = defaultSave;
if($('#modalBasicInfo #product').length == 1)
{
savePath += $('#modalBasicInfo #product option:checked').text() + '/';
savePath += getSubPath($('#modalBasicInfo #product')) + '/';
}
else if($('#modalBasicInfo #project').length == 1 && $('#modalBasicInfo #execution').length == 0)
{
savePath += $('#modalBasicInfo #project option:checked').text() + '/';
savePath += getSubPath($('#modalBasicInfo #project')) + '/';
}
else if($('#modalBasicInfo #project').length == 1 && $('#modalBasicInfo #execution').length == 1)
{
if($('#modalBasicInfo #execution').val() == '') savePath += $('#modalBasicInfo #project option:checked').text() + '/';
if($('#modalBasicInfo #execution').val() != '') savePath += $('#modalBasicInfo #execution option:checked').text() + '/';
var executionID = $('#modalBasicInfo #execution').val();
if(executionID == '0' || executionID == '') savePath += getSubPath($('#modalBasicInfo #project')) + '/';
if(executionID != '0' && executionID != '') savePath += getSubPath($('#modalBasicInfo #execution')) + '/';
}
else if($('#modalBasicInfo #execution').length == 1)
{
savePath += $('#modalBasicInfo #execution option:checked').text() + '/';
savePath += getSubPath($('#modalBasicInfo #execution')) + '/';
}
savePath += $('#modalBasicInfo #module option:checked').text();
savePath += getSubPath($('#modalBasicInfo #module'));
$('#savePath').html(savePath).attr('title', savePath);
}
+4 -4
View File
@@ -68,7 +68,7 @@
<?php if($objectType == 'project'):?>
<tr>
<th><?php echo $lang->doc->project;?></th>
<td class='required'><?php echo html::select('project', $objects, isset($execution) ? $execution->project : $objectID, "class='form-control chosen' onchange=loadExecutions(this.value)");?></td>
<td class='required'><?php echo html::select('project', $objects, isset($execution) ? $execution->project : $objectID, "class='form-control picker-select' onchange=loadExecutions(this.value)");?></td>
<?php if($this->app->tab == 'doc'):?>
<th><?php echo $lang->doc->execution?></th>
<td id='executionBox'><?php echo html::select('execution', $executions, isset($execution) ? $objectID : '', "class='form-control chosen' data-placeholder='{$lang->doc->placeholder->execution}' onchange='loadObjectModules(\"execution\", this.value)'")?></td>
@@ -77,17 +77,17 @@
<?php elseif($objectType == 'execution'):?>
<tr>
<th><?php echo $lang->doc->execution;?></th>
<td class='required'><?php echo html::select('execution', $objects, $objectID, "class='form-control chosen' onchange='loadObjectModules(\"execution\", this.value)'");?></td>
<td class='required'><?php echo html::select('execution', $objects, $objectID, "class='form-control picker-select' onchange='loadObjectModules(\"execution\", this.value)'");?></td>
</tr>
<?php elseif($objectType == 'product'):?>
<tr>
<th><?php echo $lang->doc->product;?></th>
<td class='required'><?php echo html::select('product', $objects, $objectID, "class='form-control chosen' onchange='loadObjectModules(\"product\", this.value)'");?></td>
<td class='required'><?php echo html::select('product', $objects, $objectID, "class='form-control picker-select' onchange='loadObjectModules(\"product\", this.value)'");?></td>
</tr>
<?php endif;?>
<tr>
<th class='w-100px'><?php echo $lang->doc->libAndModule?></th>
<td colspan='3' class='required'><span id='moduleBox'><?php echo html::select('module', $moduleOptionMenu, $moduleID, "class='form-control chosen'");?></span></td>
<td colspan='3' class='required'><span id='moduleBox'><?php echo html::select('module', $moduleOptionMenu, $moduleID, "class='form-control picker-select'");?></span></td>
</tr>
<tr>
<th><?php echo $lang->doc->keywords;?></th>
+2 -2
View File
@@ -70,12 +70,12 @@
<?php if(strpos('product|project|execution', $type) !== false):?>
<tr>
<th><?php echo $lang->doc->project;?></th>
<td class='required'><?php echo html::select($type, $objects, $objectID, "class='form-control chosen' onchange='loadObjectModules(\"{$type}\", this.value)'");?></td>
<td class='required'><?php echo html::select($type, $objects, $objectID, "class='form-control picker-select' onchange='loadObjectModules(\"{$type}\", this.value)'");?></td>
</tr>
<?php endif;?>
<tr>
<th class='w-100px'><?php echo $lang->doc->libAndModule?></th>
<td colspan='3' class='required'><span id='moduleBox'><?php echo html::select('module', $moduleOptionMenu, $doc->lib . '_' . $doc->module, "class='form-control chosen'");?></span></td>
<td colspan='3' class='required'><span id='moduleBox'><?php echo html::select('module', $moduleOptionMenu, $doc->lib . '_' . $doc->module, "class='form-control picker-select'");?></span></td>
</tr>
<tr>
<th><?php echo $lang->doc->keywords;?></th>