diff --git a/module/bug/lang/zh-cn.php b/module/bug/lang/zh-cn.php index 583f2f8694..7312dd55f6 100644 --- a/module/bug/lang/zh-cn.php +++ b/module/bug/lang/zh-cn.php @@ -157,8 +157,8 @@ $lang->bug->confirmDeleteTemplate = '您确认要删除该模板吗?'; /* 模板。*/ $lang->bug->tplStep = "
[步骤]
"; -$lang->bug->tplResult = "[结果]
"; -$lang->bug->tplExpect = "[期望]
"; +$lang->bug->tplResult = "[结果]
"; +$lang->bug->tplExpect = "[期望]
"; /* 各个字段取值列表。*/ $lang->bug->severityList[3] = '3'; diff --git a/module/bug/lang/zh-tw.php b/module/bug/lang/zh-tw.php index 9a5246988a..321d7c26d1 100644 --- a/module/bug/lang/zh-tw.php +++ b/module/bug/lang/zh-tw.php @@ -157,8 +157,8 @@ $lang->bug->confirmDeleteTemplate = '您確認要刪除該模板嗎?'; /* 模板。*/ $lang->bug->tplStep = "[步驟]
"; -$lang->bug->tplResult = "[結果]
"; -$lang->bug->tplExpect = "[期望]
"; +$lang->bug->tplResult = "[結果]
"; +$lang->bug->tplExpect = "[期望]
"; /* 各個欄位取值列表。*/ $lang->bug->severityList[3] = '3'; diff --git a/module/dev/model.php b/module/dev/model.php index 7bbdd1ab47..f4049a8f0a 100644 --- a/module/dev/model.php +++ b/module/dev/model.php @@ -16,7 +16,7 @@ class devModel extends model foreach($datatables as $table) { $table = current($table); - if(strpos($table, $this->config->db->prefix) !== false) + if(empty($this->config->db->prefix) or strpos($table, $this->config->db->prefix) !== false) { $subTable = substr($table, strpos($table, '_') + 1); $group = zget($this->config->dev->group, $subTable, 'other'); diff --git a/module/todo/control.php b/module/todo/control.php index cbcf79e152..0bfcf8527f 100644 --- a/module/todo/control.php +++ b/module/todo/control.php @@ -333,6 +333,7 @@ class todo extends control $this->view->actions = $this->loadModel('action')->getList('todo', $todoID); $this->view->from = $from; $this->view->projects = $this->loadModel('project')->getPairs(); + $this->view->products = $this->loadModel('product')->getPairs(); $this->display(); } diff --git a/module/todo/js/view.js b/module/todo/js/view.js index d770f94475..a51ea6e595 100644 --- a/module/todo/js/view.js +++ b/module/todo/js/view.js @@ -1,5 +1,17 @@ $(function() { + $('#toStoryLink').click(function() + { + $('#productModal .modal-body .input-group .input-group-btn').addClass('hidden'); + $('#productModal #toStoryButton').closest('.input-group-btn').removeClass('hidden'); + }) + + $('#toBugLink').click(function() + { + $('#productModal .modal-body .input-group .input-group-btn').addClass('hidden'); + $('#productModal #toBugButton').closest('.input-group-btn').removeClass('hidden'); + }) + $('#toTaskButton').click(function() { var onlybody = config.onlybody; @@ -10,6 +22,29 @@ $(function() config.onlybody = onlybody; parent.location.href = link; + }) + $('#toStoryButton').click(function() + { + var onlybody = config.onlybody; + config.onlybody = 'no'; + + var productID = $(this).closest('.input-group').find('#product').val(); + var link = createLink('story', 'create', 'productID=' + productID + '&branch=0&moduleID=0&storyID=0&projectID=0&bugID=0&planID=0&todoID=' + todoID); + + config.onlybody = onlybody; + parent.location.href = link; + }) + + $('#toBugButton').click(function() + { + var onlybody = config.onlybody; + config.onlybody = 'no'; + + var productID = $(this).closest('.input-group').find('#product').val(); + var link = createLink('bug', 'create', 'productID=' + productID + '&branch=0&extras=todoID=' + todoID); + + config.onlybody = onlybody; + parent.location.href = link; }) }); diff --git a/module/todo/view/view.html.php b/module/todo/view/view.html.php index bccd6a4b64..019111ad7d 100644 --- a/module/todo/view/view.html.php +++ b/module/todo/view/view.html.php @@ -56,7 +56,7 @@