diff --git a/module/bug/js/common.js b/module/bug/js/common.js index 5880aff0d4..4c370ce0af 100644 --- a/module/bug/js/common.js +++ b/module/bug/js/common.js @@ -341,6 +341,7 @@ function loadProjectBuilds(projectID) branch = $('#branch').val(); if(typeof(branch) == 'undefined') branch = 0; productID = $('#product').val(); + oldOpenedBuild = $('#openedBuild').val() ? $('#openedBuild').val() : 0; if(page == 'create') { @@ -352,6 +353,7 @@ function loadProjectBuilds(projectID) link = createLink('build', 'ajaxGetProjectBuilds', 'projectID=' + projectID + '&productID=' + productID + '&varName=openedBuild&build=' + oldOpenedBuild + '&branch=' + branch); $('#openedBuildBox').load(link, function(){$(this).find('select').chosen()}); + oldResolvedBuild = $('#resolvedBuild').val() ? $('#resolvedBuild').val() : 0; link = createLink('build', 'ajaxGetProjectBuilds', 'projectID=' + projectID + '&productID=' + productID + '&varName=resolvedBuild&build=' + oldResolvedBuild + '&branch=' + branch); $('#resolvedBuildBox').load(link, function(){$(this).find('select').chosen()}); } diff --git a/module/build/model.php b/module/build/model.php index 8842f20906..709713b8c2 100644 --- a/module/build/model.php +++ b/module/build/model.php @@ -84,7 +84,7 @@ class buildModel extends model $selectedBuilds = array(); if(strpos($params, 'noempty') === false) $sysBuilds = array('' => ''); if(strpos($params, 'notrunk') === false) $sysBuilds = $sysBuilds + array('trunk' => $this->lang->trunk); - if($buildID != 0) $selectedBuilds = $this->dao->select('id, name')->from(TABLE_BUILD)->where('id')->eq($buildID)->fetchPairs(); + if($buildID != 0) $selectedBuilds = $this->dao->select('id, name')->from(TABLE_BUILD)->where('id')->in($buildID)->fetchPairs(); $projectBuilds = $this->dao->select('t1.id, t1.name, t1.project, t2.status as projectStatus, t3.id as releaseID, t3.status as releaseStatus, t4.name as branchName')->from(TABLE_BUILD)->alias('t1') ->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id') diff --git a/module/project/js/kanban.js b/module/project/js/kanban.js index 76be824f12..7af1ae89e8 100644 --- a/module/project/js/kanban.js +++ b/module/project/js/kanban.js @@ -2,12 +2,12 @@ $(function() { $('.c-boards').each(function() { - var height = $(window).height() - $('#header').height() - $('#footer').height() - 40 - 101; + var height = $(window).height() - $('#header').height() - $('#footer').height() - 40 - 105; var $boardsWrapper = $(this).find('.boards-wrapper'); $boardsWrapper.height(height); if($boardsWrapper.height() > $boardsWrapper.find('.boards').height()) { - $boardsWrapper.find('.boards').css('height', $(this).height()); + $boardsWrapper.find('.boards').css('height', $(this).height() - 1); } }); diff --git a/module/project/view/create.html.php b/module/project/view/create.html.php index a38205d810..53cc345752 100644 --- a/module/project/view/create.html.php +++ b/module/project/view/create.html.php @@ -122,7 +122,7 @@ id, array(0 => ''));?> -
id . "]", $plans, $product->plan, "class='form-control chosen'");?>
+
id . "]", $plans, '', "class='form-control chosen'");?>
diff --git a/module/testtask/control.php b/module/testtask/control.php index b249b30e3a..dc3504760a 100644 --- a/module/testtask/control.php +++ b/module/testtask/control.php @@ -412,8 +412,8 @@ class testtask extends control if($groupBy == 'story' && $task->build) { - $buildStoryIDs = $this->dao->select('stories')->from(TABLE_BUILD)->where('id')->eq($task->build)->fetch('stories'); - $buildStories = $this->dao->select('id,title')->from(TABLE_STORY)->where('id')->in($buildStoryIDs)->andWhere('id')->notin(array_keys($groupCases))->fetchAll('id'); + $buildStoryIdList = $this->dao->select('stories')->from(TABLE_BUILD)->where('id')->eq($task->build)->fetch('stories'); + $buildStories = $this->dao->select('id,title')->from(TABLE_STORY)->where('id')->in($buildStoryIdList)->andWhere('id')->notin(array_keys($groupCases))->fetchAll('id'); foreach($buildStories as $buildStory) { $groupCases[$buildStory->id][] = $buildStory; diff --git a/module/testtask/view/groupcase.html.php b/module/testtask/view/groupcase.html.php index 040e1a83ee..25e5bfef83 100644 --- a/module/testtask/view/groupcase.html.php +++ b/module/testtask/view/groupcase.html.php @@ -58,8 +58,8 @@ case)) { - echo ""; - continue; + echo ""; + break; } ?> case);?> diff --git a/module/tree/control.php b/module/tree/control.php index fbdad35a41..bc5b981781 100644 --- a/module/tree/control.php +++ b/module/tree/control.php @@ -317,7 +317,8 @@ class tree extends control if($confirm == 'no') { $module = $this->tree->getByID($moduleID); - die(js::confirm($module->type == 'line' ? $this->lang->tree->confirmDeleteLine : $this->lang->tree->confirmDelete, $this->createLink('tree', 'delete', "rootID=$rootID&moduleID=$moduleID&confirm=yes"))); + $confirmLang = $module->type == 'line' ? $this->lang->tree->confirmDeleteLine : $this->lang->tree->confirmDelete; + die(js::confirm($confirmLang, $this->createLink('tree', 'delete', "rootID=$rootID&moduleID=$moduleID&confirm=yes"))); } else { diff --git a/module/tree/model.php b/module/tree/model.php index a795b12679..cdd354db27 100644 --- a/module/tree/model.php +++ b/module/tree/model.php @@ -1312,9 +1312,7 @@ class treeModel extends model if(isset($module->root) and $module->root != $self->root) { $this->dao->update(TABLE_MODULE)->set('root')->eq($module->root)->where('id')->in($childs)->exec(); - $selfProduct = $this->loadModel('product')->getByID($self->root); - $product = $this->loadModel('product')->getByID($module->root); - if($selfProduct->type == 'branch' and $product->type != 'branch') $this->dao->update(TABLE_MODULE)->set('branch')->eq(0)->where('id')->in($childs)->exec(); + $this->dao->update(TABLE_MODULE)->set('branch')->eq(0)->where('id')->in($childs)->exec(); } $this->fixModulePath(isset($module->root) ? $module->root : $self->root, $self->type); if(isset($module->root) and $module->root != $self->root) $this->changeRoot($moduleID, $self->root, $module->root, $self->type); diff --git a/module/tree/view/edit.html.php b/module/tree/view/edit.html.php index 12631222ac..380ac757f8 100644 --- a/module/tree/view/edit.html.php +++ b/module/tree/view/edit.html.php @@ -86,4 +86,5 @@ $(function() getProductModules($(this).val()); }) }) +$(function(){$('.chosen').chosen();})