Merge branch dev/bug-62582 of zentao/zentaopms (#13275)
This commit is contained in:
@@ -60,7 +60,7 @@ class PreserveText extends AbstractElement
|
||||
$this->paragraphStyle = $this->setNewStyle(new Paragraph(), $paragraphStyle);
|
||||
|
||||
$this->text = SharedText::toUTF8($text);
|
||||
$matches = preg_split('/({.*?})/', $this->text, null, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
|
||||
$matches = preg_split('/({.*?})/', $this->text, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
|
||||
if (isset($matches[0])) {
|
||||
$this->text = $matches;
|
||||
}
|
||||
|
||||
@@ -171,6 +171,7 @@ class XMLWriter extends \XMLWriter
|
||||
* @param mixed $value
|
||||
* @return bool
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function writeAttribute($name, $value)
|
||||
{
|
||||
if (is_float($value)) {
|
||||
|
||||
@@ -333,3 +333,23 @@ function setStoryRelated(event)
|
||||
if(!$row.find('td[data-name="story"][data-ditto="on"]').length) break;
|
||||
}
|
||||
}
|
||||
|
||||
window.computeForParent = function(e)
|
||||
{
|
||||
const $this = $(e.target);
|
||||
const field = $this.attr('data-name');
|
||||
const parentID = $this.closest('tr').attr('data-parent');
|
||||
if(parentID == '0') return;
|
||||
|
||||
const $parent = $('input[name="id[' + parentID + ']"]');
|
||||
if($parent.length == 0) return;
|
||||
|
||||
const oldParentHour = parseFloat($parent.closest('tr').find('input[data-name="' + field + '"]').val());
|
||||
|
||||
let parentHour = 0;
|
||||
$('tr[data-parent="' + parentID + '"]').each(function()
|
||||
{
|
||||
parentHour += parseFloat($(this).find('input[data-name="' + field + '"]').val());
|
||||
});
|
||||
if(oldParentHour < parentHour) $parent.closest('tr').find('input[data-name="' + field + '"]').val(parentHour.toFixed(2));
|
||||
}
|
||||
@@ -56,6 +56,7 @@ formBatchPanel
|
||||
on::change('[data-name="estStarted"], [data-name="deadline"]', 'checkBatchEstStartedAndDeadline'),
|
||||
on::change('[data-name="module"]', 'setStories'),
|
||||
on::change('input[name^=story]', 'setStoryRelated'),
|
||||
on::change('[data-name="estimate"],[data-name="consumed"]', 'computeForParent'),
|
||||
on::click('[data-name=story] [data-type=ditto]', 'setStoryRelated'),
|
||||
set::formID('taskBatchEditForm' . $executionID),
|
||||
formBatchItem
|
||||
|
||||
Reference in New Issue
Block a user