migrate to new git
This commit is contained in:
1 parent
946eb9961e
commit
af2c152ef6
8623 files changed
+1000453
-1
No files matched your search
@@ -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;
|
||||
}
|
||||
|
||||
//-----------------------------------------¦Û©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();
|
||||
}
|
||||
@@ -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);
|
||||
|
||||
*/
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Vendored
+9789
File diff suppressed because it is too large.
Load diff
Vendored
+9404
File diff suppressed because it is too large.
Load diff
+2
@@ -0,0 +1,2 @@
|
||||
/*! jQuery v3.5.1 | (c) JS Foundation and other contributors | jquery.org/license */
|
||||
!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.5.1",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}S.fn=S.prototype={jquery:f,constructor:S,length:0,toArray:function(){return s.call(this)},get:function(e){return null==e?s.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=S.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return S.each(this,e)},map:function(n){return this.pushStack(S.map(this,function(e,t){return n.call(e,t,e)}))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(S.grep(this,function(e,t){return(t+1)%2}))},odd:function(){return this.pushStack(S.grep(this,function(e,t){return t%2}))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:u,sort:t.sort,splice:t.splice},S.extend=S.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||m(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)r=e[t],"__proto__"!==t&&a!==r&&(l&&r&&(S.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[t],o=i&&!Array.isArray(n)?[]:i||S.isPlainObject(n)?n:{},i=!1,a[t]=S.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},S.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==o.call(e))&&(!(t=r(e))||"function"==typeof(n=v.call(t,"constructor")&&t.constructor)&&a.call(n)===l)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){b(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,r=0;if(p(e)){for(n=e.length;r<n;r++)if(!1===t.call(e[r],r,e[r]))break}else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},makeArray:function(e,t){var n=t||[];return null!=e&&(p(Object(e))?S.merge(n,"string"==typeof e?[e]:e):u.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:i.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(p(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return g(a)},guid:1,support:y}),"function"==typeof Symbol&&(S.fn[Symbol.iterator]=t[Symbol.iterator]),S.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){n["[object "+t+"]"]=t.toLowerCase()});var d=function(n){var e,d,b,o,i,h,f,g,w,u,l,T,C,a,E,v,s,c,y,S="sizzle"+1*new Date,p=n.document,k=0,r=0,m=ue(),x=ue(),A=ue(),N=ue(),D=function(e,t){return e===t&&(l=!0),0},j={}.hasOwnProperty,t=[],q=t.pop,L=t.push,H=t.push,O=t.slice,P=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},R="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",I="(?:\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",W="\\["+M+"*("+I+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+I+"))|)"+M+"*\\]",F=":("+I+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+W+")*)|.*)\\)|)",B=new RegExp(M+"+","g"),$=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),_=new RegExp("^"+M+"*,"+M+"*"),z=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-lLine truncated
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
/**************************************************************************************
|
||||
* jQuery MsgBox 0.8.1
|
||||
* by composite (ukjinplant@msn.com)
|
||||
* http://blog.hazard.kr
|
||||
* This project licensed under a MIT License.
|
||||
**************************************************************************************/;
|
||||
!function (a) { window.console || (window.console = {}, window.console.log = a.noop); var b = "fixed", c = "div", d = "keypress", e = "resize", f = "msgbox-", g = "." + f, h = f + "-style", i = "button", j = "click", k = !1, m = function (b) { return a(document.createElement(b)) }, n = function (a, b) { if (!n.once || b) { a = a || {}; var c = n.style ? n.style : n.style = m("style").addClass(h).attr("type", "text/css"), d = []; for (var e in a) if (a[e]) { var f = a[e]; d.push(g + e), d.push("{"); for (var i in f) if (k) switch (i) { case "opacity": d.push("filter:alpha(opacity=" + (100 * +("." == f[i].substring(0, 1) ? "0" + f[i] : f[i]) || 100) + ");"); break; default: d.push(i + ":" + f[i] + ";") } else d.push(i + ":" + f[i] + ";"); d.push("}") } c.each(function () { var a = d.join(""); k ? this.styleSheet.cssText = a : this.innerHTML = a }).appendTo("head"), n.once = !0 } }; a.msgbox = function (b, l) { l = a.extend({}, a.msgbox.options, l), a(h).length || n(a.msgbox.css); var o = {}, p = f + "ok", q = f + "no", r = "password", t = (l.css || {}, !0), u = !1, v = l.input !== !1 && void 0 != l.input && null != l.input, w = !!l.confirm, x = function () { setTimeout(function () { var b = a(document.activeElement), c = [g + "input", g + i]; b.length && (b.is(c[0]) || b.is(c[1])) || z.find(c + "").eq(0).focus() }, 0) }, y = a(window), z = m(c).addClass(f + "container").append(m(c).addClass(f + "ui").addClass(f + (v ? "prompt" : w ? "confirm" : "alert"))).children(), A = m(c).addClass(f + "modal"), B = m(c).addClass(f + "msg").html(b).appendTo(z), C = v ? a("<div><input type='" + (l[r] ? r : "text") + "'/></div>").addClass(f + "inbox").children().addClass(f + "input").bind("keydown", function (a) { var b = a.which; if (9 == b && a.shiftKey) a.preventDefault(), z.find(g + i).filter(":last").focus(); else switch (b) { case 13: return a.preventDefault(), z.find(i + "." + p).trigger(j), !1; case 27: a.preventDefault(), z.find(i + "." + (v || w ? q : p)).trigger(j) } }).bind("blur", x).end().appendTo(z) : null, D = m(c).addClass(f + "buttons").appendTo(z), E = m(i).addClass(f + i).bind("keydown", function (b) { if (this == document.activeElement) { b.stopPropagation(); var e, c = b.which, d = a(this), f = b.shiftKey; switch (c) { case 9: case 39: b.preventDefault(), e = d[9 == c && f ? "prev" : "next"](i), e.length ? e.focus() : 9 == c && (e = z.find(g + "input"), e.length ? e.select() : (e = d[f ? "next" : "prev"](i), e.length && e.focus())); break; case 37: b.preventDefault(), e = d.prev(i), e.length && e.focus(); break; case 27: b.preventDefault(), z.find(i + "." + (v || w ? q : p)).trigger(j) } } }).bind("blur", x);[E.clone(t).addClass(p).text(w ? l.yes : l.ok).appendTo(D), v || w ? E.clone(t).addClass(q).text(l.no).appendTo(D) : null], z.add(A).bind("keydown", function () { }), a.extend(z[0], { container: z.parent()[0], modal: A[0], msg: B[0], inbox: C ? C[0] : null, buttons: D[0] }), v && (l.confirm = t, l.input !== !0 && C.children().val(l.input)), y.bind(e, o[e] = function () { o.firstWidth || (o.firstUnder = !0, o.firstWidth = z.outerWidth()), y.width() - 20 <= o.firstWidth, a.isFunction(l.onresize) ? l.onresize.call(z[0], o) : a.isFunction(a.msgbox.onresize) && a.msgbox.onresize.call(z[0], o) }), o.before = function (a) { a.stopPropagation(); var b = window.event ? window.event.keyCode : a.which; if ("text" == a.target.type && !b) return z.find(i + "." + (v || w ? q : p)).trigger(j), u; switch (b) { case 13: return z.find(i + ":focus").trigger("click"), u; case 27: return z.find(i + "." + (v || w ? q : p)).trigger(j), u } }; var H = a(document.documentElement || document.body).append(A).append(z.parent()).bind(d, o.before); o.after = function (b, c) { var f = a(b).hasClass(p); switch (t) { case v: l.submit.call(z[0], f ? c : null); break; case w: l.submit.call(z[0], f); break; default: l.submit.call(z[0]) } H.unbind(d, o.before), y.unbind(e, o[e]) }, z.delegate(i, j, function () { var c = function () { z.parent().add(A).remove() }, d = l.onclose || a.msgbox.onclose; o.after(this, v ? C.children().val() : null), a.isFunction(d) ? a.when(d.call(z[0], v ? I.children().val() : a(this).hasClass(p))).always(c) : c() }); var J = function () { y.trigger(e), v ? z.find("input:text").select() : z.find(i + ":eq(0)").focus(); var b = l.onopen || a.msgbox.onopen; a.isFunction(b) && b.call(z[0], l) }; return k ? setTimeout(J, 0) : J(), z }, a.extend(a.msgbox, { strings: { ok: "OK", yes: "OK", no: "Cancel" }, css: { container: { position: b, left: "50%", top: "32%", "z-index": "9001" }, ui: { border: "1px solid black", font: "9pt verdana,gulim,sans-serif", "background-color": "white", position: "relative", left: "-50%", top: "32%", overflow: "hidden", "float": "right" }, modal: { position: b, left: "0", top: "0", right: "0", bottom: "0", "background-color": "black", opacity: ".4", "z-index": "9000" }, msg: { padding: "2em 4em", overflow: "hidden", "font-family": "verdana,gulim,sans-serif", "white-space": "pre-wrap", "Line truncated
|
||||
@@ -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