diff --git a/module/common/view/pastetext.html.php b/module/common/view/pastetext.html.php index fe4a62bb10..f2d4f56275 100644 --- a/module/common/view/pastetext.html.php +++ b/module/common/view/pastetext.html.php @@ -25,7 +25,15 @@ $(function() { if(!rowTpl) rowTpl = $('#trTemp tbody').html(); if(!$formTbody) $formTbody = $form.find('table > tbody'); + var lastIndex = parseInt($formTbody.find('tr:last > td:first').text()); + var moduleArr = ['task', 'story', 'bug', 'testcase']; + if($.inArray(config.currentModule, moduleArr) >= 0 && config.currentMethod == 'batchcreate') + { + lastIndex = itemIndex; + itemIndex ++; + } + var $newRow = $(rowTpl.replace(/%s/g, lastIndex + 1)); $newRow.find('.chosen').chosen(); $newRow.find('.iframe').modalTrigger({iframe:true}); diff --git a/module/task/css/batchcreate.css b/module/task/css/batchcreate.css index 388bdf119c..df0b38611f 100644 --- a/module/task/css/batchcreate.css +++ b/module/task/css/batchcreate.css @@ -31,3 +31,4 @@ select[id^="story"] + .picker-single {width: 130px; max-width: 130px;} .c-assigned {width: 130px;} .c-date {width: 120px;} .c-pri {width: 80px;} +.c-actions {width: 60px;} diff --git a/module/task/js/batchcreate.js b/module/task/js/batchcreate.js index 55454dd725..6ffa86ebbe 100755 --- a/module/task/js/batchcreate.js +++ b/module/task/js/batchcreate.js @@ -344,3 +344,30 @@ $(function() } }); }); + +/** + * Add item. + * + * @param object $obj + * @access public + * @return void + */ +function addItem(obj) +{ + var item = $('#addItem').html().replace(/%i%/g, itemIndex + 1); + $('' + item + '').insertAfter($(obj).closest('tr')); + + itemIndex ++; +} + +/** + * Delete item. + * + * @param object $obj + * @access public + * @return void + */ +function deleteItem(obj) +{ + $(obj).closest('tr').remove(); +} diff --git a/module/task/view/batchcreate.html.php b/module/task/view/batchcreate.html.php index 9cef587605..a22c4c32f6 100755 --- a/module/task/view/batchcreate.html.php +++ b/module/task/view/batchcreate.html.php @@ -90,6 +90,7 @@ $colspan = count($visibleFields) + 3; echo "{$extendField->name}"; } ?> + actions;?> @@ -115,7 +116,7 @@ $colspan = count($visibleFields) + 3; ?> - + @@ -173,7 +174,14 @@ $colspan = count($visibleFields) + 3; $this->loadModel('flow'); foreach($extendFields as $extendField) echo "control == 'select' or $extendField->control == 'multi-select') ? " style='overflow:visible'" : '') . ">" . $this->flow->getFieldControl($extendField, '', $extendField->field . "[$i]") . ""; ?> + + + + + + + @@ -191,7 +199,7 @@ $colspan = count($visibleFields) + 3; - + "; ?> +
%s%s id, \"%s\")'")?> @@ -242,9 +250,82 @@ $colspan = count($visibleFields) + 3; $this->loadModel('flow'); foreach($extendFields as $extendField) echo "control == 'select' or $extendField->control == 'multi-select') ? " style='overflow:visible'" : '') . ">" . $this->flow->getFieldControl($extendField, '', $extendField->field . "[%s]") . " + + +
+
+ + + + + + type != 'ops'):?> + + + + type == 'kanban'):?> + + + + + + + + + + + loadModel('flow'); + foreach($extendFields as $extendField) echo "control == 'select' or $extendField->control == 'multi-select') ? " style='overflow:visible'" : '') . ">" . $this->flow->getFieldControl($extendField, '', $extendField->field . "[$i]") . ""; + ?> + + + +
type);?>