From 7462aeed2b40e701edaf35f349ff7d1ddf93aea6 Mon Sep 17 00:00:00 2001 From: wangwenrui Date: Sat, 29 Sep 2018 10:54:16 +0800 Subject: [PATCH 01/16] =?UTF-8?q?=E6=8B=93=E6=89=91=E5=9B=BE=E5=BC=B9?= =?UTF-8?q?=E5=87=BA=E6=A1=86=E8=A1=A8=E5=A4=B4=E6=82=AC=E6=B5=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WebRoot/js/onmouse.js | 1200 +++++++++++++++++++++-------------------- 1 file changed, 603 insertions(+), 597 deletions(-) diff --git a/WebRoot/js/onmouse.js b/WebRoot/js/onmouse.js index 5b7b498..155f322 100644 --- a/WebRoot/js/onmouse.js +++ b/WebRoot/js/onmouse.js @@ -1,598 +1,604 @@ -var highlightcolor='#8D94A5'; -//此处clickcolor只能用win系统颜色代码才能成功,如果用#xxxxxx的代码就不行, -var clickcolor='#8D94A5'; -function changeto(){ - //source=event.srcElement; - //if (source.tagName=="TR"||source.tagName=="TABLE") return; - //while(source.tagName!="TD") - // source=source.parentElement; - //source=source.parentElement; - //cs = source.children; - //alert(cs.length); - //if (cs[1].style.backgroundColor!=highlightcolor&&source.id!="nc"&&cs[1].style.backgroundColor!=clickcolor) - //for(i=0;i 0){ - if(how == "edit") - return selectedCount > 1 ? false : true; - else if(how == 'remove') - return true; - else if(how == 'exportXls') - return true; - }else{ - return false; - } -} -//判断是否进行提交操作 -function isOperation(checkName,flagValue){ - var yxbzValue ; - var yxbz; - var flag = false; - var checks = document.getElementsByTagName("input"); - for(i = 0 ; i <= checks.length ; i++ ){ - if(checks[i]){ - if(checks[i].name == checkName){ - if(checks[i].checked) - { - yxbz='yxbz'+checks[i].value; - yxbzValue = document.getElementById(yxbz).value; - if(yxbzValue==flagValue){ - flag=true; - } - } - } - } - } - return flag; -} - -//判断是否进行提交操作 -function isGroup(checkName){ - var yxbzValue ; - var yxbz; - var flag = false; - var checks = document.getElementsByTagName("input"); - for(i = 0 ; i <= checks.length ; i++ ){ - if(checks[i]){ - if(checks[i].name == checkName){ - if(checks[i].checked) - { - yxbz='group'+checks[i].value; - yxbzValue = document.getElementById(yxbz).value; - //alert(yxbzValue); - if(yxbzValue!=null&&yxbzValue!=''){ - flag = true; - } - } - } - } - } - //alert(flag); - return flag; -} - - -function $id(tid,type,show){// id 类型 alter的消息 - //2013-1-30 hyx add ---start - if(document.getElementById(tid)==null) { - return true; - } - //2013-1-30 hyx add ---end - if(type != 'ip1'){ - $("#"+tid).next().html('*'); - }else{ - $("#"+tid).next().html(''); - } - - var name=document.getElementById(tid).value; - if($.trim(name)==''&& type=="xz"){ - $("#"+tid).next().html('请选择'+show); - return false; - } - - if($.trim(name)==''&& type!="remark"){ - $("#"+tid).next().html('请输入'+show); - return false; - } - - if(type=='sz'){ - if(name.replace(/[\d+]/ig,"").length>0){ - //alert(show+'请输入数字') - $("#"+tid).next().html(show+'请输入数字'); - return false; - } - } - - if(type=='port'){ - if(name.replace(/[\d+]/ig,"").length>0){ - //alert(show+'请输入数字') - $("#"+tid).next().html(show+'请输入数字'); - return false; - } - if(name<0){ - //alert(show+'不能小于零') - $("#"+tid).next().html(show+'不能小于零'); - return false; - } - if(name>65535){ - //alert(show+'不能大于65535') - $("#"+tid).next().html(show+'不能大于65535'); - return false; - } - } - - if(type=='ip'|| type=='ip1'){ - var arr=name.match(/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/); - if(arr==null){ - //alert("输入"+show+"不符合要求"); - $("#"+tid).next().html('输入'+show+'不符合要求'); - return false; - } - for(i=1;i255){ - //alert("输入"+show+"不符合要求"); - $("#"+tid).next().html('输入'+show+'不符合要求'); - return false; - } - } - } - - if(type=='remark'){ - if(name.length>500){ - //alert(show+'不能大于五百个字符') - $("#"+tid).next().html(show+'不能大于五百个字符'); - return false; - } - } - -// if(name.length>0){ -// $("#"+tid).val(name); -// } - return true; -} - function fixTableHeader(gv,scrollHeight) - { - //var gvn=$(gv).clone(true).removeAttr("id"); - var gvn = $(gv). - $(gvn).find("tr:not(:first)").remove(); - $(gv).before(gvn); - $(gv).find("tr:first").remove(); - $(gv).wrap("
"); - } - - (function($){ - //内部变量 - var tableId,windowId; - var iWindowObjs = new Array(); //iframe的窗口数组 - var iWinOffset = new Array(); //窗口的 - //属性 - var defaults ={ - 'lockFlag': true, // 是否实现表头浮动标识 true 实现 ;flase 不实现 默认 实现 - 'resize' : true, // 窗口大小变化时 同步表头浮动 默认实现 - 'minRows' : 1, // 表头行数 默认 1行 - 'headerDiv' : 'clone_header_div', // 存放表头的div - 'cloneHeader' : 'clone_header' // 克隆表头 - }; - //初始化参数 - $.fn.initHeader = function(winId,lockFlag,resize,minRows,headerDiv,cloneHeader){ - tableId = $(this).attr("id"); //列表ID - windowId = winId; //窗口ID - defaults.lockFlag = ( lockFlag != null && lockFlag != '' ? lockFlag : defaults.lockFlag ); - defaults.resize = ( resize != null && resize != '' ? resize : defaults.resize ); - defaults.minRows = ( minRows != null && minRows != '' ? minRows : defaults.minRows ); - defaults.headerDiv = ( headerDiv != null && headerDiv != '' ? headerDiv : defaults.headerDiv ); - defaults.cloneHeader = ( cloneHeader != null && cloneHeader != '' ? cloneHeader : defaults.cloneHeader ); - return $(this); - } - - $.fn.floatHeader = function(){ - var $tableOrg = $(this); - var $cloneHeader = $(this).clone(true); //克隆表 - $cloneHeader.width($(this).width()); //宽同步 - $cloneHeader.attr("boder",0); - $cloneHeader.attr("id",defaults.cloneHeader); - //行列两层嵌套循环,对应设定克隆表列宽 - //计算表头行数defaults.minRows - $cloneHeader.find("tr").each(function(row,domEle){ // 克隆表 行循环 - if(rowdefaults.minRows-row){ - defaults.minRows = defaults.minRows + $cellOrg.attr('rowspan')-1; - } - }); - }else{ - $(domEle).remove(); //删除克隆表的无意义数据 - } - }); - //检查 表头是否已存在 删除已存在的 以备添加新表头 - if($("#"+defaults.headerDiv).length > 0){ - $("#"+defaults.headerDiv).remove(); - //创建表头div - var tableOrgPosition = $(this).position(); - var div = $("
"); - div.css("top",tableOrgPosition.top+'px').css("left", tableOrgPosition.left+'px') //显示的X轴到左边框距离 - .css("width", $cloneHeader.outerWidth(true)+'px').css("height", $cloneHeader.outerHeight(true)+'px') //高度 - .attr("id", defaults.headerDiv); // 为div设置Id 为 headerId - div.append($cloneHeader); // 将克隆的表头添加到div中 - div.insertBefore($('body table',window.document).first()); // 将div加入页面中 - var $divArray = $(this).closest("div"); - var divO = $divArray[0]; - div.css('top','28px'); - div.css('display','inline'); - } - - return $("#"+defaults.headerDiv); - } - - $.fn.floatHeaderDiv = function(){ - var $tableOrg = $(this); - var $cloneHeader = $(this).clone(true); //克隆表 - - $cloneHeader.width($(this).width()); //宽同步 - $cloneHeader.attr("boder",0); - $cloneHeader.attr("id",defaults.cloneHeader); - //行列两层嵌套循环,对应设定克隆表列宽 - //计算表头行数defaults.minRows - $cloneHeader.find("tr").each(function(row,domEle){ // 克隆表 行循环 - if(rowdefaults.minRows-row){ - defaults.minRows = defaults.minRows + $cellOrg.attr('rowspan')-1; - } - }); - }else{ - $(domEle).remove(); //删除克隆表的无意义数据 - } - }); - - //检查 表头是否已存在 删除已存在的 以备添加新表头 - if($("#"+defaults.headerDiv).length > 0){ - $("#"+defaults.headerDiv).remove(); - } - //创建表头div - var tableOrgPosition = $(this).position(); - var $headerDiv = $("
"); - $headerDiv.css("top",tableOrgPosition.top+'px').css("left", tableOrgPosition.left+'px') //显示的X轴到左边框距离 - .css("width", $cloneHeader.outerWidth(true)+'px').css("height", $cloneHeader.outerHeight(true)+'px') //高度 - .attr("id", defaults.headerDiv); // 为div设置Id 为 headerId - $headerDiv.append($cloneHeader); // 将克隆的表头添加到div中 - $headerDiv.insertBefore($('body table',window.document).first()); // 将div加入页面中 - - //同步列表宽度 - $(this).parent().scroll(function(){ - var $divArray = $(this).closest("div"); - if($divArray.size()>0){ - var divO = $divArray[0]; - if(tableOrgPosition.top < divO.scrollTop){ - $headerDiv.css('top','28px'); - $headerDiv.css('display','inline'); - }else{ - $headerDiv.css('display','none'); - } - } - }); - - //$(this).resize(function(){ - // if(defaults.resize){ - // if($headerDiv.width() != $(this).width()){ - // var $tableOrg = $(this); - // var $cloneHeader = $("#"+defaults.cloneHeader); //表头 - // $cloneHeader.find("tr").each(function(row,domEle){ // 克隆表 行循环 - // $colDataOrg = $tableOrg.find("tr").eq(row).children(); // 原数据表 取第row行数据 - // //alert($(domEle).children().size()+" " +$colDataOrg.size()); - // $(domEle).children().each(function(col){ // 克隆表 列循环 - // $cellOrg = $colDataOrg.eq(col); - // $(this).width($cellOrg.width()); //设置对应列宽 - // $(this).height($cellOrg.height()); - // }); - // }); - // //获取当前 iframe 在全窗口位置 - // $headerDiv.css("left", $tableOrg.position().left+'px'); //显示的X轴到左边框距离 - // $headerDiv.css("width", $tableOrg.width()+'px'); //宽度 - // - // $("#"+defaults.cloneHeader).css("left", $tableOrg.position().left+'px'); //显示的X轴到左边框距离 - // $("#"+defaults.cloneHeader).css("width", $tableOrg.width()+'px'); //宽度 - // //判断表头是否需要显示 - // //var headerTop = $(this).position().top; - // } - // } - //}); - return $headerDiv; - } - })(jQuery) - -function checkEmail(str){ - var reg=/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/ ; - return reg.test(str); - } - -//检查是否包含特殊字符 -function containSpecial( s ) -{ - var containSpecial = RegExp(/[(/\s/)(、)(\ )(\~)(\!)(\@)(\#)(\$)(¥)(\%)(;)(:)(“)(”)(\^)(\&)(\*)(\()(\))(\+)(\=)(\[)(\])(\{)(\})(\|)(\\)(\;)(\:)(\')(\")(\,)(\.)(。)(\/)(\<)(\>)(\?)(\)]+/); - return ( containSpecial.test(s) ); -} - -//检查是否包含特殊字符 -function checkStrNoDian( s ) -{ - var containSpecial = RegExp(/[(/\s/)(、)(\ )(\~)(\!)(\@)(\#)(\$)(¥)(\%)(;)(:)(“)(”)(\^)(\&)(\*)(\()(\))(\+)(\=)(\[)(\])(\{)(\})(\|)(\\)(\;)(\:)(\')(\")(\,)(。)(\/)(\<)(\>)(\?)(\)]+/); - return ( containSpecial.test(s) ); -} - -//检查是否包含特殊字符 可以包含中间空格 . _ -function checkSpecial( s ) -{ - var containSpecial = RegExp(/[(、)(\~)(\!)(\@)(\#)(\$)(¥)(\%)(;)(:)(“)(”)(\^)(\&)(\*)(\()(\))(\+)(\=)(\[)(\])(\{)(\})(\|)(\\)(\;)(\:)(\')(\")(\,)(。)(\/)(\<)(\>)(\?)(\)]+/); - return ( containSpecial.test($.trim(s))); -} - - -//层覆盖 -function coverDiv(){ - var msgw,msgh,bordercolor; - msgw=400;//提示窗口的宽度 - msgh=100;//提示窗口的高度 - titleheight=25 //提示窗口标题高度 - bordercolor="#336699";//提示窗口的边框颜色 - titlecolor="#99CCFF";//提示窗口的标题颜色 - - var sWidth,sHeight; - sWidth=document.body.offsetWidth;//浏览器工作区域内页面宽度 - - if(document.body.offsetHeightspanToWinRightWidth) { - spanX = tmpLeftVal; - } - - if(instanceDiv!=null && instanceDiv!='undefined') { - if(navigator.userAgent.indexOf("MSIE")>0) { - instanceDiv.style.left = spanX+"px"; - } - if(navigator.userAgent.indexOf("Firefox")>0){ - instanceDiv.style.left = spanX-60+"px"; - } - instanceDiv.style.top = spanY+"px"; - $(instanceDiv).css("width",spanRealWidth);//宽度为当前鼠标的位置到最右边窗口的距离 - instanceDiv.style.zIndex = 1000; - } - var ch = document.body.clientHeight; - var divheight = $("#"+showContentSpanId).height(); - if((startY+divheight)>ch){ - instanceDiv.style.top = startY-divheight-12+"px"; - } - $("#"+showContentSpanId).show(); - } - - function hideTitle(showContentSpanId) { - $("#"+showContentSpanId).hide(); - } +var highlightcolor='#8D94A5'; +//此处clickcolor只能用win系统颜色代码才能成功,如果用#xxxxxx的代码就不行, +var clickcolor='#8D94A5'; +function changeto(){ + //source=event.srcElement; + //if (source.tagName=="TR"||source.tagName=="TABLE") return; + //while(source.tagName!="TD") + // source=source.parentElement; + //source=source.parentElement; + //cs = source.children; + //alert(cs.length); + //if (cs[1].style.backgroundColor!=highlightcolor&&source.id!="nc"&&cs[1].style.backgroundColor!=clickcolor) + //for(i=0;i 0){ + if(how == "edit") + return selectedCount > 1 ? false : true; + else if(how == 'remove') + return true; + else if(how == 'exportXls') + return true; + }else{ + return false; + } +} +//判断是否进行提交操作 +function isOperation(checkName,flagValue){ + var yxbzValue ; + var yxbz; + var flag = false; + var checks = document.getElementsByTagName("input"); + for(i = 0 ; i <= checks.length ; i++ ){ + if(checks[i]){ + if(checks[i].name == checkName){ + if(checks[i].checked) + { + yxbz='yxbz'+checks[i].value; + yxbzValue = document.getElementById(yxbz).value; + if(yxbzValue==flagValue){ + flag=true; + } + } + } + } + } + return flag; +} + +//判断是否进行提交操作 +function isGroup(checkName){ + var yxbzValue ; + var yxbz; + var flag = false; + var checks = document.getElementsByTagName("input"); + for(i = 0 ; i <= checks.length ; i++ ){ + if(checks[i]){ + if(checks[i].name == checkName){ + if(checks[i].checked) + { + yxbz='group'+checks[i].value; + yxbzValue = document.getElementById(yxbz).value; + //alert(yxbzValue); + if(yxbzValue!=null&&yxbzValue!=''){ + flag = true; + } + } + } + } + } + //alert(flag); + return flag; +} + + +function $id(tid,type,show){// id 类型 alter的消息 + //2013-1-30 hyx add ---start + if(document.getElementById(tid)==null) { + return true; + } + //2013-1-30 hyx add ---end + if(type != 'ip1'){ + $("#"+tid).next().html('*'); + }else{ + $("#"+tid).next().html(''); + } + + var name=document.getElementById(tid).value; + if($.trim(name)==''&& type=="xz"){ + $("#"+tid).next().html('请选择'+show); + return false; + } + + if($.trim(name)==''&& type!="remark"){ + $("#"+tid).next().html('请输入'+show); + return false; + } + + if(type=='sz'){ + if(name.replace(/[\d+]/ig,"").length>0){ + //alert(show+'请输入数字') + $("#"+tid).next().html(show+'请输入数字'); + return false; + } + } + + if(type=='port'){ + if(name.replace(/[\d+]/ig,"").length>0){ + //alert(show+'请输入数字') + $("#"+tid).next().html(show+'请输入数字'); + return false; + } + if(name<0){ + //alert(show+'不能小于零') + $("#"+tid).next().html(show+'不能小于零'); + return false; + } + if(name>65535){ + //alert(show+'不能大于65535') + $("#"+tid).next().html(show+'不能大于65535'); + return false; + } + } + + if(type=='ip'|| type=='ip1'){ + var arr=name.match(/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/); + if(arr==null){ + //alert("输入"+show+"不符合要求"); + $("#"+tid).next().html('输入'+show+'不符合要求'); + return false; + } + for(i=1;i255){ + //alert("输入"+show+"不符合要求"); + $("#"+tid).next().html('输入'+show+'不符合要求'); + return false; + } + } + } + + if(type=='remark'){ + if(name.length>500){ + //alert(show+'不能大于五百个字符') + $("#"+tid).next().html(show+'不能大于五百个字符'); + return false; + } + } + +// if(name.length>0){ +// $("#"+tid).val(name); +// } + return true; +} + function fixTableHeader(gv,scrollHeight) + { + //var gvn=$(gv).clone(true).removeAttr("id"); + var gvn = $(gv). + $(gvn).find("tr:not(:first)").remove(); + $(gv).before(gvn); + $(gv).find("tr:first").remove(); + $(gv).wrap("
"); + } + + (function($){ + //内部变量 + var tableId,windowId; + var iWindowObjs = new Array(); //iframe的窗口数组 + var iWinOffset = new Array(); //窗口的 + //属性 + var defaults ={ + 'lockFlag': true, // 是否实现表头浮动标识 true 实现 ;flase 不实现 默认 实现 + 'resize' : true, // 窗口大小变化时 同步表头浮动 默认实现 + 'minRows' : 1, // 表头行数 默认 1行 + 'headerDiv' : 'clone_header_div', // 存放表头的div + 'cloneHeader' : 'clone_header' // 克隆表头 + }; + //初始化参数 + $.fn.initHeader = function(winId,lockFlag,resize,minRows,headerDiv,cloneHeader){ + tableId = $(this).attr("id"); //列表ID + windowId = winId; //窗口ID + defaults.lockFlag = ( lockFlag != null && lockFlag != '' ? lockFlag : defaults.lockFlag ); + defaults.resize = ( resize != null && resize != '' ? resize : defaults.resize ); + defaults.minRows = ( minRows != null && minRows != '' ? minRows : defaults.minRows ); + defaults.headerDiv = ( headerDiv != null && headerDiv != '' ? headerDiv : defaults.headerDiv ); + defaults.cloneHeader = ( cloneHeader != null && cloneHeader != '' ? cloneHeader : defaults.cloneHeader ); + return $(this); + } + + $.fn.floatHeader = function(){ + var $tableOrg = $(this); + var $cloneHeader = $(this).clone(true); //克隆表 + $cloneHeader.width($(this).width()); //宽同步 + $cloneHeader.attr("boder",0); + $cloneHeader.attr("id",defaults.cloneHeader); + //行列两层嵌套循环,对应设定克隆表列宽 + //计算表头行数defaults.minRows + $cloneHeader.find("tr").each(function(row,domEle){ // 克隆表 行循环 + if(rowdefaults.minRows-row){ + defaults.minRows = defaults.minRows + $cellOrg.attr('rowspan')-1; + } + }); + }else{ + $(domEle).remove(); //删除克隆表的无意义数据 + } + }); + //检查 表头是否已存在 删除已存在的 以备添加新表头 + if($("#"+defaults.headerDiv).length > 0){ + $("#"+defaults.headerDiv).remove(); + //创建表头div + var tableOrgPosition = $(this).position(); + var div = $("
"); + div.css("top",tableOrgPosition.top+'px').css("left", tableOrgPosition.left+'px') //显示的X轴到左边框距离 + .css("width", $cloneHeader.outerWidth(true)+'px').css("height", $cloneHeader.outerHeight(true)+'px') //高度 + .attr("id", defaults.headerDiv); // 为div设置Id 为 headerId + div.append($cloneHeader); // 将克隆的表头添加到div中 + div.insertBefore($('body table',window.document).first()); // 将div加入页面中 + var $divArray = $(this).closest("div"); + var divO = $divArray[0]; + div.css('top','0px'); + div.css('display','inline'); + } + + return $("#"+defaults.headerDiv); + } + + $.fn.floatHeaderDiv = function(){ + var $tableOrg = $(this); + var $cloneHeader = $(this).clone(true); //克隆表 + + $cloneHeader.width($(this).width()); //宽同步 + $cloneHeader.attr("boder",0); + $cloneHeader.attr("id",defaults.cloneHeader); + //行列两层嵌套循环,对应设定克隆表列宽 + //计算表头行数defaults.minRows + $cloneHeader.find("tr").each(function(row,domEle){ // 克隆表 行循环 + if(rowdefaults.minRows-row){ + defaults.minRows = defaults.minRows + $cellOrg.attr('rowspan')-1; + } + }); + }else{ + $(domEle).remove(); //删除克隆表的无意义数据 + } + }); + + //检查 表头是否已存在 删除已存在的 以备添加新表头 + if($("#"+defaults.headerDiv).length > 0){ + $("#"+defaults.headerDiv).remove(); + } + //创建表头div + var tableOrgPosition = $(this).position(); + var $headerDiv = $("
"); + $headerDiv.css("top",tableOrgPosition.top+'px').css("left", tableOrgPosition.left+'px') //显示的X轴到左边框距离 + .css("width", $cloneHeader.outerWidth(true)+'px').css("height", $cloneHeader.outerHeight(true)+'px') //高度 + .attr("id", defaults.headerDiv); // 为div设置Id 为 headerId + $headerDiv.append($cloneHeader); // 将克隆的表头添加到div中 + $headerDiv.insertBefore($('body table',window.document).first()); // 将div加入页面中 + + //同步列表宽度 + $(this).parent().scroll(function(){ + var $divArray = $(this).closest("div"); + if($divArray.size()>0){ + var divO = $divArray[0]; + if(tableOrgPosition.top < divO.scrollTop){ + var preDivTop=$headerDiv.parent().prevAll("div[id='divTop']"); + if(preDivTop.length>0){ + $headerDiv.css('top','28px'); + }else{ + $headerDiv.css('top','0px'); + } + $headerDiv.css('display','inline'); + + }else{ + $headerDiv.css('display','none'); + } + } + }); + + //$(this).resize(function(){ + // if(defaults.resize){ + // if($headerDiv.width() != $(this).width()){ + // var $tableOrg = $(this); + // var $cloneHeader = $("#"+defaults.cloneHeader); //表头 + // $cloneHeader.find("tr").each(function(row,domEle){ // 克隆表 行循环 + // $colDataOrg = $tableOrg.find("tr").eq(row).children(); // 原数据表 取第row行数据 + // //alert($(domEle).children().size()+" " +$colDataOrg.size()); + // $(domEle).children().each(function(col){ // 克隆表 列循环 + // $cellOrg = $colDataOrg.eq(col); + // $(this).width($cellOrg.width()); //设置对应列宽 + // $(this).height($cellOrg.height()); + // }); + // }); + // //获取当前 iframe 在全窗口位置 + // $headerDiv.css("left", $tableOrg.position().left+'px'); //显示的X轴到左边框距离 + // $headerDiv.css("width", $tableOrg.width()+'px'); //宽度 + // + // $("#"+defaults.cloneHeader).css("left", $tableOrg.position().left+'px'); //显示的X轴到左边框距离 + // $("#"+defaults.cloneHeader).css("width", $tableOrg.width()+'px'); //宽度 + // //判断表头是否需要显示 + // //var headerTop = $(this).position().top; + // } + // } + //}); + return $headerDiv; + } + })(jQuery) + +function checkEmail(str){ + var reg=/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/ ; + return reg.test(str); + } + +//检查是否包含特殊字符 +function containSpecial( s ) +{ + var containSpecial = RegExp(/[(/\s/)(、)(\ )(\~)(\!)(\@)(\#)(\$)(¥)(\%)(;)(:)(“)(”)(\^)(\&)(\*)(\()(\))(\+)(\=)(\[)(\])(\{)(\})(\|)(\\)(\;)(\:)(\')(\")(\,)(\.)(。)(\/)(\<)(\>)(\?)(\)]+/); + return ( containSpecial.test(s) ); +} + +//检查是否包含特殊字符 +function checkStrNoDian( s ) +{ + var containSpecial = RegExp(/[(/\s/)(、)(\ )(\~)(\!)(\@)(\#)(\$)(¥)(\%)(;)(:)(“)(”)(\^)(\&)(\*)(\()(\))(\+)(\=)(\[)(\])(\{)(\})(\|)(\\)(\;)(\:)(\')(\")(\,)(。)(\/)(\<)(\>)(\?)(\)]+/); + return ( containSpecial.test(s) ); +} + +//检查是否包含特殊字符 可以包含中间空格 . _ +function checkSpecial( s ) +{ + var containSpecial = RegExp(/[(、)(\~)(\!)(\@)(\#)(\$)(¥)(\%)(;)(:)(“)(”)(\^)(\&)(\*)(\()(\))(\+)(\=)(\[)(\])(\{)(\})(\|)(\\)(\;)(\:)(\')(\")(\,)(。)(\/)(\<)(\>)(\?)(\)]+/); + return ( containSpecial.test($.trim(s))); +} + + +//层覆盖 +function coverDiv(){ + var msgw,msgh,bordercolor; + msgw=400;//提示窗口的宽度 + msgh=100;//提示窗口的高度 + titleheight=25 //提示窗口标题高度 + bordercolor="#336699";//提示窗口的边框颜色 + titlecolor="#99CCFF";//提示窗口的标题颜色 + + var sWidth,sHeight; + sWidth=document.body.offsetWidth;//浏览器工作区域内页面宽度 + + if(document.body.offsetHeightspanToWinRightWidth) { + spanX = tmpLeftVal; + } + + if(instanceDiv!=null && instanceDiv!='undefined') { + if(navigator.userAgent.indexOf("MSIE")>0) { + instanceDiv.style.left = spanX+"px"; + } + if(navigator.userAgent.indexOf("Firefox")>0){ + instanceDiv.style.left = spanX-60+"px"; + } + instanceDiv.style.top = spanY+"px"; + $(instanceDiv).css("width",spanRealWidth);//宽度为当前鼠标的位置到最右边窗口的距离 + instanceDiv.style.zIndex = 1000; + } + var ch = document.body.clientHeight; + var divheight = $("#"+showContentSpanId).height(); + if((startY+divheight)>ch){ + instanceDiv.style.top = startY-divheight-12+"px"; + } + $("#"+showContentSpanId).show(); + } + + function hideTitle(showContentSpanId) { + $("#"+showContentSpanId).hide(); + } \ No newline at end of file From d9f76096bcb8333cdc5bf4b8568b405caee874d9 Mon Sep 17 00:00:00 2001 From: wangwenrui Date: Sat, 29 Sep 2018 13:59:14 +0800 Subject: [PATCH 02/16] =?UTF-8?q?1.3D=E6=9C=BA=E6=88=BF=E5=8F=B3=E4=BE=A7?= =?UTF-8?q?=E5=BC=B9=E6=A1=86=E4=BF=AE=E5=A4=8D=202.=E8=8F=9C=E5=8D=95?= =?UTF-8?q?=E6=A0=8F=E9=AB=98=E4=BA=AE=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WebRoot/main.jsp | 1387 ++++++++++++++-------------- WebRoot/page/show/show3DRoom.jsp | 8 +- WebRoot/page/show/showNodeRoom.jsp | 6 +- 3 files changed, 721 insertions(+), 680 deletions(-) diff --git a/WebRoot/main.jsp b/WebRoot/main.jsp index 5007e68..73e2c1d 100644 --- a/WebRoot/main.jsp +++ b/WebRoot/main.jsp @@ -1,677 +1,710 @@ -<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> -<%@include file="/common/taglib.jsp"%> -<%@ taglib uri="/WEB-INF/tlds/tree.tld" prefix="tree"%> -<%@ page import="nis.nms.domains.*"%> -<%@ page import="nis.nms.util.*"%> -<% - String path = request.getContextPath(); - String basePath = request.getScheme() + "://" - + request.getServerName() + ":" + request.getServerPort() - + path + "/"; - XtYhJbxx user = (XtYhJbxx)request.getSession().getAttribute(Constant.SESSION_CZY_NAME); - String systemname = (String)request.getSession().getAttribute(Constant.SESSION_SYSTEM_LOGIN_NAME); - if(systemname == null)systemname=""; -%> - - - - - - -i18n_main.message.title_n81i - - - - - - - - - - - - - - - - - - - - - -<%----%> - - - - - - - -
-
- - -
- - - - - - - -
-
- ▽i18n_main.text.show1_n81i▽ -
-
-
- - -
-
-
-
- - - - - -
- -
- -
- <% - String userName = ""; - if(user != null){userName = user.getYhbh();} - if("admin".equals(userName)){ - %> - - <% - }else{ - %> - - <% - } - %> -
-
- - - - - - -
- -
- - - - +<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> +<%@include file="/common/taglib.jsp"%> +<%@ taglib uri="/WEB-INF/tlds/tree.tld" prefix="tree"%> +<%@ page import="nis.nms.domains.*"%> +<%@ page import="nis.nms.util.*"%> +<% + String path = request.getContextPath(); + String basePath = request.getScheme() + "://" + + request.getServerName() + ":" + request.getServerPort() + + path + "/"; + XtYhJbxx user = (XtYhJbxx)request.getSession().getAttribute(Constant.SESSION_CZY_NAME); + String systemname = (String)request.getSession().getAttribute(Constant.SESSION_SYSTEM_LOGIN_NAME); + if(systemname == null)systemname=""; +%> + + + + + + +i18n_main.message.title_n81i + + + + + + + + + + + + + + + + + + + + + +<%----%> + + + + + + + +
+
+ + +
+ + + + + + + +
+
+ ▽i18n_main.text.show1_n81i▽ +
+
+
+ + +
+
+
+
+ + + + + +
+ +
+ +
+ <% + String userName = ""; + if(user != null){userName = user.getYhbh();} + if("admin".equals(userName)){ + %> + + <% + }else{ + %> + + <% + } + %> +
+
+ + + + + + +
+ +
+ + + + diff --git a/WebRoot/page/show/show3DRoom.jsp b/WebRoot/page/show/show3DRoom.jsp index b7c563a..dbcb330 100644 --- a/WebRoot/page/show/show3DRoom.jsp +++ b/WebRoot/page/show/show3DRoom.jsp @@ -195,7 +195,7 @@ body { } } - with (oSon){ + with (oSon){ innerHTML = info; style.display = "block"; if(navigator.userAgent.indexOf("MSIE")>0) { @@ -207,6 +207,12 @@ body { y = e.clientY; style.left = x + window.document.body.scrollLeft-200 ; style.top = y + window.document.body.scrollTop-50; + }else if(navigator.userAgent.indexOf("Chrome")>0){ + var e = event ? event : window.event; + x = e.clientX; + y = e.clientY; + style.left = x + window.document.body.scrollLeft-200 ; + style.top = y + window.document.body.scrollTop-50; } } } diff --git a/WebRoot/page/show/showNodeRoom.jsp b/WebRoot/page/show/showNodeRoom.jsp index 9fc7657..5acb756 100644 --- a/WebRoot/page/show/showNodeRoom.jsp +++ b/WebRoot/page/show/showNodeRoom.jsp @@ -25,6 +25,8 @@ type="text/css"> + From c2cf40da87715b8cee4639f93c4bb5cab89dae76 Mon Sep 17 00:00:00 2001 From: chenjinsong Date: Tue, 9 Oct 2018 11:30:10 +0800 Subject: [PATCH 05/16] =?UTF-8?q?1.=E4=BF=AE=E5=A4=8D=E7=AA=97=E5=8F=A3?= =?UTF-8?q?=E5=A4=A7=E5=B0=8F=E6=94=B9=E5=8F=98=E6=97=B6=E8=A1=A8=E5=A4=B4?= =?UTF-8?q?=E5=8F=AF=E8=83=BD=E5=87=BA=E9=94=99=E7=9A=84=E9=97=AE=E9=A2=98?= =?UTF-8?q?=202.=E5=B0=86=E6=8B=93=E6=89=91=E3=80=813d=E6=9C=BA=E6=88=BF?= =?UTF-8?q?=E7=9A=84=E5=BC=B9=E6=A1=86=E6=94=B9=E4=B8=BA=E5=8A=A8=E6=80=81?= =?UTF-8?q?=E6=94=B9=E5=8F=98=E5=A4=A7=E5=B0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WebRoot/js/onmouse.js | 16 +++++++++------- WebRoot/main.jsp | 5 ++--- .../detecWarning/detecConfLevelWarningList.jsp | 4 ++-- WebRoot/page/show/nodeGroup/newShowTopo.jsp | 5 ++++- WebRoot/page/show/showNodeRoom.jsp | 14 ++++++++++++-- 5 files changed, 29 insertions(+), 15 deletions(-) diff --git a/WebRoot/js/onmouse.js b/WebRoot/js/onmouse.js index 155f322..1fabdf4 100644 --- a/WebRoot/js/onmouse.js +++ b/WebRoot/js/onmouse.js @@ -254,7 +254,7 @@ function $id(tid,type,show){// id 类型 alter的消息 $cloneHeader.attr("id",defaults.cloneHeader); //行列两层嵌套循环,对应设定克隆表列宽 //计算表头行数defaults.minRows - $cloneHeader.find("tr").each(function(row,domEle){ // 克隆表 行循环 + $cloneHeader.find("tr").each(function(row,domEle){// 克隆表 行循环 if(row 20) { + div.css('top','0px'); + div.css('display','inline'); + } } return $("#"+defaults.headerDiv); @@ -363,14 +365,14 @@ function $id(tid,type,show){// id 类型 alter的消息 if(tableOrgPosition.top < divO.scrollTop){ var preDivTop=$headerDiv.parent().prevAll("div[id='divTop']"); if(preDivTop.length>0){ - $headerDiv.css('top','28px'); + $("#"+defaults.headerDiv).css('top','28px'); }else{ - $headerDiv.css('top','0px'); + $("#"+defaults.headerDiv).css('top','0px'); } - $headerDiv.css('display','inline'); + $("#"+defaults.headerDiv).css('display','inline'); }else{ - $headerDiv.css('display','none'); + $("#"+defaults.headerDiv).css('display','none'); } } }); diff --git a/WebRoot/main.jsp b/WebRoot/main.jsp index e009d36..426094c 100644 --- a/WebRoot/main.jsp +++ b/WebRoot/main.jsp @@ -412,7 +412,6 @@ $(function(){ } -