Skip to content

Commit

Permalink
edited changes in folders list
Browse files Browse the repository at this point in the history
  • Loading branch information
shilpaskumar committed Jun 23, 2016
1 parent 5c4e272 commit 2e42cbc
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import com.deem.excord.domain.EcTestplanTestcaseMapping;
import com.deem.excord.domain.EcTestresult;
import com.deem.excord.domain.EcTeststep;
import com.deem.excord.domain.EcUser;
import com.deem.excord.repository.TestCaseRepository;
import com.deem.excord.repository.TestFolderRepository;
import com.deem.excord.repository.TestPlanRepository;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,10 @@
import com.deem.excord.vo.TestPlanMetricVo;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.logging.Level;
import java.util.HashSet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import org.slf4j.Logger;
Expand Down Expand Up @@ -221,7 +217,6 @@ public String viewTestPlan(Model model, HttpSession session, @RequestParam(value
testCaseLst = new ArrayList<>();
}
List<EcUser> activeUsersLst = uDao.findByEnabledOrderByUsernameAsc(Boolean.TRUE);
model.addAttribute("tptcLst", tptcLst);
model.addAttribute("activeUsersLst", activeUsersLst);
model.addAttribute("folderList", getFolderList(testPlan));
model.addAttribute("testPlanMetricLst", testPlanMetricLst);
Expand Down
6 changes: 6 additions & 0 deletions src/main/resources/public/js/custom/testplan_view.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ $(document).ready(function () {
}
});
});

$(document).ready(function(){
$(".form-control").change(function(){
window.location.href = "/testplan_view?testplanId="+$("#testplanId").val()+"&folderId="+this.value;
});
});

$("#checkAll").click(function (event) {
$('input:checkbox').not(this).prop('checked', this.checked);
Expand Down
13 changes: 4 additions & 9 deletions src/main/resources/templates/testplan_view.ftl.html
Original file line number Diff line number Diff line change
Expand Up @@ -151,17 +151,12 @@ <h3>Test Plan View</h3>
<label>Folders</label>
</div>
<div class="col-md-9">
<select id="folderName" class="form-control" name="folder" onchange="myFunction(this.value)" >
<option value="">- select folder -</option>
<#list folderList?keys as it>
<option value="${it}" ${(it == (folderId!0)?c)?then('selected', '')} > ${folderList[it]} </option>
<select id="folderName" class="form-control" name="folder" >
<option value="">- select folder -</option>
<#list folderList?keys as folder>
<option value="${folder}" ${(folder == (folderId!0)?c)?then('selected', '')} > ${folderList[folder]} </option>
</#list>
</select>
<script>
function myFunction(value1) {
window.location.href = "/testplan_view?testplanId=${testPlan.id?c}&folderId=" + value1;
}
</script>
</div>
</div>
</div>
Expand Down

0 comments on commit 2e42cbc

Please sign in to comment.