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); + $('