diff --git a/lib/base/front/front.class.php b/lib/base/front/front.class.php index 15317426a8..7d12b3ac58 100644 --- a/lib/base/front/front.class.php +++ b/lib/base/front/front.class.php @@ -588,7 +588,7 @@ function selectAll(checker, scope, type) { if(type == 'button') { - var check = $(checker).data('check'); + var check = $('#' + scope + ' input:checkbox').length == $('#' + scope + ' input:checkbox:checked').length ? false : true; $('#' + scope + ' input').each(function() { $(this).prop("checked", check) @@ -607,12 +607,11 @@ function selectAll(checker, scope, type) { if(type == 'button') { - var check = $(checker).data('check'); + var check = $('input:checkbox').length == $('input:checkbox:checked').length ? false : true; $('input:checkbox').each(function() { $(this).prop("checked", check) }); - $(checker).data('check', check == true ? false :true); } else if(type == 'checkbox') { @@ -632,7 +631,7 @@ EOT; } elseif($type == 'button') { - $string .= ""; + $string .= ""; } return $string; diff --git a/module/file/view/export.html.php b/module/file/view/export.html.php index bfb6a9915a..71b1d8dc91 100644 --- a/module/file/view/export.html.php +++ b/module/file/view/export.html.php @@ -121,12 +121,13 @@ function setExportTPL() /** * Set whether part download. * + * @param input target * @access public * @return void */ -function setPart(t) +function setPart(target) { - if($(t).prop("checked")) + if($(target).prop("checked")) { $("#submit").attr("onclick", 'setPartDownloading();'); } @@ -147,10 +148,10 @@ var partQueue = new Array(); function setPartDownloading() { var partNum = 10000; - var total = $('.pager', window.parent.document).data('rec-total'); - for(var i=0; i < total; i = i + partNum) + var total = $('.pager', window.parent.document).data('rec-total'); + for(var i = 0; i < total; i = i + partNum) { - partQueue.push(i+','+partNum); + partQueue.push(i + ',' + partNum); } $.cookie('downloading', 0); $('#mainContent').addClass('loading'); @@ -170,7 +171,8 @@ function setPartDownloading() */ function startPartDownloading() { - if($.cookie('downloading') == 1){ + if($.cookie('downloading') == 1) + { var limit = partQueue.shift(); if(limit) { diff --git a/module/my/model.php b/module/my/model.php index 70d7d6de8d..bc9cb724d3 100644 --- a/module/my/model.php +++ b/module/my/model.php @@ -113,7 +113,7 @@ class myModel extends model $product->releases = isset($releases[$product->id]) ? $releases[$product->id] : 0; if(isset($executions[$product->id])) $product->executions = $executions[$product->id]; $product->storyEstimateCount = isset($stories[$product->id]) ? $stories[$product->id] : 0; - if($product->status != 'closed') $unclosedCount++; + if($product->status != 'closed') $unclosedCount ++; if($product->status == 'closed') unset($products[$key]); } @@ -125,7 +125,6 @@ class myModel extends model $data->allCount = $allCount; $data->unclosedCount = $unclosedCount; $data->products = array_values($products); - return $data; } @@ -143,7 +142,7 @@ class myModel extends model $doingProjects = array(); $projects = $this->loadModel('project')->getOverviewList('byStatus', 'all', 'id_desc'); - $projectsConsumed = $this->project->getProjectsConsumed(array_keys($projects), 'this_year'); + $projectsConsumed = $this->project->getProjectsConsumed(array_keys($projects), 'THIS_YEAR'); $doingCount = 0; foreach($projects as $key => $project) { @@ -167,7 +166,6 @@ class myModel extends model $data->allConsumed = $allConsumed; $data->thisYearConsumed = $thisYearConsumed; $data->projects = $doingProjects; - return $data; } diff --git a/module/product/control.php b/module/product/control.php index e7bdc869b0..cbe86c7e9e 100644 --- a/module/product/control.php +++ b/module/product/control.php @@ -1321,15 +1321,15 @@ class product extends control $rowspan[$i]['rows']['program'] = 1; $programI = $i; } - else $rowspan[$programI]['rows']['program']++; + else $rowspan[$programI]['rows']['program'] ++; if($lastLine == '' or $product->line != $lastLine) { $rowspan[$i]['rows']['line'] = 1; $lineI = $i; } - else $rowspan[$lineI]['rows']['line']++; + else $rowspan[$lineI]['rows']['line'] ++; $lastProgram = $product->program; - $lastLine = $product->line; + $lastLine = $product->line; if($this->post->exportType == 'selected') { diff --git a/module/program/js/common.js b/module/program/js/common.js index ee200bbefa..67a2acfcb0 100644 --- a/module/program/js/common.js +++ b/module/program/js/common.js @@ -75,7 +75,7 @@ function computeWorkDays(currentID) { beginDate = $('#begin').val(); endDate = $('#end').val(); - + var begin = new Date(beginDate.replace(/-/g,"/")); var end = new Date(endDate.replace(/-/g,"/")); var time = end.getTime() - begin.getTime(); diff --git a/module/project/model.php b/module/project/model.php index 5f045f624a..1da6cf4d9a 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -411,7 +411,7 @@ class projectModel extends model $totalConsumeds = $this->dao->select('project,ROUND(SUM(consumed), 1) AS totalConsumed') ->from(TABLE_TASK) ->where('project')->in($projectIdList) - ->beginIF($time == 'this_year')->andWhere('realStarted')->ge(date("Y-01-01 00:00:00"))->fi() + ->beginIF($time == 'THIS_YEAR')->andWhere('realStarted')->ge(date("Y-01-01 00:00:00"))->fi() ->andWhere('deleted')->eq(0) ->andWhere('parent')->lt(1) ->groupBy('project') @@ -421,7 +421,7 @@ class projectModel extends model { $project = new stdClass(); $project->totalConsumed = isset($totalConsumeds[$projectID]->totalConsumed) ? $totalConsumeds[$projectID]->totalConsumed : 0; - $projects[$projectID] = $project; + $projects[$projectID] = $project; } return $projects; diff --git a/module/search/model.php b/module/search/model.php index 3a9605b8c8..5fb8555fad 100644 --- a/module/search/model.php +++ b/module/search/model.php @@ -943,7 +943,7 @@ class searchModel extends model { $words = explode(' ', trim($keywords, ' ')); $markedWords = array(); - $leftMark = '|0000'; + $leftMark = '|0000'; $rightMark = '0000|'; foreach($words as $key => $word) diff --git a/module/story/model.php b/module/story/model.php index f8a7069df9..cc831c5efb 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -3953,17 +3953,16 @@ class storyModel extends model if(count($tracks) < $pager->recPerPage) { - /* Show of child story */ + /* Show sub stories. */ $storiesCopy = array(); foreach($stories as $id => $story) { $storiesCopy[$id] = $story; - if(isset($story->children) and count($story->children) > 0) + + if(!isset($story->children) or count($story->children) == 0) continue; + foreach($story->children as $childID => $children) { - foreach($story->children as $childID => $children) - { - $storiesCopy[$childID] = $children; - } + $storiesCopy[$childID] = $children; } } $stories = $storiesCopy; @@ -3972,10 +3971,10 @@ class storyModel extends model { $stories[$id] = new stdclass(); $stories[$id]->parent = $story->parent; - $stories[$id]->title = $story->title; - $stories[$id]->cases = $this->loadModel('testcase')->getStoryCases($id); - $stories[$id]->bugs = $this->loadModel('bug')->getStoryBugs($id); - $stories[$id]->tasks = $this->loadModel('task')->getStoryTasks($id); + $stories[$id]->title = $story->title; + $stories[$id]->cases = $this->loadModel('testcase')->getStoryCases($id); + $stories[$id]->bugs = $this->loadModel('bug')->getStoryBugs($id); + $stories[$id]->tasks = $this->loadModel('task')->getStoryTasks($id); if(isset($this->config->maxVersion)) { $stories[$id]->designs = $this->dao->select('id, name')->from(TABLE_DESIGN)->where('story')->eq($id)->fetchAll('id'); diff --git a/module/testtask/lang/de.php b/module/testtask/lang/de.php index 04b650001b..080265c9a6 100644 --- a/module/testtask/lang/de.php +++ b/module/testtask/lang/de.php @@ -124,17 +124,17 @@ $lang->testtask->fail = 'Fehlgeschlagen'; $lang->testtask->showResult = 'Ausführungen %s'; $lang->testtask->showFail = 'Fehlgeschlagen %s'; -$lang->testtask->confirmDelete = 'Möchten Sie dieses Build löschen?'; -$lang->testtask->confirmUnlinkCase = 'Möchten Sie die Verknüpfung zu dem Fall aufheben?'; -$lang->testtask->noticeNoOther = 'Es existieren keine weiteren Testaufgaben für dieses Produkt'; -$lang->testtask->noTesttask = 'Keine Testaufgaben. '; -$lang->testtask->checkLinked = "Please check whether the product that the test request is linked to has been linked to a {$lang->executionCommon}."; -$lang->testtask->noImportData = 'The imported XML does not parse the data.'; -$lang->testtask->unitXMLFormat = 'Please select a file in JUnit XML format.'; -$lang->testtask->titleOfAuto = "%s automated testing"; -$lang->testtask->cannotBeParsed = 'The content of the imported XML file is in the wrong format and cannot be parsed.'; -$lang->testtask->finishedDateError = 'Actual Finished Date cannot be <= Begin Date %s'; -$lang->testtask->finishedDateError2 = 'Actual Finished Date cannot be > Today'; +$lang->testtask->confirmDelete = 'Möchten Sie dieses Build löschen?'; +$lang->testtask->confirmUnlinkCase = 'Möchten Sie die Verknüpfung zu dem Fall aufheben?'; +$lang->testtask->noticeNoOther = 'Es existieren keine weiteren Testaufgaben für dieses Produkt'; +$lang->testtask->noTesttask = 'Keine Testaufgaben. '; +$lang->testtask->checkLinked = "Please check whether the product that the test request is linked to has been linked to a {$lang->executionCommon}."; +$lang->testtask->noImportData = 'The imported XML does not parse the data.'; +$lang->testtask->unitXMLFormat = 'Please select a file in JUnit XML format.'; +$lang->testtask->titleOfAuto = "%s automated testing"; +$lang->testtask->cannotBeParsed = 'The content of the imported XML file is in the wrong format and cannot be parsed.'; +$lang->testtask->finishedDateLess = 'Actual Finished Date cannot be <= Begin Date %s'; +$lang->testtask->finishedDateMore = 'Actual Finished Date cannot be > Today'; $lang->testtask->assignedToMe = 'Meine'; $lang->testtask->allCases = 'Alle Fälle'; diff --git a/module/testtask/lang/en.php b/module/testtask/lang/en.php index 986c3d97ed..d0353b173d 100644 --- a/module/testtask/lang/en.php +++ b/module/testtask/lang/en.php @@ -127,17 +127,17 @@ $lang->testtask->fail = 'Failed'; $lang->testtask->showResult = 'Run %s times'; $lang->testtask->showFail = 'Failed %s times'; -$lang->testtask->confirmDelete = 'Do you want to delete this build?'; -$lang->testtask->confirmUnlinkCase = 'Do you want to unlink this case?'; -$lang->testtask->noticeNoOther = 'No test builds for this product.'; -$lang->testtask->noTesttask = 'No requests. '; -$lang->testtask->checkLinked = "Please check whether the product that the test request is linked to has been linked to a {$lang->executionCommon}."; -$lang->testtask->noImportData = 'The imported XML does not parse the data.'; -$lang->testtask->unitXMLFormat = 'Please select a file in JUnit XML format.'; -$lang->testtask->titleOfAuto = "%s automated testing"; -$lang->testtask->cannotBeParsed = 'The content of the imported XML file is in the wrong format and cannot be parsed.'; -$lang->testtask->finishedDateError = 'Actual Finished Date cannot be <= Begin Date %s'; -$lang->testtask->finishedDateError2 = 'Actual Finished Date cannot be > Today'; +$lang->testtask->confirmDelete = 'Do you want to delete this build?'; +$lang->testtask->confirmUnlinkCase = 'Do you want to unlink this case?'; +$lang->testtask->noticeNoOther = 'No test builds for this product.'; +$lang->testtask->noTesttask = 'No requests. '; +$lang->testtask->checkLinked = "Please check whether the product that the test request is linked to has been linked to a {$lang->executionCommon}."; +$lang->testtask->noImportData = 'The imported XML does not parse the data.'; +$lang->testtask->unitXMLFormat = 'Please select a file in JUnit XML format.'; +$lang->testtask->titleOfAuto = "%s automated testing"; +$lang->testtask->cannotBeParsed = 'The content of the imported XML file is in the wrong format and cannot be parsed.'; +$lang->testtask->finishedDateLess = 'Actual Finished Date cannot be <= Begin Date %s'; +$lang->testtask->finishedDateMore = 'Actual Finished Date cannot be > Today'; $lang->testtask->assignedToMe = 'AssignedToMe'; $lang->testtask->allCases = 'All Cases'; diff --git a/module/testtask/lang/fr.php b/module/testtask/lang/fr.php index 06ed17d1a4..06c5692468 100644 --- a/module/testtask/lang/fr.php +++ b/module/testtask/lang/fr.php @@ -124,17 +124,17 @@ $lang->testtask->fail = 'Echec'; $lang->testtask->showResult = 'Jouée %s fois'; $lang->testtask->showFail = 'Echouée %s fois'; -$lang->testtask->confirmDelete = 'Voulez-vous supprimer ce build ?'; -$lang->testtask->confirmUnlinkCase = 'Voulez-vous détacher ce CasTest ?'; -$lang->testtask->noticeNoOther = "Il n'y a pas de Campagnes de Recette pour ce product."; -$lang->testtask->noTesttask = 'Pas de campagne. '; -$lang->testtask->checkLinked = "Vérifiez si le product auquel la campagne de recette est associée est bien lié à un projet."; -$lang->testtask->noImportData = "Le XML importé ne parse pas les données."; -$lang->testtask->unitXMLFormat = 'Veuillez sélectionner un fichier au format XML JUnit.'; -$lang->testtask->titleOfAuto = "%s tests automatisés"; -$lang->testtask->cannotBeParsed = 'The content of the imported XML file is in the wrong format and cannot be parsed.'; -$lang->testtask->finishedDateError = 'Actual Finished Date cannot be <= Begin Date %s'; -$lang->testtask->finishedDateError2 = 'Actual Finished Date cannot be > Today'; +$lang->testtask->confirmDelete = 'Voulez-vous supprimer ce build ?'; +$lang->testtask->confirmUnlinkCase = 'Voulez-vous détacher ce CasTest ?'; +$lang->testtask->noticeNoOther = "Il n'y a pas de Campagnes de Recette pour ce product."; +$lang->testtask->noTesttask = 'Pas de campagne. '; +$lang->testtask->checkLinked = "Vérifiez si le product auquel la campagne de recette est associée est bien lié à un projet."; +$lang->testtask->noImportData = "Le XML importé ne parse pas les données."; +$lang->testtask->unitXMLFormat = 'Veuillez sélectionner un fichier au format XML JUnit.'; +$lang->testtask->titleOfAuto = "%s tests automatisés"; +$lang->testtask->cannotBeParsed = 'The content of the imported XML file is in the wrong format and cannot be parsed.'; +$lang->testtask->finishedDateLess = 'Actual Finished Date cannot be <= Begin Date %s'; +$lang->testtask->finishedDateMore = 'Actual Finished Date cannot be > Today'; $lang->testtask->assignedToMe = 'Affecté à Moi'; $lang->testtask->allCases = 'Tous les CasTests'; diff --git a/module/testtask/lang/vi.php b/module/testtask/lang/vi.php index 2c5d58ab6c..500db063fd 100644 --- a/module/testtask/lang/vi.php +++ b/module/testtask/lang/vi.php @@ -124,17 +124,17 @@ $lang->testtask->fail = 'Thất bại'; $lang->testtask->showResult = 'Chạy %s lần'; $lang->testtask->showFail = 'Thất bại %s lần'; -$lang->testtask->confirmDelete = 'Bạn có muốn xóa bản dựng này?'; -$lang->testtask->confirmUnlinkCase = 'Bạn có muốn hủy liên kết tình huống này?'; -$lang->testtask->noticeNoOther = 'Không có test builds cho sản phẩm này.'; -$lang->testtask->noTesttask = 'Không có yêu cầu. '; -$lang->testtask->checkLinked = "Vui lòng kiểm tra sản phẩm đó mà yêu cầu test này là liên kết tới một dự án."; -$lang->testtask->noImportData = 'The imported XML does not parse the data.'; -$lang->testtask->unitXMLFormat = 'Please select a file in JUnit XML format.'; -$lang->testtask->titleOfAuto = "%s automated testing"; -$lang->testtask->cannotBeParsed = 'The content of the imported XML file is in the wrong format and cannot be parsed.'; -$lang->testtask->finishedDateError = 'Actual Finished Date cannot be <= Begin Date %s'; -$lang->testtask->finishedDateError2 = 'Actual Finished Date cannot be > Today'; +$lang->testtask->confirmDelete = 'Bạn có muốn xóa bản dựng này?'; +$lang->testtask->confirmUnlinkCase = 'Bạn có muốn hủy liên kết tình huống này?'; +$lang->testtask->noticeNoOther = 'Không có test builds cho sản phẩm này.'; +$lang->testtask->noTesttask = 'Không có yêu cầu. '; +$lang->testtask->checkLinked = "Vui lòng kiểm tra sản phẩm đó mà yêu cầu test này là liên kết tới một dự án."; +$lang->testtask->noImportData = 'The imported XML does not parse the data.'; +$lang->testtask->unitXMLFormat = 'Please select a file in JUnit XML format.'; +$lang->testtask->titleOfAuto = "%s automated testing"; +$lang->testtask->cannotBeParsed = 'The content of the imported XML file is in the wrong format and cannot be parsed.'; +$lang->testtask->finishedDateLess = 'Actual Finished Date cannot be <= Begin Date %s'; +$lang->testtask->finishedDateMore = 'Actual Finished Date cannot be > Today'; $lang->testtask->assignedToMe = 'Giao cho bạn'; $lang->testtask->allCases = 'Tất cả tình huống'; diff --git a/module/testtask/lang/zh-cn.php b/module/testtask/lang/zh-cn.php index 6311af393b..81e431816c 100644 --- a/module/testtask/lang/zh-cn.php +++ b/module/testtask/lang/zh-cn.php @@ -127,17 +127,17 @@ $lang->testtask->fail = '失败'; $lang->testtask->showResult = '共执行%s次'; $lang->testtask->showFail = '失败%s次'; -$lang->testtask->confirmDelete = '您确认要删除该测试单吗?'; -$lang->testtask->confirmUnlinkCase = '您确认要移除该用例吗?'; -$lang->testtask->noticeNoOther = '该产品还没有其他测试单'; -$lang->testtask->noTesttask = '暂时没有测试单。'; -$lang->testtask->checkLinked = "请检查测试单的产品是否与{$lang->executionCommon}相关联"; -$lang->testtask->noImportData = '导入的XML没有解析出数据。'; -$lang->testtask->unitXMLFormat = '请选择Junit XML 格式的文件。'; -$lang->testtask->titleOfAuto = "%s 自动化测试"; -$lang->testtask->cannotBeParsed = '导入的XML文件内容格式错误,无法解析。'; -$lang->testtask->finishedDateError = '实际完成日期不能小于开始日期%s'; -$lang->testtask->finishedDateError2 = '实际完成日期不能大于今天'; +$lang->testtask->confirmDelete = '您确认要删除该测试单吗?'; +$lang->testtask->confirmUnlinkCase = '您确认要移除该用例吗?'; +$lang->testtask->noticeNoOther = '该产品还没有其他测试单'; +$lang->testtask->noTesttask = '暂时没有测试单。'; +$lang->testtask->checkLinked = "请检查测试单的产品是否与{$lang->executionCommon}相关联"; +$lang->testtask->noImportData = '导入的XML没有解析出数据。'; +$lang->testtask->unitXMLFormat = '请选择Junit XML 格式的文件。'; +$lang->testtask->titleOfAuto = "%s 自动化测试"; +$lang->testtask->cannotBeParsed = '导入的XML文件内容格式错误,无法解析。'; +$lang->testtask->finishedDateLess = '实际完成日期不能小于开始日期%s'; +$lang->testtask->finishedDateMore = '实际完成日期不能大于今天'; $lang->testtask->assignedToMe = '指派给我'; $lang->testtask->allCases = '所有用例'; diff --git a/module/testtask/lang/zh-tw.php b/module/testtask/lang/zh-tw.php index 1af02fdb3d..38fb65d520 100644 --- a/module/testtask/lang/zh-tw.php +++ b/module/testtask/lang/zh-tw.php @@ -136,7 +136,8 @@ $lang->testtask->noImportData = '導入的XML沒有解析出數據。'; $lang->testtask->unitXMLFormat = '請選擇Junit XML 格式的檔案。'; $lang->testtask->titleOfAuto = "%s 自動化測試"; $lang->testtask->cannotBeParsed = '導入的XML檔案內容格式錯誤,無法解析。'; -$lang->testtask->finishedDateError = '實際完成日期不能小於開始日期%s'; +$lang->testtask->finishedDateLess = '實際完成日期不能小於開始日期%s'; +$lang->testtask->finishedDateMore = '實際完成日期不能大於今天'; $lang->testtask->assignedToMe = '指派給我'; $lang->testtask->allCases = '所有用例'; diff --git a/module/testtask/model.php b/module/testtask/model.php index 6cffe05004..9c03081393 100644 --- a/module/testtask/model.php +++ b/module/testtask/model.php @@ -803,12 +803,12 @@ class testtaskModel extends model if($testtask->realFinishedDate <= $oldTesttask->begin) { - dao::$errors[] = sprintf($this->lang->testtask->finishedDateError, $oldTesttask->begin); + dao::$errors[] = sprintf($this->lang->testtask->finishedDateLess, $oldTesttask->begin); return false; } if($testtask->realFinishedDate > date("Y-m-d 00:00:00", strtotime("+1 day"))) { - dao::$errors[] = $this->lang->testtask->finishedDateError2; + dao::$errors[] = $this->lang->testtask->finishedDateMore; return false; }