Skip to content

Commit

Permalink
修复Bug
Browse files Browse the repository at this point in the history
  • Loading branch information
tanhaican committed Sep 13, 2017
1 parent 330f512 commit 8f90e74
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public class RepController extends BaseController {
public String repository(HttpSession session,
@RequestParam("pj")String _pj,ModelMap map) {
Pj pj = pjService.get(_pj);
map.put("pj",pj);
map.put("pj", pj);
map.put("usrList", usrService.list());
map.put("pjgrlist", pjGrService.list(_pj));
map.put("pjreslist", pjAuthService.getResList(_pj));
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/org/tree/service/AbstractTreeNodeService.java
Original file line number Diff line number Diff line change
Expand Up @@ -81,17 +81,17 @@ public StringBuffer getHTML(Tree tree, Map<String, Object> parameters) {

// span
if (this.isLeaf(tree,treeNode)) {
html.append("<span class='file'>");
html.append("<span class='file'onclick='$atc(this, false);'>");
}else{
if(i == nodes.size() -1){//last folder
html.append("<div class='hit closed-hit lastclosed-hit' onclick='$att(this);'></div>");
}else{
html.append("<div class='hit closed-hit' onclick='$att(this);'></div>");
}
html.append("<span class='folder' onclick='$att(this);'>");
html.append("<span class='folder' onclick='$atc(this, false);'>");
}
// a
html.append("<a href='javascript:void(0);' onclick='$atc(this)'>");
html.append("<a href='javascript:void(0);' onclick='$atc(this, true)'>");
html.append(StringEscapeUtils.escapeHtml(treeNode.getText()));
html.append("</a>");
html.append("</span>");
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/jdbc.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ db=MySQL
MySQL.jdbc.driver=com.mysql.jdbc.Driver
MySQL.jdbc.url=jdbc:mysql://localhost:3306/svnadmin?characterEncoding=utf-8
MySQL.jdbc.username=root
MySQL.jdbc.password=duxact
MySQL.jdbc.password=123456
MySQL.jdbc.validationQuery=select now()

#Oracle
Expand Down
8 changes: 4 additions & 4 deletions src/main/webapp/WEB-INF/views/rep/repository.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
<li id="svnroot" class="closed lastclosed" treeId="rep"
param="pj=${pj.pj}&path=${pj.path}">
<div class="hit closed-hit lastclosed-hit" onclick='$att(this);'></div>
<span class="folder" onclick='$att(this);'>
<a id="rootlink" href='javascript:void(0);' onclick='$atc(this)'>${pj.url}</a>
<span class="folder" onclick='$atc(this, false);'>
<a id="rootlink" href='javascript:void(0);' onclick='$atc(this, true)'>${pj.url}</a>
</span>
</li>
</ul>
Expand All @@ -50,7 +50,7 @@
<th class="lbl">资源</th>
<td colspan="3">
<input type="text" id="selectedRes" name="res" value="[${pj.pj}:/]" style="width: 416px;;" required/><span style="color:red;">*</span>
<select onchange="this.form.res.value=this.value">
<select onchange="this.form.res.value=this.value" style="display: none;">
<option value="">选择资源</option>
<c:forEach items="${pjreslist}" var="item">
<option value="${item}">${item}</option>
Expand Down Expand Up @@ -112,7 +112,7 @@
<tr>
<th class="lbl">权限</th>
<td colspan="3">
<select name="rw" required>
<select name="rw">
<option value="">没有权限</option>
<option value="r">可读</option>
<option value="rw">可读可写</option>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ define(function(require, exports, module){
var paramTxt = o.getAttribute("param");
var paramArr = _scope.methods.getParams(paramTxt);
var res = _scope.methods.getRes(paramArr);
res = decodeURIComponent(res);
selectedRes.val(res);
_scope.vars.path = paramArr.path;
pageBean.reload(_scope.methods.getListUrl());
Expand Down Expand Up @@ -119,7 +120,7 @@ define(function(require, exports, module){
var form = util.serializeObject($('#submitForm'));
form.pj = pj;
var load_index = util.loading();
$.post('repPathAuthAddHandler',form,function(data){
$.post('repPathAuthAddHandler', form, function(data){
util.showMsg(data.info);
if(data.status){
layer.closeAll();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,13 @@ var AjaxTreeView = {
//console.log(r);
return r;
},
click: function (a) {
click: function (a, isLink) {
if (typeof(AjaxTreeView.config.onclick) == "function") {//call onclick
return AjaxTreeView.config.onclick(a.parentNode.parentNode, a);
if(isLink) {
return AjaxTreeView.config.onclick(a.parentNode.parentNode, a);
} else {
return AjaxTreeView.config.onclick(a.parentNode, a);
}
}
},

Expand Down

0 comments on commit 8f90e74

Please sign in to comment.