123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222 |
- <%@ page contentType="text/html; charset=gb2312" language="java"%>
- <%
- String treePath = request.getContextPath();
- //<script language="JavaScript">
- %>
- function dyniframesize() {
- if (document.getElementById){
- obj = document.getElementById("tree");
- if (obj && !window.opera){
- obj.style.display="block"
- var hlenght = obj.Document.body.scrollHeight;
- var wlenght = obj.Document.body.scrollWidth;
- //if(hlenght < 150) hlenght = 150;
- if(wlenght < 160) wlenght = 160;
- obj.height = hlenght + 10;
- obj.width = wlenght + 10;
- }
- }
- }
- var treeOutObject;
- var treeOutButton;
- var treeStrFrame = ""; //HTML code container.
- var treeth;
- var treesrc;
- var hideth;
- document.writeln('<iframe id="tree" name="tree" frameborder="0" style="position: absolute;z-index: 9998; visibility:hidden">')
- document.writeln('</iframe>');
- // Page collection select tree creat function.
- function referenceTable(codeName,leafonly,hiddenObject,displayObject)
- {
- treesrc = "<%= treePath%>" + "/SystemManage/Constant/ConstantTreeDisplay.jsp?codeName=" + codeName + "&leafonly=" + leafonly;
- document.getElementsByName("tree")[0].src = treesrc;
- var dads = document.getElementsByName("tree")[0].style;
- treeth = displayObject;
- hideth = hiddenObject;
-
- var ttop = displayObject.offsetTop; //displayObject's top position.
- var thei = displayObject.offsetHeight; //displayObject's own height.
- var tleft = displayObject.offsetLeft; //displayObject's left position.
-
- while (displayObject = displayObject.offsetParent){ttop+=displayObject.offsetTop; tleft+=displayObject.offsetLeft;}
- dads.top = ttop+thei ;
- dads.left = tleft;
- treeOutButton = (arguments.length == 2) ? null : treeth;
- dads.visibility="visible";
- event.returnValue=false;
- }
- // Page collection select Canstant tree creat function.
- function roleRightTree(codeName,leafonly,hiddenObject,displayObject)
- {
- treesrc = "<%= treePath%>" + "/SystemManage/PageCollectionTree/ConstantRightSelectTree.jsp?codeName=" + codeName + "&leafonly=" + leafonly;
- document.getElementsByName("tree")[0].src = treesrc;
- var dads = document.getElementsByName("tree")[0].style;
- treeth = displayObject;
- hideth = hiddenObject;
-
- var ttop = displayObject.offsetTop; //displayObject's top position.
- var thei = displayObject.offsetHeight; //displayObject's own height.
- var tleft = displayObject.offsetLeft; //displayObject's left position.
-
- while (displayObject = displayObject.offsetParent){ttop+=displayObject.offsetTop; tleft+=displayObject.offsetLeft;}
- dads.top = ttop+thei ;
- dads.left = tleft;
- treeOutButton = (arguments.length == 2) ? null : treeth;
- dads.visibility="visible";
- event.returnValue=false;
- }
- //Page collection Area-Customer select tree creat function.
- function areaCustTree(leafonly,hiddenObject,displayObject){
- treesrc = "<%= treePath%>" + "/SystemManage/PageCollectionTree/ProCustAreaTreeDisplay.jsp?treeClass=tb_bm$_area&leafonly=" + leafonly;
- document.frames("tree").document.body.innerHTML = "<div>请稍候,正在加在数据...</div>";
- document.getElementsByName("tree")[0].src = treesrc;
- var dads = document.getElementsByName("tree")[0].style;
- treeth = displayObject;
- hideth = hiddenObject;
- var ttop = displayObject.offsetTop; //displayObject's top position.
- var thei = displayObject.offsetHeight; //displayObject's own height.
- var tleft = displayObject.offsetLeft; //displayObject's left position.
-
- while (displayObject = displayObject.offsetParent){
- ttop+=displayObject.offsetTop;
- tleft+=displayObject.offsetLeft;
- }
- dads.top = ttop+thei ;
- dads.left = tleft;
- treeOutButton = (arguments.length == 2) ? null : treeth;
- dads.visibility="visible";
- event.returnValue=false;
- }
- //Page collection ProductType - Product select tree creat function.
- function productTree(leafonly,hiddenObject,displayObject){
- treesrc = "<%= treePath%>" + "/SystemManage/PageCollectionTree/ProCustAreaTreeDisplay.jsp?treeClass=tb_bm$_producttype&leafonly=" + leafonly;
- document.frames("tree").document.body.innerHTML = "<div>请稍候,正在加在数据...</div>";
- document.getElementsByName("tree")[0].src = treesrc;
- var dads = document.getElementsByName("tree")[0].style;
- treeth = displayObject;
- hideth = hiddenObject;
- var ttop = displayObject.offsetTop; //displayObject's top position.
- var thei = displayObject.offsetHeight; //displayObject's own height.
- var tleft = displayObject.offsetLeft; //displayObject's left position.
-
- while (displayObject = displayObject.offsetParent){
- ttop+=displayObject.offsetTop;
- tleft+=displayObject.offsetLeft;
- }
- dads.top = ttop+thei ;
- dads.left = tleft;
- treeOutButton = (arguments.length == 2) ? null : treeth;
- dads.visibility="visible";
- event.returnValue=false;
- }
- function setReferenceTableTree(referenceclassid,leafonly,hiddenObject,displayObject,storeCode,displayName,parentCode,condition,order)
- {
- treesrc = "<%= treePath%>" + "/SystemManage/PageCollectionTree/RefTabTreeDis.jsp?referenceclassid=" + referenceclassid + "&leafonly=" + leafonly+"&storeCode="+storeCode+"&displayName="+displayName+"&parentCode="+parentCode+"&condition="+condition+"&order="+order;
- document.getElementsByName("tree")[0].src = treesrc;
- document.getElementsByName("tree")[0].src = treesrc;
- var dads = document.getElementsByName("tree")[0].style;
- treeth = displayObject;
- hideth = hiddenObject;
-
- var ttop = displayObject.offsetTop; //displayObject's top position.
- var thei = displayObject.offsetHeight; //displayObject's own height.
- var tleft = displayObject.offsetLeft; //displayObject's left position.
-
- while (displayObject = displayObject.offsetParent){ttop+=displayObject.offsetTop; tleft+=displayObject.offsetLeft;}
- dads.top = ttop+thei ;
- dads.left = tleft;
- treeOutButton = (arguments.length == 2) ? null : treeth;
- dads.visibility="visible";
- event.returnValue=false;
- }
- //cm select user
- function onSelectArea(hiddenObject,displayObject)
- {
- treesrc = "<%= treePath%>" + "/CmManage/CustoTreeDis.jsp";
- document.getElementsByName("tree")[0].src = treesrc;
- var dads = document.getElementsByName("tree")[0].style;
- treeth = displayObject;
- hideth = hiddenObject;
-
- var ttop = displayObject.offsetTop; //displayObject's top position.
- var thei = displayObject.offsetHeight; //displayObject's own height.
- var tleft = displayObject.offsetLeft; //displayObject's left position.
-
- while (displayObject = displayObject.offsetParent){ttop+=displayObject.offsetTop; tleft+=displayObject.offsetLeft;}
- dads.top = ttop+thei ;
- dads.left = tleft;
- treeOutButton = treeth;
- dads.visibility="visible";
- event.returnValue=false;
- }
- function setValue(code,name) {
- hideth.value=code;
- treeth.value = name;
- //if(isProduct=='true') pTreeCloseLayer();
- //else treeCloseLayer();
- treeCloseLayer();
- }
- function treedocument_onclick(e)
- {
- var elm = (document.all)?(e.srcElement):(e.target);
- //alert(elm.getAttribute("Author"));
- if ((elm.getAttribute("Author")==null || elm.getAttribute("Author")=="") && elm != treeOutObject && elm != treeOutButton)
- treeCloseLayer("");
- }
- //Press Esc,Change focus and close;
- function treedocument_onkeyup(e){
- if (window.event.keyCode==27){
- if(areaOutObject)areaOutObject.blur();
- treeCloseLayer("");
- }
- else if(document.activeElement)
- {
- if(document.activeElement.getAttribute("Author")==null && document.activeElement != treeOutObject && document.activeElement != treeOutButton)
- {
- treeCloseLayer("");
- }
- }
- }
- //Close this layer
- function treeCloseLayer(){
- var dads = document.getElementsByName("tree")[0].style;
- dads.visibility="hidden";
- document.frames("tree").document.body.innerHTML = "<div>请稍候,正在加在数据...</div>";
- }
- <%
- //</script>
- %>
|