diff --git a/module/bug/view/create.html.php b/module/bug/view/create.html.php
index aafefbfd9c..00d5c8ade2 100644
--- a/module/bug/view/create.html.php
+++ b/module/bug/view/create.html.php
@@ -90,14 +90,6 @@ if($this->app->tab == 'project') js::set('objectID', $projectID);
bug->typeList, $type, "class='form-control'");?>
-
- bug->os?>
- bug->osList, $os, "class='form-control'");?>
-
-
- bug->browser?>
- bug->browserList, $browser, "class='form-control'");?>
-
|
@@ -173,8 +165,6 @@ if($this->app->tab == 'project') js::set('objectID', $projectID);
-
-
| bug->type;?> |
@@ -182,26 +172,39 @@ if($this->app->tab == 'project') js::set('objectID', $projectID);
bug->typeList, $type, "class='form-control chosen'");?>
-
-
-
- bug->os?>
- bug->osList, $os, "class='form-control chosen'");?>
-
-
-
-
-
-
- bug->browser?>
- bug->browserList, $browser, "class='form-control chosen'");?>
-
-
-
|
+
+
+
+
+
+ | bug->os;?> |
+
+
+
+ bug->osList, $os, "class='form-control chosen' multiple");?>
+
+
+ |
+
+ |
+ |
+
+
+
+
+
+ bug->browser?>
+ bug->browserList, $browser, "class='form-control chosen' multiple");?>
+
+
+ |
+
+
+
| kanbancard->region;?> |
diff --git a/module/story/control.php b/module/story/control.php
index 0e98cbd619..ba8a39eb33 100644
--- a/module/story/control.php
+++ b/module/story/control.php
@@ -1731,11 +1731,10 @@ class story extends control
*
* @param int $executionID
* @param int $projectID
- * @param string $extra
* @access public
* @return void
*/
- public function batchToTask($executionID = 0, $projectID = 0, $extra = '')
+ public function batchToTask($executionID = 0, $projectID = 0)
{
if(!empty($_POST['name']))
{
diff --git a/module/story/js/batchtotask.js b/module/story/js/batchtotask.js
index 732dcb3e66..2e5b39e4ff 100755
--- a/module/story/js/batchtotask.js
+++ b/module/story/js/batchtotask.js
@@ -1,12 +1,13 @@
-$(function()
-{
- for(var i = 1; i <= storyCount; i ++) setPreview(i);
-});
-
$(document).on('change', "[name^='estStarted'], [name^='deadline']", function()
{
toggleCheck($(this));
-})
+});
+
+/* Set the story module. */
+function setStoryRelated(num)
+{
+ setPreview(num);
+}
/**
* Toggle checkbox.
@@ -66,15 +67,17 @@ function setStories(moduleID, executionID, num)
/* Copy story title as task title. */
function copyStoryTitle(num)
{
- var storyTitle = $('#story' + num).find('option:selected').text();
- var storyValue = $('#story' + num).find('option:selected').val();
+ var $story = $('#story' + num);
+ var storyTitle = $story.find('option:selected').text();
+ var storyValue = $story.find('option:selected').val();
+ var begin = parseInt($story.closest('tr').children('.c-id').text()) - 2;
if(storyValue === 'ditto')
{
- for(var i = num; i <= num && i >= 1; i--)
+ for(var i = begin; i <= begin && i >= 0; i--)
{
- var selectedValue = $('select[id="story' + i +'"]').val();
- var selectedTitle = $('select[id="story' + i +'"]').find('option:selected').text();
+ var selectedValue = $('#tableBody tbody > tr').eq(i).find('select[name^="story"]').val();
+ var selectedTitle = $('#tableBody tbody > tr').eq(i).find('select[name^="story"]').find('option:selected').text();
if(selectedValue !== 'ditto')
{
storyTitle = selectedTitle;
@@ -102,17 +105,6 @@ function setPreview(num)
var storyID = $('#story' + num).val();
if(storyID != 0 && storyID != 'ditto')
{
- var link = createLink('story', 'ajaxGetInfo', 'storyID=' + storyID);
- $.getJSON(link, function(storyInfo)
- {
- $('#module' + num).val(parseInt(storyInfo.moduleID));
- $('#module' + num).trigger("chosen:updated");
-
- $('#storyEstimate' + num).val(storyInfo.estimate);
- $('#storyPri' + num).val(storyInfo.pri);
- $('#storyDesc' + num).val(storyInfo.spec);
- });
-
storyLink = createLink('story', 'view', "storyID=" + storyID, '', true);
$('#preview' + num).removeAttr('disabled');
$('#preview' + num).modalTrigger({type:'iframe'});
@@ -245,3 +237,54 @@ $(function()
}
});
});
+
+/**
+ * Add row.
+ *
+ * @param object $obj
+ * @access public
+ * @return void
+ */
+function addRow(obj)
+{
+ var row = $('#addRow').html().replace(/%i%/g, rowIndex + 1);
+ $('
' + row + '
').insertAfter($(obj).closest('tr'));
+
+ var $beginRow = $row = $(obj).closest('tr').next();
+
+ $row.find(".form-date").datepicker();
+ $row.find("input[name^=color]").colorPicker();
+ $row.find('div[id$=_chosen]').remove();
+ $row.find('.picker').remove();
+ $row.find('.chosen').chosen();
+
+ var begin = parseInt($(obj).parent().siblings('.c-id').text()) + 1;
+ var count = $('#tableBody tbody > tr').length;
+ for(var i = begin; i <= count; i++)
+ {
+ $beginRow.children('.c-id').text(i);
+ $beginRow = $beginRow.next();
+ }
+ rowIndex ++;
+}
+
+/**
+ * Delete row.
+ *
+ * @param object $obj
+ * @access public
+ * @return void
+ */
+function deleteRow(obj)
+{
+ var $beginRow = $(obj).closest('tr').next();
+ var begin = parseInt($(obj).parent().siblings('.c-id').text());
+ var count = $('#tableBody tbody > tr').length;
+ for(var i = begin; i <= count; i++)
+ {
+ $beginRow.children('.c-id').text(i);
+ $beginRow = $beginRow.next();
+ }
+
+ $(obj).closest('tr').remove();
+}
diff --git a/module/story/view/batchtotask.html.php b/module/story/view/batchtotask.html.php
index 2867569ad3..62046a9820 100755
--- a/module/story/view/batchtotask.html.php
+++ b/module/story/view/batchtotask.html.php
@@ -80,9 +80,9 @@ foreach(explode(',', $config->task->create->requiredFields) as $field)
@@ -153,7 +153,7 @@ foreach(explode(',', $config->task->create->requiredFields) as $field)
|
|