migrate to new git
This commit is contained in:
138
web/App_Script/js/AC_RunActiveContent.js
Normal file
138
web/App_Script/js/AC_RunActiveContent.js
Normal file
@@ -0,0 +1,138 @@
|
||||
//v1.0
|
||||
//Copyright 2006 Adobe Systems, Inc. All rights reserved.
|
||||
function AC_AddExtension(src, ext)
|
||||
{
|
||||
if (src.indexOf('?') != -1)
|
||||
return src.replace(/\?/, ext+'?');
|
||||
else
|
||||
return src + ext;
|
||||
}
|
||||
|
||||
function AC_Generateobj(objAttrs, params, embedAttrs)
|
||||
{
|
||||
var str = '<object ';
|
||||
for (var i in objAttrs)
|
||||
str += i + '="' + objAttrs[i] + '" ';
|
||||
str += '>';
|
||||
for (var i in params)
|
||||
str += '<param name="' + i + '" value="' + params[i] + '" /> ';
|
||||
str += '<embed ';
|
||||
for (var i in embedAttrs)
|
||||
str += i + '="' + embedAttrs[i] + '" ';
|
||||
str += ' ></embed></object>';
|
||||
|
||||
document.write(str);
|
||||
}
|
||||
|
||||
function AC_FL_RunContent(){
|
||||
var ret =
|
||||
AC_GetArgs
|
||||
( arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
|
||||
, "application/x-shockwave-flash"
|
||||
);
|
||||
AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
|
||||
}
|
||||
|
||||
function AC_SW_RunContent(){
|
||||
var ret =
|
||||
AC_GetArgs
|
||||
( arguments, ".dcr", "src", "clsid:166B1BCA-3F9C-11CF-8075-444553540000"
|
||||
, null
|
||||
);
|
||||
AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
|
||||
}
|
||||
|
||||
function AC_GetArgs(args, ext, srcParamName, classid, mimeType){
|
||||
var ret = new Object();
|
||||
ret.embedAttrs = new Object();
|
||||
ret.params = new Object();
|
||||
ret.objAttrs = new Object();
|
||||
for (var i=0; i < args.length; i=i+2){
|
||||
var currArg = args[i].toLowerCase();
|
||||
|
||||
switch (currArg){
|
||||
case "classid":
|
||||
break;
|
||||
case "pluginspage":
|
||||
ret.embedAttrs[args[i]] = args[i+1];
|
||||
break;
|
||||
case "src":
|
||||
case "movie":
|
||||
args[i+1] = AC_AddExtension(args[i+1], ext);
|
||||
ret.embedAttrs["src"] = args[i+1];
|
||||
ret.params[srcParamName] = args[i+1];
|
||||
break;
|
||||
case "onafterupdate":
|
||||
case "onbeforeupdate":
|
||||
case "onblur":
|
||||
case "oncellchange":
|
||||
case "onclick":
|
||||
case "ondblClick":
|
||||
case "ondrag":
|
||||
case "ondragend":
|
||||
case "ondragenter":
|
||||
case "ondragleave":
|
||||
case "ondragover":
|
||||
case "ondrop":
|
||||
case "onfinish":
|
||||
case "onfocus":
|
||||
case "onhelp":
|
||||
case "onmousedown":
|
||||
case "onmouseup":
|
||||
case "onmouseover":
|
||||
case "onmousemove":
|
||||
case "onmouseout":
|
||||
case "onkeypress":
|
||||
case "onkeydown":
|
||||
case "onkeyup":
|
||||
case "onload":
|
||||
case "onlosecapture":
|
||||
case "onpropertychange":
|
||||
case "onreadystatechange":
|
||||
case "onrowsdelete":
|
||||
case "onrowenter":
|
||||
case "onrowexit":
|
||||
case "onrowsinserted":
|
||||
case "onstart":
|
||||
case "onscroll":
|
||||
case "onbeforeeditfocus":
|
||||
case "onactivate":
|
||||
case "onbeforedeactivate":
|
||||
case "ondeactivate":
|
||||
case "type":
|
||||
case "codebase":
|
||||
ret.objAttrs[args[i]] = args[i+1];
|
||||
break;
|
||||
case "width":
|
||||
case "height":
|
||||
case "align":
|
||||
case "vspace":
|
||||
case "hspace":
|
||||
case "class":
|
||||
case "title":
|
||||
case "accesskey":
|
||||
case "name":
|
||||
case "id":
|
||||
case "tabindex":
|
||||
ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];
|
||||
break;
|
||||
default:
|
||||
ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];
|
||||
}
|
||||
}
|
||||
ret.objAttrs["classid"] = classid;
|
||||
if (mimeType) ret.embedAttrs["type"] = mimeType;
|
||||
return ret;
|
||||
}
|
||||
|
||||
//-----------------------------------------<2D>۩wjava-------------------------------------------------
|
||||
|
||||
function centerWindow(theURL,winName,width,height,features) {
|
||||
var window_width = width;
|
||||
var window_height = height;
|
||||
var edfeatures= features;
|
||||
var window_top = (screen.height-window_height)/2;
|
||||
var window_left = (screen.width-window_width)/2;
|
||||
newWindow=window.open(''+ theURL + '',''+ winName + '','width=' + window_width + ',height=' + window_height + ',top=' + window_top + ',left=' + window_left + ',features=' + edfeatures + '');
|
||||
newWindow.focus();
|
||||
}
|
||||
105
web/App_Script/js/SetPicSmallPop.js
Normal file
105
web/App_Script/js/SetPicSmallPop.js
Normal file
@@ -0,0 +1,105 @@
|
||||
/*
|
||||
*使用方法
|
||||
*
|
||||
<A href="http://www.91tuku.com/krPhotoShow.asp?photo=/demo/contentsdetail/1111/getfile_main(50).jpg" target=_blank><br>
|
||||
<IMG alt="<img src='http://upload.sj63.com/demo/Contentstop/1111/255(84).jpg' border='0' />" src="Background.gif" width="165" height="106" border=0><br>
|
||||
</A>
|
||||
*
|
||||
*
|
||||
*註:凡是在include此頁面後的頁面,只要圖片有 alt 屬性,都會有彈出式視窗.
|
||||
include方式:<script language="JavaScript" src="../../App_Script/css/SetPicSmallPop.js"></script>
|
||||
*/
|
||||
|
||||
|
||||
var pltsPop=null;
|
||||
var pltsoffsetX = 0; // 彈出視窗與Mouse左或右的距離 (3~12較合適)
|
||||
var pltsoffsetY = 0; // 彈出視窗與Mouse上或下的距離 (3~12較合適)
|
||||
var pltsTitle="";
|
||||
document.write('<div id=pltsTipLayer style="display: none;position: absolute; z-index:10001"></div>');
|
||||
function pltsinits()
|
||||
{
|
||||
document.onmouseover = plts;
|
||||
document.onmousemove = moveToMouseLoc;
|
||||
}
|
||||
function plts()
|
||||
{ var o=event.srcElement;
|
||||
if(o.alt!=null && o.alt!=""){o.dypop=o.alt;o.alt=""};
|
||||
if(o.title!=null && o.title!=""){o.dypop=o.title;o.title=""};
|
||||
pltsPop=o.dypop;
|
||||
//if(pltsPop!=null&&pltsPop!=""&&typeof(pltsPop)!="undefined")
|
||||
if(pltsPop!=null&&pltsPop!=""&&typeof(pltsPop)!="undefined"&&(event.srcElement.id=="smallpic" || event.srcElement.id=="bigpic"))
|
||||
{
|
||||
pltsTipLayer.style.left=-1000;
|
||||
pltsTipLayer.style.display='';
|
||||
var Msg=pltsPop.replace(/\n/g,"<br>");
|
||||
Msg=Msg.replace(/\0x13/g,"<br>");
|
||||
var re=/\{(.[^\{]*)\}/ig;
|
||||
if(!re.test(Msg))pltsTitle="已上傳圖片";
|
||||
else{
|
||||
re=/\{(.[^\{]*)\}(.*)/ig;
|
||||
pltsTitle=Msg.replace(re,"$1")+" ";
|
||||
re=/\{(.[^\{]*)\}/ig;
|
||||
Msg=Msg.replace(re,"");
|
||||
Msg=Msg.replace("<br>","");}
|
||||
var content =
|
||||
'<table style="FILTER:alpha(opacity=100);border: 1px solid #cccccc" id="toolTipTalbe" cellspacing="1" cellpadding="0" bgcolor="#ffffff"><tr><td width="100%"><table bgcolor="#ffffff" cellspacing="0" cellpadding="0">'+
|
||||
'<tr id="pltsPoptop"><td height="20" bgcolor="#000000"><font color="#ffffff"><b><p id="topleft" align="center">'+pltsTitle+'</p><p id="topright" align="right" style="display:none">'+pltsTitle+'↗</font></b></font></td></tr>'+
|
||||
'<tr><td "+attr+" style="padding-left:10px;padding-right:10px;padding-top: 8px;padding-bottom:6px;line-height:140%">'+Msg+'</td></tr>'+
|
||||
'<tr id="pltsPopbot" style="display:none"><td height="20" bgcolor="#000000"><font color="#ffffff"><b><p id="botleft" align="left">↙'+pltsTitle+'</p><p id="botright" align="right" style="display:none">'+pltsTitle+'↘</font></b></font></td></tr>'+
|
||||
'</table></td></tr></table>';
|
||||
pltsTipLayer.innerHTML=content;
|
||||
toolTipTalbe.style.width=Math.min(pltsTipLayer.clientWidth,document.body.clientWidth/2.2);
|
||||
moveToMouseLoc();
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
pltsTipLayer.innerHTML='';
|
||||
pltsTipLayer.style.display='none';
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
function moveToMouseLoc()
|
||||
{
|
||||
if(pltsTipLayer.innerHTML=='')return true;
|
||||
var MouseX=event.x;
|
||||
var MouseY=event.y;
|
||||
var popHeight=pltsTipLayer.clientHeight; //另開視窗的高度
|
||||
var popWidth=pltsTipLayer.clientWidth; //另開視窗的寬度
|
||||
|
||||
|
||||
pltsTipLayer.style.left=MouseX + pltsoffsetX ; //另開視窗x座標
|
||||
if (event.srcElement.id=="smallpic"){ //判斷目前滑鼠移至的圖片是那一張
|
||||
//pltsTipLayer.style.top=Label1.offsetTop - popHeight + pltsoffsetY; //另開視窗y座標 (若不使用masterpage時)
|
||||
pltsTipLayer.style.top=ctl00_ContentPlaceHolder1_Label1.offsetTop - popHeight + pltsoffsetY; //另開視窗y座標 (若將include檔放在masterpage時)
|
||||
}else if(event.srcElement.id=="bigpic"){
|
||||
//pltsTipLayer.style.top=Label2.offsetTop - popHeight + pltsoffsetY; //另開視窗y座標 (若不使用masterpage時)
|
||||
pltsTipLayer.style.top=ctl00_ContentPlaceHolder1_Label2.offsetTop - popHeight + pltsoffsetY; //另開視窗y座標 (若將include檔放在masterpage時)
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
pltsinits();
|
||||
|
||||
/*
|
||||
parseInt(event.clientY)+parseInt(document.body.scrollTop); //取得滑鼠的絕對座標
|
||||
window.screen.width==螢幕寬度
|
||||
window.screen.availWidth==螢幕寬度-工具列寬度(EX:office快捷列)
|
||||
window.screen.height==螢幕高度
|
||||
window.screen.availHeight==螢幕高度-工具列高度(EX:開始列)
|
||||
document.body.clientWidth==文件寬度-scrollbar(上下拉)寬度
|
||||
document.body.offsetWidth==文件寬度
|
||||
document.body.clientHeight==文件高度-scrollbar(左右拉)高度
|
||||
document.body.offsetHeight==文件高度
|
||||
document.body.scrollWidth==文件scrollbar(左右拉)總寬度
|
||||
document.body.scrollHeight==文件scrollbar(上下拉)總高度
|
||||
event.screenY
|
||||
|
||||
pltsTipLayer.style.left=MouseX+pltsoffsetX+document.body.scrollLeft+popLeftAdjust;
|
||||
pltsTipLayer.style.top=MouseY+pltsoffsetY+document.body.scrollTop+popTopAdjust;
|
||||
pltsTipLayer.style.top=588-popHeight;
|
||||
pltsTipLayer.style.top=MouseY-popHeight+(document.body.clientHeight-MouseY);
|
||||
alert(event.srcElement.id);
|
||||
|
||||
*/
|
||||
245
web/App_Script/js/admin.js
Normal file
245
web/App_Script/js/admin.js
Normal file
@@ -0,0 +1,245 @@
|
||||
// JavaScript Document
|
||||
|
||||
//---------------------------------iframe調整高度---------------------------------------------------
|
||||
var getFFVersion = navigator.userAgent.substring(navigator.userAgent.indexOf("Firefox")).split("/")[1]
|
||||
//extra height in px to add to iframe in FireFox 1.0+ browsers
|
||||
var FFextraHeight = getFFVersion >= 0.1 ? 16 : 0
|
||||
|
||||
function dyniframesize(iframename) {
|
||||
var pTar = null;
|
||||
if (document.getElementById) {
|
||||
pTar = document.getElementById(iframename);
|
||||
}
|
||||
else {
|
||||
eval('pTar = ' + iframename + ';');
|
||||
}
|
||||
if (pTar && !window.opera) {
|
||||
//begin resizing iframe
|
||||
pTar.style.display = "block"
|
||||
|
||||
if (pTar.contentDocument && pTar.contentDocument.body.offsetHeight) {
|
||||
//ns6 syntax
|
||||
pTar.height = (pTar.contentDocument.body.offsetHeight + FFextraHeight);
|
||||
}
|
||||
else if (pTar.Document && pTar.Document.body.scrollHeight) {
|
||||
//ie5+ syntax
|
||||
pTar.height = pTar.Document.body.scrollHeight;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//---------------------------------列印---------------------------------------------------
|
||||
|
||||
function PrintTagData(id) {
|
||||
|
||||
if (isFirefox = navigator.userAgent.indexOf("Firefox") > 0) {
|
||||
window.print();
|
||||
} else {
|
||||
|
||||
var Item = document.getElementById(id);
|
||||
var printdetail = window.open("", "TextareaDetail");
|
||||
printdetail.document.open();
|
||||
printdetail.document.write("<HTML><head><link href=\"../../module/js/css/adminroot.css\" rel=\"stylesheet\" type=\"text/css\">");
|
||||
printdetail.document.write("<script type =\"text/javascript\">");
|
||||
printdetail.document.write("function mouseover(obj,color_word){obj.style.backgroundColor = color_word;}");
|
||||
printdetail.document.write("function mouseout(obj,color_word){obj.style.backgroundColor = color_word;}");
|
||||
printdetail.document.write("<\/script>");
|
||||
printdetail.document.write("</head>");
|
||||
printdetail.document.write("<BODY onload=\"window.print();\"><div style=\"width:720px\">");
|
||||
printdetail.document.write(Item.outerHTML);
|
||||
printdetail.document.write("</div></BODY></HTML>");
|
||||
printdetail.document.close();
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
function PrintTagRWD(id) {
|
||||
|
||||
if (isFirefox = navigator.userAgent.indexOf("Firefox") > 0) {
|
||||
window.print();
|
||||
} else {
|
||||
|
||||
var Item = document.getElementById(id);
|
||||
var printdetail = window.open("", "TextareaDetail");
|
||||
printdetail.document.open();
|
||||
printdetail.document.write("<HTML><head>\n");
|
||||
printdetail.document.write('<link href="../../App_Script/bootstrap3/css/bootstrap.css" rel="stylesheet" />\n');
|
||||
printdetail.document.write('<link href="../../App_Script/bootstrap_datepicker/css/datepicker.css" rel="stylesheet" />\n');
|
||||
printdetail.document.write('<link href="../../admin/skin/css/style.css" rel="stylesheet" media="screen" />\n');
|
||||
printdetail.document.write('<link href="../../admin/skin/css/print.css" rel="stylesheet" media="print" />\n');
|
||||
printdetail.document.write('<!--[if lt IE 9]>\n');
|
||||
printdetail.document.write('<link href="../../admin/skin/css/ie8-and-down.css" rel="stylesheet" type="text/css" />\n');
|
||||
printdetail.document.write('<![endif]-->\n');
|
||||
|
||||
printdetail.document.write("<style type=\"text/css\">.hidden-print{display:none;}</style>");
|
||||
printdetail.document.write("</head>");
|
||||
printdetail.document.write("<BODY onload=\"window.print();\">");
|
||||
printdetail.document.write(Item.outerHTML);
|
||||
printdetail.document.write("</BODY></HTML>");
|
||||
printdetail.document.close();
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
//---------------------------------checkbox全選用---------------------------------------------------
|
||||
function Check(parentChk, ChildId) {
|
||||
var oElements = document.getElementsByTagName("INPUT");
|
||||
var bIsChecked = parentChk.checked;
|
||||
|
||||
for (i = 0; i < oElements.length; i++) {
|
||||
if (IsCheckBox(oElements[i]) &&
|
||||
IsMatch(oElements[i].id, ChildId)) {
|
||||
oElements[i].checked = bIsChecked;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function IsMatch(id, ChildId) {
|
||||
var sPattern = '^ctl00_ContentPlaceHolder1_Repeater1.*' + ChildId + '$';
|
||||
var oRegExp = new RegExp(sPattern);
|
||||
if (oRegExp.exec(id))
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
function IsCheckBox(chk) {
|
||||
if (chk.type == 'checkbox') return true;
|
||||
else return false;
|
||||
}
|
||||
|
||||
function checkListAll(chk) {
|
||||
$('.listCheck input').each(function () {
|
||||
this.checked = chk;
|
||||
});
|
||||
}
|
||||
|
||||
function checkAll2(chk, num) {
|
||||
$('#root_' + num).show();
|
||||
$('#root_' + num + ' input:checkbox').each(function () {
|
||||
this.checked = chk;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
//---------------------------------按鈕換圖效果---------------------------------------------------
|
||||
function MM_preloadImages() { //v3.0
|
||||
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
|
||||
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
|
||||
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
|
||||
}
|
||||
|
||||
function MM_swapImgRestore() { //v3.0
|
||||
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
|
||||
}
|
||||
|
||||
function MM_findObj(n, d) { //v4.01
|
||||
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
|
||||
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
|
||||
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
|
||||
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
|
||||
if(!x && d.getElementById) x=d.getElementById(n); return x;
|
||||
}
|
||||
|
||||
function MM_swapImage() { //v3.0
|
||||
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
|
||||
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
|
||||
|
||||
}
|
||||
|
||||
//---------------------------------選單開合---------------------------------------------------
|
||||
function admin_menu_open(oid,scc){
|
||||
|
||||
beginDate = new Date();
|
||||
endDate = new Date();
|
||||
endDate.setDate(beginDate.getDate() + 1);
|
||||
document.cookie = scc + "menu_oid=" + oid + ";path=/;expires=" + endDate.toUTCString();
|
||||
|
||||
var imax=parseInt(document.getElementById("admin_menu_max").value);
|
||||
for (i=1;i<=imax;i++){
|
||||
var m1=document.getElementById("admin_menu_" + i + "_close");
|
||||
var m2=document.getElementById("admin_menu_" + i + "_open");
|
||||
var m3=document.getElementById("admin_menu_" + i + "_sub");
|
||||
if (i==parseInt(oid)){
|
||||
m1.style.display="none";
|
||||
m2.style.display="block";
|
||||
m3.style.display="block";
|
||||
}else{
|
||||
m1.style.display="block";
|
||||
m2.style.display="none";
|
||||
m3.style.display="none";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------列表顏色切換------------------------------------------------------
|
||||
function mouseover(obj, color_word) {
|
||||
obj.style.backgroundColor = color_word; //背景顏色
|
||||
}
|
||||
|
||||
function mouseout(obj, color_word) {
|
||||
obj.style.backgroundColor = color_word; //背景顏色
|
||||
}
|
||||
|
||||
|
||||
|
||||
function mousexy(w) {
|
||||
aa = document.body.scrollLeft;
|
||||
bb = document.body.scrollTop;
|
||||
|
||||
|
||||
obj = document.getElementById("mview" + w);
|
||||
|
||||
x01 = posX("mmm" + w) + 125;
|
||||
y01 = posY("mmm" + w) - 230;
|
||||
//x01 = event.x + aa + 70;
|
||||
//y01 = event.y + bb - 160;
|
||||
obj.style.display = "block";
|
||||
obj.style.top = y01 + "px";
|
||||
obj.style.left = x01 + "px";
|
||||
|
||||
}
|
||||
function closeview(w) {
|
||||
objx = document.getElementById("mview" + w);
|
||||
objx.style.display = "none";
|
||||
}
|
||||
|
||||
function posX(objID) {
|
||||
var elmt = document.getElementById(objID);
|
||||
var x = 0;
|
||||
//繞行 offsetParents
|
||||
for (var e = elmt; e; e = e.offsetParent) {
|
||||
//把 offsetLeft 值加總
|
||||
x += e.offsetLeft;
|
||||
}
|
||||
//繞行至 document.body
|
||||
for (e = elmt.parentNode; e && e != document.body; e = e.parentNode) {
|
||||
//減去捲軸值
|
||||
if (e.scrollLeft) x -= e.scrollLeft;
|
||||
}
|
||||
return x;
|
||||
}
|
||||
|
||||
function posY(objID) {
|
||||
var elmt = document.getElementById(objID);
|
||||
var y = 0;
|
||||
//繞行 offsetParents
|
||||
for (var e = elmt; e; e = e.offsetParent) {
|
||||
//把 offsetTop 值加總
|
||||
y += e.offsetTop;
|
||||
}
|
||||
//繞行至 document.body
|
||||
for (e = elmt.parentNode; e && e != document.body; e = e.parentNode) {
|
||||
//減去捲軸值
|
||||
if (e.scrollTop) y -= e.scrollTop;
|
||||
}
|
||||
return y;
|
||||
}
|
||||
127
web/App_Script/js/admin_org.js
Normal file
127
web/App_Script/js/admin_org.js
Normal file
@@ -0,0 +1,127 @@
|
||||
|
||||
//後台頁面用==================================
|
||||
function mouseover(obj, color_word) {
|
||||
obj.style.backgroundColor = color_word; //背景顏色
|
||||
}
|
||||
|
||||
function mouseout(obj, color_word) {
|
||||
obj.style.backgroundColor = color_word; //背景顏色
|
||||
}
|
||||
|
||||
function MM_preloadImages() { //圖片切換
|
||||
var d = document; if (d.images) {
|
||||
if (!d.MM_p) d.MM_p = new Array();
|
||||
var i, j = d.MM_p.length, a = MM_preloadImages.arguments; for (i = 0; i < a.length; i++)
|
||||
if (a[i].indexOf("#") != 0) { d.MM_p[j] = new Image; d.MM_p[j++].src = a[i]; }
|
||||
}
|
||||
}
|
||||
|
||||
function MM_swapImgRestore() { //圖片切換
|
||||
var i, x, a = document.MM_sr; for (i = 0; a && i < a.length && (x = a[i]) && x.oSrc; i++) x.src = x.oSrc;
|
||||
}
|
||||
|
||||
function MM_findObj(n, d) { //圖片切換
|
||||
var p, i, x; if (!d) d = document; if ((p = n.indexOf("?")) > 0 && parent.frames.length) {
|
||||
d = parent.frames[n.substring(p + 1)].document; n = n.substring(0, p);
|
||||
}
|
||||
if (!(x = d[n]) && d.all) x = d.all[n]; for (i = 0; !x && i < d.forms.length; i++) x = d.forms[i][n];
|
||||
for (i = 0; !x && d.layers && i < d.layers.length; i++) x = MM_findObj(n, d.layers[i].document);
|
||||
if (!x && d.getElementById) x = d.getElementById(n); return x;
|
||||
}
|
||||
|
||||
function MM_swapImage() { //圖片切換
|
||||
var i, j = 0, x, a = MM_swapImage.arguments; document.MM_sr = new Array; for (i = 0; i < (a.length - 2); i += 3)
|
||||
if ((x = MM_findObj(a[i])) != null) { document.MM_sr[j++] = x; if (!x.oSrc) x.oSrc = x.src; x.src = a[i + 2]; }
|
||||
}
|
||||
|
||||
function loadingShow(obj) { //ajax loading
|
||||
var position = $(obj).position();
|
||||
var ww = $(obj).outerWidth() / 2;
|
||||
var hh = $(obj).outerHeight() / 2;
|
||||
var w = $('#DivLoading').outerWidth() / 2;
|
||||
var h = $('#DivLoading').outerHeight() / 2;
|
||||
$('#DivLoading').css('left', (position.left + ww - w) + 'px');
|
||||
$('#DivLoading').css('top', (position.top - hh - h) + 'px');
|
||||
}
|
||||
|
||||
|
||||
|
||||
function showPicBox(obj,div,n,path,w,h) { //圖片預覽顯示
|
||||
|
||||
if ($('#showPicBox' + n).length) {
|
||||
//do something
|
||||
}else {
|
||||
$('#' + div).append('<div id="showPicBox' + n + '" class="showPicBox" style="width:' + w + 'px; height:' + h + 'px"><img src="../../App_Script/DisplayCut.ashx?file=' + path + '&w=' + w + '&h=' + h + '" /></div>');
|
||||
}
|
||||
|
||||
var position = $(obj).position();
|
||||
$('#showPicBox' + n).css('left', (position.left + obj.width) + 'px');
|
||||
$('#showPicBox' + n).css('top', (position.top + obj.height - h) + 'px');
|
||||
$('#showPicBox' + n).show();
|
||||
|
||||
}
|
||||
|
||||
function closePicBox(n) { //圖片預覽關閉
|
||||
if ($('#showPicBox' + n).length) {
|
||||
$('#showPicBox' + n).hide();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function PrintTagData(id) {
|
||||
|
||||
if (isFirefox = navigator.userAgent.indexOf("Firefox") > 0) {
|
||||
window.print();
|
||||
} else {
|
||||
|
||||
var Item = document.getElementById(id);
|
||||
var printdetail = window.open("", "TextareaDetail");
|
||||
printdetail.document.open();
|
||||
printdetail.document.write("<HTML><head><link href=\"../../App_Script/css/admin.css\" rel=\"stylesheet\" type=\"text/css\">");
|
||||
printdetail.document.write("<script type =\"text/javascript\">");
|
||||
printdetail.document.write("function mouseover(obj,color_word){obj.style.backgroundColor = color_word;}");
|
||||
printdetail.document.write("function mouseout(obj,color_word){obj.style.backgroundColor = color_word;}");
|
||||
printdetail.document.write("<\/script>");
|
||||
printdetail.document.write("</head>");
|
||||
printdetail.document.write("<BODY onload=\"window.print();\">");
|
||||
printdetail.document.write(Item.outerHTML);
|
||||
printdetail.document.write("</BODY></HTML>");
|
||||
printdetail.document.close();
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
//---------------------------------checkbox全選用---------------------------------------------------
|
||||
function Check(parentChk, ChildId) {
|
||||
var oElements = document.getElementsByTagName("INPUT");
|
||||
var bIsChecked = parentChk.checked;
|
||||
|
||||
for (i = 0; i < oElements.length; i++) {
|
||||
if (IsCheckBox(oElements[i]) &&
|
||||
IsMatch(oElements[i].id, ChildId)) {
|
||||
oElements[i].checked = bIsChecked;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function IsMatch(id, ChildId) {
|
||||
|
||||
if (id.indexOf(ChildId) > -1) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
function IsCheckBox(chk) {
|
||||
if (chk.type == 'checkbox') return true;
|
||||
else return false;
|
||||
}
|
||||
|
||||
|
||||
9789
web/App_Script/js/jquery-1.10.2.js
vendored
Normal file
9789
web/App_Script/js/jquery-1.10.2.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
9404
web/App_Script/js/jquery-1.7.2.js
vendored
Normal file
9404
web/App_Script/js/jquery-1.7.2.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
2
web/App_Script/js/jquery-3.5.1.min.js
vendored
Normal file
2
web/App_Script/js/jquery-3.5.1.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
7
web/App_Script/js/jquery.msgbox.min.js
vendored
Normal file
7
web/App_Script/js/jquery.msgbox.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
42
web/App_Script/js/req.js
Normal file
42
web/App_Script/js/req.js
Normal file
@@ -0,0 +1,42 @@
|
||||
//驗證必填、MAIL、數字
|
||||
|
||||
function verification(){
|
||||
|
||||
var obj = $('.req');
|
||||
for (i=0;i<obj.length;i++){
|
||||
if ($.trim($(obj[i]).val())==""){
|
||||
alert('請輸入'+$(obj[i]).attr('title'));
|
||||
$(obj[i]).focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
obj = $('.email');
|
||||
for (i=0;i<obj.length;i++){
|
||||
if (!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test($(obj[i]).val()))) {
|
||||
alert($(obj[i]).attr('title')+'格式錯誤');
|
||||
$(obj[i]).focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
obj = $('.number');
|
||||
for (i=0;i<obj.length;i++){
|
||||
if (isNaN($(obj[i]).val())) {
|
||||
alert($(obj[i]).attr('title')+'請輸入數字');
|
||||
$(obj[i]).focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
obj = $('.enum');
|
||||
for (i=0;i<obj.length;i++){
|
||||
if (/\W/.test($(obj[i]).val())) {
|
||||
alert($(obj[i]).attr('title')+'請輸入英文或數字');
|
||||
$(obj[i]).focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
Reference in New Issue
Block a user