select-url.jsp 이동
parent
7f9c0e1391
commit
e486b8197f
@ -0,0 +1,53 @@
|
|||||||
|
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%>
|
||||||
|
<%@ include file="/WEB-INF/jsp/include/taglib.jsp"%>
|
||||||
|
<div id="_url-tree" class="main-left d-flex flex-column flex-grow-1">
|
||||||
|
<div class="d-flex justify-content-between py-2 border-separator-y">
|
||||||
|
<span>
|
||||||
|
<button id="_urlToggler" onclick="_toggleURLs();" class="btn btn-primary"></button>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div id="_urlTree" class="pt-3 ox-auto oy-auto h-px-500">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var _multiple = ${multiple},
|
||||||
|
_urlSupport = treeSupport({
|
||||||
|
selector:"#_urlTree",
|
||||||
|
trace:wctx.trace,
|
||||||
|
plugins: _multiple ? ["checkbox"] : [],
|
||||||
|
core:{check_callback:true,
|
||||||
|
multiple:_multiple
|
||||||
|
// themes:{name:"proton"}
|
||||||
|
},
|
||||||
|
checkbox:{
|
||||||
|
whole_node:false,
|
||||||
|
tie_selection:false
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
function getSelectedURL() {
|
||||||
|
var selected = _multiple ? _urlSupport.checkedNodes() : _urlSupport.selectedNodes();
|
||||||
|
if (selected.length < 1)
|
||||||
|
return dialog.alert("URL을 선택하십시오.");
|
||||||
|
|
||||||
|
if (_multiple)
|
||||||
|
return selected;
|
||||||
|
else
|
||||||
|
return selected[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
function _toggleURLs() {
|
||||||
|
$("#_urlToggler").text(_urlSupport.toggleFolding() == "collapsed" ? "+ 펼치기" : "- 닫기");
|
||||||
|
}
|
||||||
|
|
||||||
|
var urls = ${urls};
|
||||||
|
|
||||||
|
_urlSupport.setData(treeHtml(urls, {
|
||||||
|
id:function(e){return e.url;},
|
||||||
|
text:function(e){
|
||||||
|
return e.name == e.url ? e.name : e.name + " (" + e.url + ")";
|
||||||
|
}
|
||||||
|
}));
|
||||||
|
|
||||||
|
$("#_urlToggler").text(_urlSupport._folding == "collapsed" ? "+ 펼치기" : "- 닫기");
|
||||||
|
</script>
|
Loading…
Reference in New Issue