| @ -0,0 +1,70 @@ | |||
| <!DOCTYPE html> | |||
| <html> | |||
|     <head> | |||
|         <meta charset="utf-8"/> | |||
|         <link rel="shortcut icon" href="./favicon.svg" type="image/svg+xml"/> | |||
|         <link rel="stylesheet" href="./vender/jquery/zTreeStyle/zTreeStyle.css" type="text/css"> | |||
|         <script src = "./vender/jquery/jquery.js"></script> | |||
|         <script src = "./vender/jquery/jquery.ztree.core.min.js"></script>  | |||
|         <script src = "./vender/jquery/jquery.ztree.exedit.min.js"></script> | |||
|         <script src = "./vender/jquery/jquery.ztree.exhide.min.js"></script> | |||
|         <script src = "./vender/codemirror.js"></script> | |||
|         <script src = "./vender/fabric.js"></script> | |||
|         <!-- 局域网环境, 请去 https://www.x-emr.cn/download.html 下载 editor.js替换以下路径 --> | |||
|         <script src="./js/editor.js"></script> | |||
|         <script> | |||
|           $(function() { | |||
|             //配置项可以不设置,会使用默认设置 | |||
|             let option = { | |||
|                 license:'WQ7peJQ3Kov4+1UWJXy8anvGMs9q9Krx1RVy/0b1Cu2NsyX+AAHehvZTkM9MfZ4U05PB87yFuHfWTM7F7EL4FQplorJA7Qm6naoINcGznSdFEEdN+EiwMNdPCFulVg3mu65at1ldCyqYtg3rmPhtUOwAc5oIYmi05xlXlRJnzvw=', | |||
|                 mode:'form',  //默认模式 form:表单模式,design:设计模式 | |||
|                 pdfUrl:'https://www.x-emr.cn/pdf/post',  //pdf生成服务 | |||
|                 dictionary: [  //知识库 | |||
|                     {type:'symptoms', title: '体征', isParent:true, treeUrl:'https://www.x-emr.cn/dict', itemUrl:'https://www.x-emr.cn/dictitem'}, | |||
|                     {type:'signs', title: '症状', isParent:true, treeUrl:'https://www.x-emr.cn/dict', itemUrl:'https://www.x-emr.cn/dictitem'}, | |||
|                     {type:'meta', title: '卫生信息数据元', isParent:true, treeUrl:'https://www.x-emr.cn/dict', itemUrl:'https://www.x-emr.cn/dictitem'}, | |||
|                     {type:'stand', title: '电子病历数据集', isParent:true, treeUrl:'https://www.x-emr.cn/dict', itemUrl:'https://www.x-emr.cn/dictitem'}, | |||
|                     {type:'insutance', title: '国家医保标准', isParent:true, treeUrl:'https://www.x-emr.cn/insutance', itemUrl:'https://www.x-emr.cn/institem'}, | |||
|                     {type:'province', title: 'A省数据平台标准', isParent:true, treeUrl:'https://www.x-emr.cn/province', itemUrl:'https://www.x-emr.cn/provitem'}, | |||
|                 ] | |||
|             } | |||
| 
 | |||
|             //用于父页面调用 | |||
|             if(window.frameElement){ | |||
|                 //1.初始化前 | |||
|                 let e1 = new Event('before-init') | |||
|                 e1.editor = editor | |||
|                 e1.option = option | |||
|                 window.frameElement.dispatchEvent(e1) | |||
| 
 | |||
|                 if(window.frameElement.getAttribute('mode')) { | |||
|                     option.mode = window.frameElement.getAttribute('mode') | |||
|                 } | |||
|                 //2.编辑器初始化 | |||
|                 editor.init(option) | |||
| 
 | |||
|                 //如果有组件有doc属性 | |||
|                 if(window.frameElement.getAttribute('doc')) { | |||
|                     editor.loadUrl(window.frameElement.getAttribute('doc'), '1').then(function(){ | |||
|                         let e3 = new Event('doc-loaded') | |||
|                         e3.editor = editor | |||
|                         window.frameElement.dispatchEvent(e3) | |||
|                     }) | |||
|                 } | |||
|                  | |||
|                 //3.初始化后 | |||
|                 let e2 = new Event('after-init') | |||
|                 e2.editor = editor | |||
|                 window.frameElement.dispatchEvent(e2) | |||
|             }else{ | |||
|                 editor.init(option) | |||
|                 editor.loadUrl('https://www.x-emr.cn/doc/999.html') | |||
|             } | |||
|           }) | |||
|       </script> | |||
|     </head> | |||
|     <body> | |||
|         <!-- 默认id 为editor --> | |||
|         <div id="editor" style="width:100%; height:100%;"></div> | |||
|     </body> | |||
| </html> | |||
| @ -0,0 +1,66 @@ | |||
| <html> | |||
| <head> | |||
| <meta http-equiv="content-type" content="text/xml; charset=gb2312" /> | |||
| <title>My97DatePicker</title> | |||
| <script type="text/javascript" src="config.js" charset=gb2312></script> | |||
| <script> | |||
| //var l = location; | |||
| if(parent==window) | |||
| 	location.href = 'http://www.my97.net'; | |||
| /* | |||
| else{	 | |||
| 	var start=l.href.indexOf('#')+1; | |||
| 	if(start>0){	 | |||
| 		document.domain = l.href.substr(start); | |||
| 	}	 | |||
| } | |||
| */ | |||
| var $d, $dp, $pdp = parent.$dp, $dt, $tdt, $sdt, $lastInput, $IE=$pdp.ie, $FF = $pdp.ff,$OPERA=$pdp.opera, $ny, $cMark = false; | |||
| 
 | |||
| //说明是flat此时,拷贝一份$dp | |||
| if ($pdp.eCont) { | |||
| 	$dp = {}; | |||
| 	for (var p in $pdp) { | |||
| 		$dp[p] = $pdp[p]; | |||
| 	} | |||
| } | |||
| else{ | |||
| 	$dp = $pdp; | |||
| } | |||
| 
 | |||
| $dp.getLangIndex = function(name){ | |||
| 	var arr = langList; | |||
| 	for (var i = 0; i < arr.length; i++) { | |||
| 		if (arr[i].name == name) { | |||
| 			return i; | |||
| 		} | |||
| 	} | |||
| 	return -1; | |||
| } | |||
| 
 | |||
| $dp.getLang = function(name){ | |||
| 	var index = $dp.getLangIndex(name); | |||
| 	if (index == -1) { | |||
| 		index = 0; | |||
| 	} | |||
| 	return langList[index]; | |||
| } | |||
| 
 | |||
| //根据语言设置选择语言     | |||
| $dp.realLang = $dp.getLang($dp.lang); | |||
| document.write("<script src='lang/" + $dp.realLang.name + ".js' charset='" + $dp.realLang.charset + "'><\/script>"); | |||
| 
 | |||
| //导入皮肤列表文件 | |||
| for (var i = 0; i < skinList.length; i++) { | |||
|     document.write('<link rel="stylesheet" type="text/css" href="skin/' + skinList[i].name + '/datepicker.css" title="' + skinList[i].name + '" charset="' + skinList[i].charset + '" disabled="true"/>'); | |||
| } | |||
| 
 | |||
| </script> | |||
| <script type="text/javascript" src="calendar.js" charset="gb2312"></script> | |||
| </head> | |||
| <body leftmargin="0" topmargin="0" onLoad="$c.autoSize()" tabindex=0> | |||
| </body> | |||
| </html> | |||
| <script> | |||
| new My97DP(); | |||
| </script> | |||
| @ -0,0 +1,678 @@ | |||
| /* | |||
|  * My97 DatePicker 4.8.5 | |||
|  * License: http://www.my97.net/license.asp
 | |||
|  */ | |||
| var $dp, WdatePicker; | |||
| (function () { | |||
| 	var Config = { | |||
| 		$langList: [{ | |||
| 				name: 'en', | |||
| 				charset: 'UTF-8' | |||
| 			}, | |||
| 			{ | |||
| 				name: 'zh-cn', | |||
| 				charset: 'gb2312' | |||
| 			}, | |||
| 			{ | |||
| 				name: 'zh-tw', | |||
| 				charset: 'GBK' | |||
| 			} | |||
| 		], | |||
| 		$skinList: [{ | |||
| 				name: 'default', | |||
| 				charset: 'gb2312' | |||
| 			}, | |||
| 			{ | |||
| 				name: 'whyGreen', | |||
| 				charset: 'gb2312' | |||
| 			}, | |||
| 			{ | |||
| 				name: 'blue', | |||
| 				charset: 'gb2312' | |||
| 			}, | |||
| 			{ | |||
| 				name: 'green', | |||
| 				charset: 'gb2312' | |||
| 			}, | |||
| 			{ | |||
| 				name: 'simple', | |||
| 				charset: 'gb2312' | |||
| 			}, | |||
| 			{ | |||
| 				name: 'ext', | |||
| 				charset: 'gb2312' | |||
| 			}, | |||
| 			{ | |||
| 				name: 'blueFresh', | |||
| 				charset: 'gb2312' | |||
| 			}, | |||
| 			{ | |||
| 				name: 'twoer', | |||
| 				charset: 'gb2312' | |||
| 			}, | |||
| 			{ | |||
| 				name: 'YcloudRed', | |||
| 				charset: 'gb2312' | |||
| 			}, | |||
| 			{ | |||
| 				name: 'thinkpap', | |||
| 				charset: 'gb2312' | |||
| 			} | |||
| 		], | |||
| 		$wdate: false, | |||
| 		$crossFrame: false, | |||
| 		$preLoad: false, | |||
| 		$dpPath: '', | |||
| 		doubleCalendar: false, | |||
| 		enableKeyboard: true, | |||
| 		enableInputMask: true, | |||
| 		autoUpdateOnChanged: null, | |||
| 		weekMethod: 'MSExcel', | |||
| 		position: {}, | |||
| 		lang: 'auto', | |||
| 		skin: 'default', | |||
| 		dateFmt: 'yyyy年MM月dd日 HH时mm分', | |||
| 		realDateFmt: 'yyyy-MM-dd', | |||
| 		realTimeFmt: 'HH:mm:ss', | |||
| 		realFullFmt: '%Date %Time', | |||
| 		minDate: '0001-01-01 00:00:00', | |||
| 		maxDate: '9999-12-31 23:59:59', | |||
| 		minTime: '00:00:00', | |||
| 		maxTime: '23:59:59', | |||
| 		startDate: '', | |||
| 		alwaysUseStartDate: false, | |||
| 		yearOffset: 1911, | |||
| 		firstDayOfWeek: 0, | |||
| 		isShowWeek: false, | |||
| 		highLineWeekDay: true, | |||
| 		isShowClear: true, | |||
| 		isShowToday: true, | |||
| 		isShowOK: true, | |||
| 		isShowOthers: true, | |||
| 		readOnly: false, | |||
| 		errDealMode: 0, | |||
| 		autoPickDate: null, | |||
| 		qsEnabled: true, | |||
| 		autoShowQS: false, | |||
| 		hmsMenuCfg: { | |||
| 			H: [1, 6], | |||
| 			m: [5, 6], | |||
| 			s: [15, 4] | |||
| 		}, | |||
| 
 | |||
| 		opposite: false, | |||
| 		specialDates: null, | |||
| 		specialDays: null, | |||
| 		disabledDates: null, | |||
| 		disabledDays: null, | |||
| 		onpicking: null, | |||
| 		onpicked: null, | |||
| 		onclearing: null, | |||
| 		oncleared: null, | |||
| 		ychanging: null, | |||
| 		ychanged: null, | |||
| 		Mchanging: null, | |||
| 		Mchanged: null, | |||
| 		dchanging: null, | |||
| 		dchanged: null, | |||
| 		Hchanging: null, | |||
| 		Hchanged: null, | |||
| 		mchanging: null, | |||
| 		mchanged: null, | |||
| 		schanging: null, | |||
| 		schanged: null, | |||
| 		eCont: null, | |||
| 		vel: null, | |||
| 		elProp: '', | |||
| 		errMsg: '', | |||
| 		quickSel: [], | |||
| 		has: {}, | |||
| 		getRealLang: function () { | |||
| 			var arr = Config.$langList; | |||
| 			for (var i = 0; i < arr.length; i++) { | |||
| 				if (arr[i].name == this.lang) { | |||
| 					return arr[i] | |||
| 				} | |||
| 			} | |||
| 			return arr[0] | |||
| 		} | |||
| 	}; | |||
| 	WdatePicker = main; | |||
| 	var w = window, | |||
| 		emptyEl = { | |||
| 			innerHTML: '' | |||
| 		}, | |||
| 		d = 'document', | |||
| 		de = 'documentElement', | |||
| 		tag = 'getElementsByTagName', | |||
| 		dptop, jsPath, $IE, $FF, $OPERA; | |||
| 	var ua = navigator.userAgent, | |||
| 		isTablet = /(?:iPad|PlayBook)/.test(ua) || (/(?:Android)/.test(ua) && !/(?:Mobile)/.test(ua)), | |||
| 		isPhone = /(?:iPhone)/.test(ua) || /(?:Android)/.test(ua) && /(?:Mobile)/.test(ua); | |||
| 	var appName = navigator.appName; | |||
| 	if (appName == 'Microsoft Internet Explorer') $IE = true; | |||
| 	else if (appName == 'Opera') $OPERA = true; | |||
| 	else $FF = true; | |||
| 	jsPath = Config.$dpPath || getJsPath(); | |||
| 	if (Config.$wdate) { | |||
| 		loadCSS(jsPath + 'skin/WdatePicker.css') | |||
| 	} | |||
| 	dptop = w; | |||
| 	if (Config.$crossFrame) { | |||
| 		try { | |||
| 			while (dptop.parent != dptop && dptop.parent[d][tag]('frameset').length == 0) { | |||
| 				dptop = dptop.parent | |||
| 			} | |||
| 		} catch (e) {} | |||
| 	} | |||
| 	if (!dptop.$dp) { | |||
| 		dptop.$dp = { | |||
| 			ff: $FF, | |||
| 			ie: $IE, | |||
| 			opera: $OPERA, | |||
| 			status: 0, | |||
| 			defMinDate: Config.minDate, | |||
| 			defMaxDate: Config.maxDate, | |||
| 			isTablet: isTablet, | |||
| 			isPhone: isPhone, | |||
| 			isTouch: isTablet || isPhone | |||
| 		} | |||
| 	} | |||
| 	initTopDP(); | |||
| 	if (Config.$preLoad && $dp.status == 0) { | |||
| 		dpAttachEvent(w, 'onload', function () { | |||
| 			main(null, true) | |||
| 		}) | |||
| 	} | |||
| 	var docEventName = $dp.isTouch ? 'ontouchstart' : 'onmousedown'; | |||
| 	if (!w[d].docMD) { | |||
| 		dpAttachEvent(w[d], docEventName, disposeDP, true); | |||
| 		w[d].docMD = true | |||
| 	} | |||
| 	if (!dptop[d].docMD) { | |||
| 		dpAttachEvent(dptop[d], docEventName, disposeDP, true); | |||
| 		dptop[d].docMD = true | |||
| 	} | |||
| 	dpAttachEvent(w, 'onunload', function () { | |||
| 		if ($dp.dd) { | |||
| 			display($dp.dd, "none") | |||
| 		} | |||
| 	}); | |||
| 
 | |||
| 	function initTopDP() { | |||
| 		try { | |||
| 			dptop[d], dptop.$dp = dptop.$dp || {} | |||
| 		} catch (e) { | |||
| 			dptop = w; | |||
| 			$dp = $dp || {} | |||
| 		} | |||
| 		var obj = { | |||
| 			win: w, | |||
| 			$: function (el) { | |||
| 				return (typeof el == 'string') ? w[d].getElementById(el) : el | |||
| 			}, | |||
| 			$D: function (id, arg) { | |||
| 				return this.$DV(this.$(id).value, arg) | |||
| 			}, | |||
| 			$DV: function (v, arg) { | |||
| 				if (v != '') { | |||
| 					this.dt = $dp.cal.splitDate(v, $dp.cal.dateFmt); | |||
| 					if (arg) { | |||
| 						for (var p in arg) { | |||
| 							if (this.dt[p] === undefined) { | |||
| 								this.errMsg = 'invalid property:' + p | |||
| 							} else { | |||
| 								this.dt[p] += arg[p]; | |||
| 								if (p == 'M') { | |||
| 									var offset = arg['M'] > 0 ? 1 : 0; | |||
| 									var tmpday = new Date(this.dt['y'], this.dt['M'], 0).getDate(); | |||
| 									this.dt['d'] = Math.min(tmpday + offset, this.dt['d']) | |||
| 								} | |||
| 							} | |||
| 						} | |||
| 					} | |||
| 					if (this.dt.refresh()) { | |||
| 						return this.dt | |||
| 					} | |||
| 				} | |||
| 				return '' | |||
| 			}, | |||
| 			show: function () { | |||
| 				var divs = dptop[d].getElementsByTagName('div'), | |||
| 					maxZIndex = 1e5; | |||
| 				for (var i = 0; i < divs.length; i++) { | |||
| 					var curZ = parseInt(divs[i].style.zIndex); | |||
| 					if (curZ > maxZIndex) { | |||
| 						maxZIndex = curZ | |||
| 					} | |||
| 				} | |||
| 				this.dd.style.zIndex = maxZIndex + 2; | |||
| 				display(this.dd, "block"); | |||
| 				display(this.dd.firstChild, "") | |||
| 			}, | |||
| 			unbind: function (el) { | |||
| 				el = this.$(el); | |||
| 				if (el.initcfg) { | |||
| 					dpDetachEvent(el, 'onclick', function () { | |||
| 						main(el.initcfg) | |||
| 					}); | |||
| 					dpDetachEvent(el, 'onfocus', function () { | |||
| 						main(el.initcfg) | |||
| 					}) | |||
| 				} | |||
| 			}, | |||
| 			hide: function () { | |||
| 				display(this.dd, "none") | |||
| 			}, | |||
| 			attachEvent: dpAttachEvent | |||
| 		}; | |||
| 		for (var p in obj) { | |||
| 			dptop.$dp[p] = obj[p]; | |||
| 		} | |||
| 		$dp = dptop.$dp | |||
| 	} | |||
| 
 | |||
| 	function dpAttachEvent(o, sType, fHandler, useCapture) { | |||
| 		if (o.addEventListener) { | |||
| 			var shortTypeName = sType.replace(/on/, ""); | |||
| 			fHandler._ieEmuEventHandler = function (e) { | |||
| 				return fHandler(e) | |||
| 			}; | |||
| 			o.addEventListener(shortTypeName, fHandler._ieEmuEventHandler, useCapture) | |||
| 		} else { | |||
| 			o.attachEvent(sType, fHandler) | |||
| 		} | |||
| 	} | |||
| 
 | |||
| 	function dpDetachEvent(o, sType, fHandler) { | |||
| 		if (o.removeEventListener) { | |||
| 			var shortTypeName = sType.replace(/on/, ""); | |||
| 			fHandler._ieEmuEventHandler = function (e) { | |||
| 				return fHandler(e) | |||
| 			}; | |||
| 			o.removeEventListener(shortTypeName, fHandler._ieEmuEventHandler, false) | |||
| 		} else { | |||
| 			o.detachEvent(sType, fHandler) | |||
| 		} | |||
| 	} | |||
| 
 | |||
| 	function compareCfg(o1, o2, issub) { | |||
| 		if (typeof o1 != typeof o2) return false; | |||
| 		if (typeof o1 == 'object') { | |||
| 			if (!issub) { | |||
| 				for (var o in o1) { | |||
| 					if (typeof o2[o] == 'undefined') return false; | |||
| 					if (!compareCfg(o1[o], o2[o], true)) return false | |||
| 				} | |||
| 			} | |||
| 			return true | |||
| 		} else if (typeof o1 == 'function' && typeof o2 == 'function') { | |||
| 			return o1.toString() == o2.toString() | |||
| 		} else { | |||
| 			return o1 == o2 | |||
| 		} | |||
| 	} | |||
| 
 | |||
| 	function getJsPath() { | |||
| 		var path, tmp, scripts = w[d][tag]("script"); | |||
| 		for (var i = 0; i < scripts.length; i++) { | |||
| 			path = scripts[i].getAttribute('src') || ''; | |||
| 			path = path.substr(0, path.toLowerCase().indexOf('wdatepicker.js')); | |||
| 			var tmp = path.lastIndexOf("/"); | |||
| 			if (tmp > 0) path = path.substring(0, tmp + 1); | |||
| 			if (path) break | |||
| 		} | |||
| 		return path | |||
| 	} | |||
| 
 | |||
| 	function loadCSS(path, title, charset) { | |||
| 		var head = w[d][tag]('HEAD').item(0), | |||
| 			style = w[d].createElement('link'); | |||
| 		if (head) { | |||
| 			style.href = path; | |||
| 			style.rel = 'stylesheet'; | |||
| 			style.type = 'text/css'; | |||
| 			if (title) style.title = title; | |||
| 			if (charset) style.charset = charset; | |||
| 			head.appendChild(style) | |||
| 		} | |||
| 	} | |||
| 
 | |||
| 	function getAbsM(w) { | |||
| 		w = w || dptop; | |||
| 		var lm = 0, | |||
| 			tm = 0; | |||
| 		while (w != dptop) { | |||
| 			var ifs = w.parent[d][tag]('iframe'); | |||
| 			for (var i = 0; i < ifs.length; i++) { | |||
| 				try { | |||
| 					if (ifs[i].contentWindow == w) { | |||
| 						var rc = getBound(ifs[i]); | |||
| 						lm += rc.left; | |||
| 						tm += rc.top; | |||
| 						break | |||
| 					} | |||
| 				} catch (e) {} | |||
| 			} | |||
| 			w = w.parent | |||
| 		} | |||
| 		return { | |||
| 			'leftM': lm, | |||
| 			'topM': tm | |||
| 		} | |||
| 	} | |||
| 
 | |||
| 	function getBound(o, ignoreScr) { | |||
| 		if (o.getBoundingClientRect) { | |||
| 			return o.getBoundingClientRect() | |||
| 		} else { | |||
| 			var patterns = { | |||
| 				ROOT_TAG: /^body|html$/i, | |||
| 				OP_SCROLL: /^(?:inline|table-row)$/i | |||
| 			}; | |||
| 			var hssFixed = false, | |||
| 				win = null, | |||
| 				t = o.offsetTop, | |||
| 				l = o.offsetLeft, | |||
| 				r = o.offsetWidth, | |||
| 				b = o.offsetHeight; | |||
| 			var parentNode = o.offsetParent; | |||
| 			if (parentNode != o) { | |||
| 				while (parentNode) { | |||
| 					l += parentNode.offsetLeft; | |||
| 					t += parentNode.offsetTop; | |||
| 					if (getStyle(parentNode, 'position').toLowerCase() == 'fixed') hssFixed = true; | |||
| 					else if (parentNode.tagName.toLowerCase() == "body") win = parentNode.ownerDocument.defaultView; | |||
| 					parentNode = parentNode.offsetParent | |||
| 				} | |||
| 			} | |||
| 			parentNode = o.parentNode; | |||
| 			while (parentNode.tagName && !patterns.ROOT_TAG.test(parentNode.tagName)) { | |||
| 				if (parentNode.scrollTop || parentNode.scrollLeft) { | |||
| 					if (!patterns.OP_SCROLL.test(display(parentNode))) { | |||
| 						if (!$OPERA || parentNode.style.overflow !== 'visible') { | |||
| 							l -= parentNode.scrollLeft; | |||
| 							t -= parentNode.scrollTop | |||
| 						} | |||
| 					} | |||
| 				} | |||
| 				parentNode = parentNode.parentNode | |||
| 			} | |||
| 			if (!hssFixed) { | |||
| 				var scr = getScroll(win); | |||
| 				l -= scr.left; | |||
| 				t -= scr.top | |||
| 			} | |||
| 			r += l; | |||
| 			b += t; | |||
| 			return { | |||
| 				'left': l, | |||
| 				'top': t, | |||
| 				'right': r, | |||
| 				'bottom': b | |||
| 			} | |||
| 		} | |||
| 	} | |||
| 
 | |||
| 	function getWH(w) { | |||
| 		w = w || dptop; | |||
| 		var doc = w[d], | |||
| 			width = (w.innerWidth) ? w.innerWidth : (doc[de] && doc[de].clientWidth) ? doc[de].clientWidth : doc.body.offsetWidth, | |||
| 			height = (w.innerHeight) ? w.innerHeight : (doc[de] && doc[de].clientHeight) ? doc[de].clientHeight : doc.body.offsetHeight; | |||
| 		return { | |||
| 			'width': width, | |||
| 			'height': height | |||
| 		} | |||
| 	} | |||
| 
 | |||
| 	function getScroll(w) { | |||
| 		w = w || dptop; | |||
| 		var doc = w[d], | |||
| 			doce = doc[de], | |||
| 			db = doc.body; | |||
| 		doc = (doce && doce.scrollTop != null && (doce.scrollTop > db.scrollTop || doce.scrollLeft > db.scrollLeft)) ? doce : db; | |||
| 		return { | |||
| 			'top': doc.scrollTop, | |||
| 			'left': doc.scrollLeft | |||
| 		} | |||
| 	} | |||
| 
 | |||
| 	function disposeDP(e) { | |||
| 		try { | |||
| 			var src = e ? (e.srcElement || e.target) : null; | |||
| 			if ($dp.cal && !$dp.eCont && $dp.dd && src != $dp.el && $dp.dd.style.display == 'block') { | |||
| 				$dp.cal.close() | |||
| 			} | |||
| 		} catch (e) {} | |||
| 	} | |||
| 
 | |||
| 	function dpLoaded() { | |||
| 		$dp.status = 2 | |||
| 	} | |||
| 	var isDptopReady, dptopInterval; | |||
| 
 | |||
| 	function main(initcfg, preLoad) { | |||
| 		if (!$dp) return; | |||
| 		initcfg.el = initcfg.el || w[d].activeElement; | |||
| 		if ($dp.isTouch) { | |||
| 			try { | |||
| 				initcfg.el.readOnly = true; | |||
| 				initcfg.el.blur() | |||
| 			} catch (e) {} | |||
| 		} | |||
| 		initTopDP(); | |||
| 		var cfg = {}; | |||
| 		for (var p in initcfg) { | |||
| 			cfg[p] = initcfg[p] | |||
| 		} | |||
| 		for (var p in Config) { | |||
| 			if (p.substring(0, 1) != '$' && cfg[p] === undefined) { | |||
| 				cfg[p] = Config[p] | |||
| 			} | |||
| 		} | |||
| 		if (preLoad) { | |||
| 			if (!dptopReady()) { | |||
| 				dptopInterval = dptopInterval || setInterval(function () { | |||
| 					if (dptop[d].readyState == 'complete') { | |||
| 						clearInterval(dptopInterval); | |||
| 					} | |||
| 					main(null, true) | |||
| 				}, 50); | |||
| 				return | |||
| 			} | |||
| 			if ($dp.status == 0) { | |||
| 				$dp.status = 1; | |||
| 				cfg.el = emptyEl; | |||
| 				showPicker(cfg, true) | |||
| 			} else { | |||
| 				return | |||
| 			} | |||
| 		} else if (cfg.eCont) { | |||
| 			cfg.eCont = $dp.$(cfg.eCont); | |||
| 			cfg.el = emptyEl; | |||
| 			cfg.autoPickDate = true; | |||
| 			cfg.qsEnabled = false; | |||
| 			showPicker(cfg) | |||
| 		} else { | |||
| 			if (Config.$preLoad && $dp.status != 2) return; | |||
| 			if (!cfg.el) { | |||
| 				var evt = SearchEvent(); | |||
| 				if (w.event === evt || evt) { | |||
| 					cfg.srcEl = evt.srcElement || evt.target; | |||
| 					evt.cancelBubble = true | |||
| 				} | |||
| 			} | |||
| 			cfg.el = cfg.el = $dp.$(cfg.el || cfg.srcEl); | |||
| 			if (cfg.el == null) { | |||
| 				alert('WdatePicker:el is null!\nexample:onclick="WdatePicker({el:this})"'); | |||
| 				return | |||
| 			} | |||
| 			try { | |||
| 				if (!cfg.el || cfg.el['My97Mark'] === true || cfg.el.disabled || ($dp.dd && display($dp.dd) != 'none' && $dp.dd.style.left != '-970px')) { | |||
| 					if (cfg.el['My97Mark']) cfg.el['My97Mark'] = false; | |||
| 					return | |||
| 				} | |||
| 			} catch (e) {} | |||
| 			if (evt && cfg.el.nodeType == 1 && !compareCfg(cfg.el.initcfg, initcfg)) { | |||
| 				$dp.unbind(cfg.el); | |||
| 				dpAttachEvent(cfg.el, evt.type == 'focus' ? 'onclick' : 'onfocus', function () { | |||
| 					main(initcfg) | |||
| 				}); | |||
| 				cfg.el.initcfg = initcfg; | |||
| 			} | |||
| 			showPicker(cfg) | |||
| 		} | |||
| 
 | |||
| 		function dptopReady() { | |||
| 			if ($IE && dptop != w && dptop[d].readyState != 'complete') return false; | |||
| 			return true | |||
| 		} | |||
| 
 | |||
| 		function SearchEvent() { | |||
| 			if ($FF) { | |||
| 				try { | |||
| 					var count = 0; | |||
| 					func = SearchEvent.caller; | |||
| 					while (func != null) { | |||
| 						var arg0 = func.arguments[0]; | |||
| 						if (arg0 && (arg0 + '').indexOf('Event') >= 0 || (count++) > 97) { | |||
| 							return arg0 | |||
| 						} | |||
| 						func = func.caller | |||
| 					} | |||
| 				} catch (e) {} | |||
| 				return null | |||
| 			} | |||
| 			return event | |||
| 		} | |||
| 	} | |||
| 
 | |||
| 	function getStyle(obj, attribute) { | |||
| 		return obj.currentStyle ? obj.currentStyle[attribute] : document.defaultView.getComputedStyle(obj, false)[attribute] | |||
| 	} | |||
| 
 | |||
| 	function display(obj, value) { | |||
| 		if (obj) { | |||
| 			if (value != null) obj.style.display = value; | |||
| 			else return getStyle(obj, 'display') | |||
| 		} | |||
| 	} | |||
| 
 | |||
| 	function showPicker(cfg, preLoad) { | |||
| 		var nodeName = cfg.el ? cfg.el.nodeName : 'INPUT'; | |||
| 		if (preLoad || cfg.eCont || new RegExp(/input|textarea|div|field|span|p|a/ig).test(nodeName)) { | |||
| 			cfg.elProp = cfg.elProp || nodeName == 'INPUT' ? 'value' : 'innerHTML' | |||
| 		} else { | |||
| 			return | |||
| 		} | |||
| 		if (cfg.lang == 'auto') { | |||
| 			cfg.lang = $IE ? navigator.browserLanguage.toLowerCase() : navigator.language.toLowerCase() | |||
| 		} | |||
| 		if (!cfg.eCont) { | |||
| 			for (var p in cfg) { | |||
| 				$dp[p] = cfg[p] | |||
| 			} | |||
| 		} | |||
| 		if (!$dp.dd || cfg.eCont || ($dp.dd && (cfg.getRealLang().name != $dp.dd.lang || cfg.skin != $dp.dd.skin))) { | |||
| 			if (cfg.eCont) { | |||
| 				ddInit(cfg.eCont, cfg) | |||
| 			} else { | |||
| 				$dp.dd = dptop[d].createElement("DIV"); | |||
| 				$dp.dd.style.cssText = 'position:absolute'; | |||
| 				dptop[d].body.appendChild($dp.dd); | |||
| 				ddInit($dp.dd, cfg); | |||
| 				if (preLoad) { | |||
| 					$dp.dd.style.left = $dp.dd.style.top = '-970px' | |||
| 				} else { | |||
| 					$dp.show(); | |||
| 					setPos($dp) | |||
| 				} | |||
| 			} | |||
| 		} else if ($dp.cal) { | |||
| 			$dp.show(); | |||
| 			$dp.cal.init(); | |||
| 			if (!$dp.eCont) setPos($dp) | |||
| 		} | |||
| 
 | |||
| 		function ddInit(cont, cfg) { | |||
| 			var dm = dptop[d].domain, | |||
| 				isCross = false, | |||
| 				defHtml = '<iframe hideFocus=true width=9 height=7 frameborder=0 border=0 scrolling=no src="about:blank"></iframe>'; | |||
| 			cont.innerHTML = defHtml; | |||
| 			var langList = Config.$langList, | |||
| 				skinList = Config.$skinList, | |||
| 				doc; | |||
| 			try { | |||
| 				doc = cont.lastChild.contentWindow[d] | |||
| 			} catch (e) { | |||
| 				isCross = true; | |||
| 				cont.removeChild(cont.lastChild); | |||
| 				var ifr = dptop[d].createElement("iframe"); | |||
| 				ifr.hideFocus = true; | |||
| 				ifr.frameBorder = 0; | |||
| 				ifr.scrolling = 'no'; | |||
| 				ifr.src = "javascript:(function(){var d=document;d.open();d.domain='" + dm + "';})()"; | |||
| 				cont.appendChild(ifr); | |||
| 				setTimeout(function () { | |||
| 					doc = cont.lastChild.contentWindow[d]; | |||
| 					ddWrite() | |||
| 				}, 97); | |||
| 				return | |||
| 			} | |||
| 			ddWrite(); | |||
| 
 | |||
| 			function ddWrite() { | |||
| 				var realLang = cfg.getRealLang(), | |||
| 					ver = '4.9.0b3'; | |||
| 				cont.lang = realLang.name; | |||
| 				cont.skin = cfg.skin; | |||
| 				var h = ['<head><script>', '', 'var doc=document, $d, $dp, $cfg=doc.cfg, $pdp = parent.$dp, $dt, $tdt, $sdt, $lastInput, $IE=$pdp.ie, $FF = $pdp.ff,$OPERA=$pdp.opera, $ny, $cMark = false;', 'if($cfg.eCont){$dp = {};for(var p in $pdp)$dp[p]=$pdp[p];}else{$dp=$pdp;};for(var p in $cfg){$dp[p]=$cfg[p];}', 'if(!$dp.isTouch)doc.oncontextmenu=function(){try{$c._fillQS(!$dp.has.d,1);showB($d.qsDivSel);}catch(e){};return false;};', '</script><script src=', jsPath, 'lang/', realLang.name, '.js?' + ver + ' charset=', realLang.charset, '></script>']; | |||
| 				if (isCross) h[1] = 'document.domain="' + dm + '";'; | |||
| 				for (var i = 0; i < skinList.length; i++) { | |||
| 					if (skinList[i].name == cfg.skin) { | |||
| 						h.push('<link rel="stylesheet" type="text/css" href="' + jsPath + 'skin/' + skinList[i].name + '/datepicker.css?'); | |||
| 						h.push(ver); | |||
| 						h.push('" charset="' + skinList[i].charset + '"/>') | |||
| 					} | |||
| 				} | |||
| 				h.push('<script src="' + jsPath + 'calendar.js?'); | |||
| 				h.push(ver); | |||
| 				h.push('"></script>'); | |||
| 				h.push('</head><body leftmargin="0" topmargin="0" tabindex=0></body></html>'); | |||
| 				h.push('<script>var t;t=t||setInterval(function(){if((typeof(doc.ready)=="boolean"&&doc.ready)||doc.readyState=="complete"){new My97DP();$cfg.onload();$c.autoSize();$cfg.setPos($dp);clearInterval(t);}},20);</script>'); | |||
| 				cfg.setPos = setPos; | |||
| 				cfg.onload = dpLoaded; | |||
| 				doc.write('<html>'); | |||
| 				doc.cfg = cfg; | |||
| 				doc.write(h.join('')); | |||
| 				doc.close() | |||
| 			} | |||
| 		} | |||
| 
 | |||
| 		function setPos(dp) { | |||
| 			var l = dp.position.left, | |||
| 				t = dp.position.top, | |||
| 				el = dp.el; | |||
| 			if (el == emptyEl) return; | |||
| 			if (el != dp.srcEl && (display(el) == 'none' || el.type == 'hidden')) el = dp.srcEl; | |||
| 			var objxy = getBound(el), | |||
| 				mm = getAbsM(w), | |||
| 				currWH = getWH(dptop), | |||
| 				scr = getScroll(dptop), | |||
| 				ddHeight = $dp.dd.offsetHeight, | |||
| 				ddWidth = $dp.dd.offsetWidth; | |||
| 			if (isNaN(t)) t = 0; | |||
| 			if ((mm.topM + objxy.bottom + ddHeight > currWH.height) && (mm.topM + objxy.top - ddHeight > 0)) { | |||
| 				t += scr.top + mm.topM + objxy.top - ddHeight - 2 | |||
| 			} else { | |||
| 				t += scr.top + mm.topM + objxy.bottom; | |||
| 				var offsetT = t - scr.top + ddHeight - currWH.height; | |||
| 				if (offsetT > 0) t -= offsetT | |||
| 			} | |||
| 			if (isNaN(l)) l = 0; | |||
| 			l += scr.left + Math.min(mm.leftM + objxy.left, currWH.width - ddWidth - 5) - ($IE ? 2 : 0); | |||
| 			dp.dd.style.top = (t + 2) + 'px'; | |||
| 			dp.dd.style.left = l + 'px' | |||
| 		} | |||
| 	} | |||
| })(); | |||
| @ -0,0 +1,14 @@ | |||
| var $lang={ | |||
| errAlertMsg: "Invalid date or the date out of range,redo or not?", | |||
| aWeekStr: ["wk", "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], | |||
| aLongWeekStr:["wk","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"], | |||
| aMonStr: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], | |||
| aLongMonStr: ["January","February","March","April","May","June","July","August","September","October","November","December"], | |||
| clearStr: "Clear", | |||
| todayStr: "Today", | |||
| okStr: "OK", | |||
| updateStr: "OK", | |||
| timeStr: "Time", | |||
| quickStr: "Quick Selection", | |||
| err_1: 'MinDate Cannot be bigger than MaxDate!' | |||
| } | |||
| @ -0,0 +1,14 @@ | |||
| var $lang={ | |||
| errAlertMsg: "\u4E0D\u5408\u6CD5\u7684\u65E5\u671F\u683C\u5F0F\u6216\u8005\u65E5\u671F\u8D85\u51FA\u9650\u5B9A\u8303\u56F4,\u9700\u8981\u64A4\u9500\u5417?", | |||
| aWeekStr: ["\u5468","\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"], | |||
| aLongWeekStr:["\u5468","\u661F\u671F\u65E5","\u661F\u671F\u4E00","\u661F\u671F\u4E8C","\u661F\u671F\u4E09","\u661F\u671F\u56DB","\u661F\u671F\u4E94","\u661F\u671F\u516D"], | |||
| aMonStr: ["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00","\u5341\u4E8C"], | |||
| aLongMonStr: ["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"], | |||
| clearStr: "\u6E05\u7A7A", | |||
| todayStr: "\u4ECA\u5929", | |||
| okStr: "\u786E\u5B9A", | |||
| updateStr: "\u786E\u5B9A", | |||
| timeStr: "\u65F6\u95F4", | |||
| quickStr: "\u5FEB\u901F\u9009\u62E9",  | |||
| err_1: '\u6700\u5C0F\u65E5\u671F\u4E0D\u80FD\u5927\u4E8E\u6700\u5927\u65E5\u671F!' | |||
| } | |||
| @ -0,0 +1,14 @@ | |||
| var $lang={ | |||
| errAlertMsg: "\u4E0D\u5408\u6CD5\u7684\u65E5\u671F\u683C\u5F0F\u6216\u8005\u65E5\u671F\u8D85\u51FA\u9650\u5B9A\u7BC4\u570D,\u9700\u8981\u64A4\u92B7\u55CE?", | |||
| aWeekStr: ["\u5468","\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"], | |||
| aLongWeekStr:["\u5468","\u661F\u671F\u65E5","\u661F\u671F\u4E00","\u661F\u671F\u4E8C","\u661F\u671F\u4E09","\u661F\u671F\u56DB","\u661F\u671F\u4E94","\u661F\u671F\u516D"], | |||
| aMonStr: ["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00","\u5341\u4E8C"], | |||
| aLongMonStr: ["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"], | |||
| clearStr: "\u6E05\u7A7A", | |||
| todayStr: "\u4ECA\u5929", | |||
| okStr: "\u78BA\u5B9A", | |||
| updateStr: "\u78BA\u5B9A", | |||
| timeStr: "\u6642\u9593", | |||
| quickStr: "\u5FEB\u901F\u9078\u64C7", | |||
| err_1: '\u6700\u5C0F\u65E5\u671F\u4E0D\u80FD\u5927\u65BC\u6700\u5927\u65E5\u671F!' | |||
| } | |||
| @ -0,0 +1,11 @@ | |||
| .Wdate{ | |||
| 	border:#999 1px solid; | |||
| 	height:20px; | |||
| 	background:#fff url(datePicker.gif) no-repeat right; | |||
| } | |||
| .Wdate::-ms-clear{display:none;} | |||
| 
 | |||
| .WdateFmtErr{ | |||
| 	font-weight:bold; | |||
| 	color:red; | |||
| } | |||
| After Width: | Height: | Size: 1.0 KiB | 
| @ -0,0 +1,328 @@ | |||
| /** | |||
| * yyh & kimi from mb518.com | |||
| * 2019-3-25 | |||
| **/ | |||
| .WdateDiv { | |||
|     width: 216px; | |||
|     background-color: #FFF; | |||
|     border-radius: 5px; | |||
|     border: 1px solid #cecece; | |||
| } | |||
| 
 | |||
| .WdateDiv2 { | |||
|     width: 432px; | |||
| } | |||
| 
 | |||
| .WdateDiv > div:nth-child(3) { | |||
|     padding: 0px 0.375em; | |||
| } | |||
| 
 | |||
| .WdateDiv .NavImg a { | |||
|     cursor: pointer; | |||
|     display: block; | |||
|     width: 1em; | |||
|     height: 1em; | |||
|     margin-top: 0.5em; | |||
| } | |||
| 
 | |||
| .WdateDiv .NavImgll a { | |||
|     float: left; | |||
|     background: url(img.gif) no-repeat; | |||
|     background-size: 400%; | |||
| } | |||
| 
 | |||
| .WdateDiv .NavImgl a { | |||
|     float: left; | |||
|     background: url(img.gif) no-repeat -1em 0; | |||
|     background-size: 400%; | |||
| } | |||
| 
 | |||
| .WdateDiv .NavImgr a { | |||
|     float: right; | |||
|     background: url(img.gif) no-repeat -2em 0; | |||
|     background-size: 400%; | |||
| } | |||
| 
 | |||
| .WdateDiv .NavImgrr a { | |||
|     float: right; | |||
|     background: url(img.gif) no-repeat -3em 0; | |||
|     background-size: 400%; | |||
| } | |||
| 
 | |||
| .WdateDiv #dpTitle { | |||
|     height: 1.875em; | |||
|     padding: 0.1875em 0.3125em; | |||
| } | |||
| 
 | |||
| .WdateDiv #dpTitle > div:nth-child(3), | |||
| .WdateDiv #dpTitle > div:nth-child(4) { | |||
|     margin: 0px 0.8125em; | |||
| } | |||
| 
 | |||
| .WdateDiv .yminput { | |||
|     margin-top: 0.375em; | |||
|     text-align: center; | |||
|     border: 0px; | |||
|     height: 1.75em; | |||
|     width: 3.125em; | |||
|     color: #333; | |||
|     background-color: #eefaff; | |||
|     outline: none; | |||
|     cursor: pointer; | |||
|     font-size: 0.8125em; | |||
|     border-radius: 0; | |||
| } | |||
| 
 | |||
| .WdateDiv .yminputfocus { | |||
|     font-size: 0.8125em; | |||
|     margin-top: 0.375em; | |||
|     text-align: center; | |||
|     border: 0; | |||
|     color: #333; | |||
|     height: 1.25em; | |||
|     width: 3.125em; | |||
|     outline: none; | |||
|     background-color: #eefaff; | |||
| } | |||
| 
 | |||
| .WdateDiv .menuSel { | |||
|     z-index: 1; | |||
|     position: absolute; | |||
|     background-color: #FFFFFF; | |||
|     display: none; | |||
|     padding: 0.3125em; | |||
|     border-radius: 3px; | |||
|     box-shadow: rgb(204, 204, 204) 0px 0px 2px 2px; | |||
| } | |||
| 
 | |||
| .WdateDiv .menu { | |||
|     cursor: pointer; | |||
|     background-color: #fff; | |||
|     color: #333; | |||
|     text-align: center; | |||
| } | |||
| 
 | |||
| .WdateDiv .menuOn { | |||
|     cursor: pointer; | |||
|     text-align: center; | |||
|     background-color: #d6f2ff; | |||
|     border-radius: 3px; | |||
| } | |||
| 
 | |||
| .WdateDiv .invalidMenu { | |||
|     color: #aaa; | |||
| } | |||
| 
 | |||
| .WdateDiv .YMenu { | |||
|     margin-top: 1.875em; | |||
| } | |||
| 
 | |||
| .WdateDiv .MMenu { | |||
|     margin-top: 1.875em; | |||
|     box-shadow: rgb(204, 204, 204) 0px 0px 2px 2px; | |||
|     padding: 0.3125em; | |||
|     border-radius: 3px; | |||
|     *width: 3.875em; | |||
| } | |||
| 
 | |||
| .WdateDiv .hhMenu { | |||
|     margin-top: -5.625em; | |||
|     margin-left: 1.625em; | |||
| } | |||
| 
 | |||
| .WdateDiv .mmMenu { | |||
|     margin-top: -2.875em; | |||
|     margin-left: 1.625em; | |||
| } | |||
| 
 | |||
| .WdateDiv .ssMenu { | |||
|     margin-top: -1.5em; | |||
|     margin-left: 1.625em; | |||
| } | |||
| 
 | |||
| .WdateDiv .Wweek { | |||
|     text-align: center; | |||
|     background: #DAF3F5; | |||
|     border-right: #BDEBEE 1px solid; | |||
| } | |||
| 
 | |||
| .WdateDiv .MTitle { | |||
|     background-color: #f3f3f3; | |||
|     border-radius: 5px; | |||
|     color: #666; | |||
| } | |||
| 
 | |||
| .WdateDiv .WdayTable2 { | |||
|     border-collapse: collapse; | |||
| } | |||
| 
 | |||
| .WdateDiv .WdayTable2 table { | |||
|     border: 0; | |||
| } | |||
| 
 | |||
| .WdateDiv .WdayTable { | |||
|     font-size: 0.75em; | |||
|     line-height: 1.5em; | |||
|     color: #333; | |||
| } | |||
| 
 | |||
| .WdateDiv .WdayTable td { | |||
|     text-align: center; | |||
|     border-bottom: 1px solid #f3f3f3; | |||
|     padding: 0.1875em 0; | |||
| } | |||
| 
 | |||
| .WdateDiv .Wday { | |||
|     cursor: pointer; | |||
| } | |||
| 
 | |||
| .WdateDiv .WdayOn { | |||
|     cursor: pointer; | |||
|     border-radius: 3px; | |||
|     background-color: #C0EBEF; | |||
| } | |||
| 
 | |||
| .WdateDiv .Wwday { | |||
|     cursor: pointer; | |||
|     color: #ab1e1e; | |||
| } | |||
| 
 | |||
| .WdateDiv .WwdayOn { | |||
|     cursor: pointer; | |||
|     border-radius: 3px; | |||
|     background-color: #C0EBEF; | |||
| } | |||
| 
 | |||
| .WdateDiv .Wtoday { | |||
|     cursor: pointer; | |||
|     color: blue; | |||
| } | |||
| 
 | |||
| .WdateDiv .Wselday { | |||
|     background-color: #35baf6; | |||
|     border-radius: 3px; | |||
|     color: #fff; | |||
| } | |||
| 
 | |||
| .WdateDiv .WspecialDay { | |||
|     background-color: #66F4DF; | |||
| } | |||
| 
 | |||
| .WdateDiv .WotherDay { | |||
|     cursor: pointer; | |||
|     color: #8585e1; | |||
| } | |||
| 
 | |||
| .WdateDiv .WotherDayOn { | |||
|     cursor: pointer; | |||
|     background-color: #d6f2ff; | |||
|     border-radius: 3px; | |||
| } | |||
| 
 | |||
| .WdateDiv .WinvalidDay { | |||
|     color: #aaa; | |||
| } | |||
| 
 | |||
| .WdateDiv #dpTime { | |||
|     margin: 0.1875em 0 0.1875em 0.625em; | |||
| } | |||
| 
 | |||
| .WdateDiv #dpTime #dpTimeStr { | |||
|     margin-left: 0.0625em; | |||
|     color: #333; | |||
|     font-size: 0.75em; | |||
| } | |||
| 
 | |||
| .WdateDiv #dpTime table:nth-child(4) { | |||
|     font-size: 100%; | |||
| } | |||
| 
 | |||
| .WdateDiv #dpTime table:nth-child(-n+3) { | |||
|     font-size: 0.75em; | |||
| } | |||
| 
 | |||
| .WdateDiv #dpTime input { | |||
|     -webkit-appearance: none; | |||
|     font-size: 0.75em; | |||
|     height: 1.25em; | |||
|     width: 1.875em; | |||
|     text-align: center; | |||
|     color: #333; | |||
|     border: 0; | |||
|     background-color: #eefaff; | |||
|     border-radius: 0; | |||
|     padding: 0; | |||
| } | |||
| 
 | |||
| .WdateDiv #dpTime input:disabled { | |||
|     background-color: #e7e7e7; | |||
| } | |||
| 
 | |||
| .WdateDiv #dpTime .tB { | |||
|     border-right: 0px; | |||
| } | |||
| 
 | |||
| .WdateDiv #dpTime .tE { | |||
|     border-left: 0; | |||
|     border-right: 0; | |||
| } | |||
| 
 | |||
| .WdateDiv #dpTime .tm { | |||
|     width: 0.9375em; | |||
|     border-left: 0; | |||
|     border-right: 0; | |||
| } | |||
| 
 | |||
| /*.WdateDiv #dpTime button { | |||
|     font-size: 0.75em; | |||
| }*/ | |||
| 
 | |||
| .WdateDiv #dpTime #dpTimeUp { | |||
|     height: 0.625em; | |||
|     width: 0.8125em; | |||
|     border: 0px; | |||
|     background: url(img.gif) no-repeat -2em -1em; | |||
|     background-size: 450%; | |||
|     overflow: hidden; | |||
| } | |||
| 
 | |||
| .WdateDiv #dpTime #dpTimeDown { | |||
|     height: 0.625em; | |||
|     width: 0.8125em; | |||
|     border: 0px; | |||
|     background: url(img.gif) no-repeat -2em -1.625em; | |||
|     background-size: 450%; | |||
| } | |||
| 
 | |||
| .WdateDiv #dpQS { | |||
|     float: left; | |||
|     margin-right: 0.1875em; | |||
|     margin-top: 0.3125em; | |||
|     background: url(img.gif) no-repeat 0px -1em; | |||
|     background-size: 320%; | |||
|     width: 1.25em; | |||
|     height: 1.25em; | |||
|     cursor: pointer; | |||
|     margin-left: 0.375em; | |||
| } | |||
| 
 | |||
| .WdateDiv #dpControl { | |||
|     text-align: right; | |||
|     margin-top: 0.1875em; | |||
|     padding: 0 0.3125em; | |||
|     padding-bottom: 0.1875em; | |||
| } | |||
| 
 | |||
| .WdateDiv .dpButton { | |||
|     font-size: 0.75em; | |||
|     -webkit-appearance: none; | |||
|     padding-top: 0; | |||
|     height: 1.75em; | |||
|     width: 2.8125em; | |||
|     border: 0; | |||
|     margin-top: 0.1875em; | |||
|     margin-right: 0.1875em; | |||
|     background: #35baf6; | |||
|     color: #fff; | |||
|     border-radius: 0; | |||
| } | |||
| After Width: | Height: | Size: 2.4 KiB | 
| @ -0,0 +1,309 @@ | |||
| /*  | |||
|  * My97 DatePicker 4.7 | |||
|  * 皮肤名称:ext | |||
|  * 皮肤作者:CssRain | |||
|  * 作者blog:http://www.CssRain.cn | |||
|  * 作者邮箱:cssrain@gmail.com | |||
|  */ | |||
| 
 | |||
| /* 日期选择容器 DIV */ | |||
| .WdateDiv{ | |||
| 	width:180px; | |||
| 	background-color:#fff; | |||
| 	border:1px solid #718BB7; | |||
| } | |||
| /* 双月日历的宽度 */ | |||
| .WdateDiv2{ | |||
| 	width:360px; | |||
| } | |||
| .WdateDiv *{font-size:9pt;} | |||
| 
 | |||
| /**************************** | |||
|  * 导航图标 全部是A标签 | |||
|  ***************************/ | |||
| .WdateDiv .NavImg a{ | |||
| 	margin-top:3px; | |||
| 	cursor:pointer; | |||
| 	display:block; | |||
| 	width:15px; | |||
| 	height:15px; | |||
| } | |||
| .WdateDiv .NavImgll a{ | |||
| 	background:url(left-btn2.gif) no-repeat center center; | |||
| 	float:left;  | |||
| 	margin-left:2px; | |||
| } | |||
| .WdateDiv .NavImgl a{ | |||
| 	background:url(left-btn.gif) no-repeat center center; | |||
| 	float:left;  | |||
| 	margin-left:2px; | |||
| } | |||
| .WdateDiv .NavImgr a{ | |||
| 	background:url(right-btn.gif) no-repeat center center; | |||
| 	float:right; | |||
| 	margin-right:2px; | |||
| } | |||
| .WdateDiv .NavImgrr a{ | |||
| 	background:url(right-btn2.gif) no-repeat center center; | |||
| 	float:right; | |||
| 	margin-right:2px; | |||
| } | |||
| 
 | |||
| /**************************** | |||
|  * 年份月份相关 | |||
|  ***************************/ | |||
| /* 年份月份栏 DIV */ | |||
| .WdateDiv #dpTitle{ | |||
| 	height:22px; | |||
| 	background:transparent url(hd-sprite.gif) repeat-x scroll 0 -83px; | |||
| 	color:#FFFFFF; | |||
| 	font-family:"sans serif",tahoma,verdana,helvetica; | |||
| 	font-size:12px; | |||
| 	font-size-adjust:none; | |||
| 	font-stretch:normal; | |||
| 	font-style:normal; | |||
| 	font-variant:normal; | |||
| 	font-weight:bold; | |||
| 	padding-top:2px; | |||
| } | |||
| /* 年份月份输入框 INPUT */ | |||
| .WdateDiv .yminput{ | |||
| 	margin-top:2px; | |||
| 	text-align:center; | |||
| 	border:0px; | |||
| 	height:20px; | |||
| 	width:50px; | |||
| 	color:#FFF; | |||
| 	background-color:transparent; | |||
| 	cursor:pointer; | |||
| } | |||
| /* 年份月份输入框获得焦点时的样式 INPUT */ | |||
| .WdateDiv .yminputfocus{ | |||
| 	margin-top:2px; | |||
| 	text-align:center; | |||
| 	border:#939393 1px solid; | |||
| 	font-weight:bold; | |||
| 	color:#034c50;	 | |||
| 	height:16px; | |||
| 	width:50px; | |||
| } | |||
| /* 菜单选择框 DIV */ | |||
| .WdateDiv .menuSel{ | |||
| 	z-index:1; | |||
| 	position:absolute; | |||
| 	background-color:#FFFFFF; | |||
| 	border:1px solid #718BB7; | |||
| 	display:none; | |||
| } | |||
| /* 菜单的样式 TD */ | |||
| .WdateDiv .menu{ | |||
| 	cursor:pointer; | |||
| 	background-color:#fff; | |||
| 	color:#11777C; | |||
| } | |||
| /* 菜单的mouseover样式 TD */ | |||
| .WdateDiv .menuOn{ | |||
| 	cursor:pointer; | |||
| 	background-color: #B3CEEF; | |||
| } | |||
| /* 菜单无效时的样式 TD */ | |||
| .WdateDiv .invalidMenu{ | |||
| 	color:#aaa; | |||
| } | |||
| /* 年选择框的偏移 DIV */ | |||
| .WdateDiv .YMenu{ | |||
| 	margin-top:16px; | |||
| } | |||
| /* 月选择框的偏移 DIV */ | |||
| .WdateDiv .MMenu{ | |||
| 	margin-top:16px; | |||
| 	*width:62px; | |||
| } | |||
| /* 时选择框的位置 DIV */ | |||
| .WdateDiv .hhMenu{ | |||
| 	margin-top:-90px;  | |||
| 	margin-left:26px; | |||
| } | |||
| /* 分选择框的位置 DIV */ | |||
| .WdateDiv .mmMenu{ | |||
| 	margin-top:-46px;  | |||
| 	margin-left:26px; | |||
| } | |||
| /* 秒选择框的位置 DIV */ | |||
| .WdateDiv .ssMenu{ | |||
| 	margin-top:-24px;  | |||
| 	margin-left:26px; | |||
| } | |||
| 
 | |||
| /**************************** | |||
|  * 周相关 | |||
|  ***************************/ | |||
|  .WdateDiv .Wweek { | |||
|  	text-align:center; | |||
| 	background:#DAF3F5; | |||
| 	border-right:#BDEBEE 1px solid; | |||
|  } | |||
| /**************************** | |||
|  * 星期,日期相关 | |||
|  ***************************/ | |||
|  /* 星期栏 TR */ | |||
| .WdateDiv .MTitle{ | |||
| 	color:#233D6D; | |||
| 	background:#DFECFB url(glass-bg.gif) repeat-x scroll left top; | |||
| 	color:#233D6D; | |||
| 	cursor:default; | |||
| 	font-size:10px;  | |||
| 	padding-top:2px; | |||
| } | |||
| .WdateDiv .MTitle td{ | |||
| 	border-bottom:1px solid #A3BAD9; | |||
| } | |||
| .WdateDiv .WdayTable2{ | |||
| 	border-collapse:collapse; | |||
| 	border:black 1px solid; | |||
| } | |||
| .WdateDiv .WdayTable2 table{ | |||
| 	border:0; | |||
| } | |||
| /* 日期栏表格 TABLE */ | |||
| .WdateDiv .WdayTable{ | |||
| 	line-height:20px;	 | |||
| 	color:black;  | |||
| } | |||
| .WdateDiv .WdayTable td{ | |||
| 	text-align:center; | |||
| } | |||
| /* 日期格的样式 TD */ | |||
| .WdateDiv .Wday{ | |||
| 	cursor:pointer; | |||
| } | |||
| /* 日期格的mouseover样式 TD */ | |||
| .WdateDiv .WdayOn{ | |||
| 	cursor:pointer; | |||
| 	background-color:#B3CEEF; | |||
| } | |||
| /* 周末日期格的样式 TD */ | |||
| .WdateDiv .Wwday{ | |||
| 	cursor:pointer; | |||
| 	color:#ab1e1e; | |||
| } | |||
| /* 周末日期格的mouseover样式 TD */ | |||
| .WdateDiv .WwdayOn{ | |||
| 	cursor:pointer; | |||
| 	background-color:#B3CEEF; | |||
| } | |||
| .WdateDiv .Wtoday{ | |||
| 	cursor:pointer; | |||
| 	color:red; | |||
| } | |||
| .WdateDiv .Wselday{ | |||
| 	background-color:#B3CEEF; | |||
| } | |||
| .WdateDiv .WspecialDay{ | |||
| 	background-color:#66F4DF; | |||
| } | |||
| /* 其他月份的日期 */ | |||
| .WdateDiv .WotherDay{  | |||
| 	cursor:pointer; | |||
| 	color:#AAAAAA; | |||
| } | |||
| /* 其他月份的日期mouseover样式 */ | |||
| .WdateDiv .WotherDayOn{  | |||
| 	cursor:pointer; | |||
| 	background-color:#B3CEEF; | |||
| } | |||
| /* 无效日期的样式,即在日期范围以外日期格的样式,不能选择的日期 */ | |||
| .WdateDiv .WinvalidDay{ | |||
| 	color:#aaa; | |||
| } | |||
| 
 | |||
| /**************************** | |||
|  * 时间相关 | |||
|  ***************************/ | |||
| /* 时间栏 DIV */ | |||
| .WdateDiv #dpTime{ | |||
| 	width:120px; | |||
| 	text-align:left; | |||
| 	margin-left:32px; | |||
| 	height:20px; | |||
| 	line-height:20px; | |||
| 	padding-top:1px; | |||
| } | |||
| /* 时间文字 SPAN */ | |||
| .WdateDiv #dpTime #dpTimeStr{ | |||
| 	margin-left:1px; | |||
| 	color:#233D6D; | |||
| } | |||
| /* 时间输入框 INPUT */ | |||
| .WdateDiv #dpTime input{ | |||
| 	height:16px; | |||
| 	width:18px; | |||
| 	text-align:center; | |||
| 	color:#333; | |||
| 	border:#A3BAD9 1px solid;	 | |||
| } | |||
| /* 时间 时 INPUT */ | |||
| .WdateDiv #dpTime .tB{ | |||
| 	border-right:0px; | |||
| } | |||
| /* 时间 分和间隔符 ':' INPUT */ | |||
| .WdateDiv #dpTime .tE{ | |||
| 	border-left:0; | |||
| 	border-right:0; | |||
| } | |||
| /* 时间 秒 INPUT */ | |||
| .WdateDiv #dpTime .tm{ | |||
| 	width:7px; | |||
| 	border-left:0; | |||
| 	border-right:0; | |||
| } | |||
| /* 时间右边的向上按钮 BUTTON */ | |||
| .WdateDiv #dpTime #dpTimeUp{ | |||
| 	height:8px; | |||
| 	width:13px; | |||
| 	border:0px; | |||
| 	background:url(img.gif) no-repeat -32px -16px; | |||
| 	cursor:pointer; | |||
| 	margin-bottom:0; | |||
| 	padding-bottom:0; | |||
| } | |||
| /* 时间右边的向下按钮 BUTTON */ | |||
| .WdateDiv #dpTime #dpTimeDown{ | |||
| 	height:8px; | |||
| 	width:13px; | |||
| 	border:0px; | |||
| 	background:url(img.gif) no-repeat -48px -16px; | |||
| 	cursor:pointer; | |||
| 	margin-top:0; | |||
| 	padding-top:0; | |||
| } | |||
| /**************************** | |||
|  * 其他 | |||
|  ***************************/ | |||
|  .WdateDiv #dpQS { | |||
|  	float:left; | |||
| 	margin-left:3px; | |||
| 	margin-top:9px; | |||
| 	background:url(dateselect.gif) no-repeat; | |||
| 	width:20px; | |||
| 	height:20px; | |||
| 	cursor:pointer; | |||
|  } | |||
| .WdateDiv #dpControl { | |||
| 	text-align:right; | |||
| 	margin-top:3px; | |||
| 	background:#DFECFB url(glass-bg.gif) repeat-x scroll left top; | |||
| 	border-top:1px solid #A3BAD9; | |||
| 	padding:4px; | |||
| } | |||
| .WdateDiv .dpButton{  | |||
| 	width:44px; | |||
| 	height:22px; | |||
| 	background:#083772 none repeat scroll 0 0; | |||
| 	border-color:#3366CC #000055 #000055 #3366CC; | |||
| 	border-style:solid; | |||
| 	border-width:1px; | |||
| 	color:white; | |||
| 	cursor:pointer; | |||
| 
 | |||
| } | |||
| After Width: | Height: | Size: 190 B | 
| After Width: | Height: | Size: 873 B | 
| After Width: | Height: | Size: 1.1 KiB | 
| After Width: | Height: | Size: 1.6 KiB | 
| After Width: | Height: | Size: 870 B | 
| After Width: | Height: | Size: 113 B | 
| After Width: | Height: | Size: 871 B | 
| After Width: | Height: | Size: 113 B | 
| After Width: | Height: | Size: 307 B | 
| @ -0,0 +1,256 @@ | |||
| /*  | |||
|  * My97 DatePicker 4.8 Skin:whyGreen | |||
|  */  | |||
| .WdateDiv{ | |||
| 	width:180px; | |||
| 	background-color:#fff; | |||
| 	border:#C5E1E4 1px solid; | |||
| 	padding:2px; | |||
| } | |||
| 
 | |||
| .WdateDiv2{ | |||
| 	width:360px; | |||
| } | |||
| .WdateDiv *{font-size:9pt;} | |||
| 
 | |||
| .WdateDiv .NavImg a{ | |||
| 	cursor:pointer; | |||
| 	display:block; | |||
| 	width:16px; | |||
| 	height:16px; | |||
| 	margin-top:1px; | |||
| } | |||
| 
 | |||
| .WdateDiv .NavImgll a{ | |||
| 	float:left; | |||
| 	background:url(img.gif) no-repeat; | |||
| } | |||
| .WdateDiv .NavImgl a{ | |||
| 	float:left; | |||
| 	background:url(img.gif) no-repeat -16px 0px; | |||
| } | |||
| .WdateDiv .NavImgr a{ | |||
| 	float:right; | |||
| 	background:url(img.gif) no-repeat -32px 0px; | |||
| } | |||
| .WdateDiv .NavImgrr a{ | |||
| 	float:right; | |||
| 	background:url(img.gif) no-repeat -48px 0px; | |||
| } | |||
| 
 | |||
| .WdateDiv #dpTitle{ | |||
| 	height:24px; | |||
| 	padding:1px; | |||
| 	border:#c5d9e8 1px solid; | |||
| 	background:url(bg.jpg); | |||
| 	margin-bottom:2px; | |||
| } | |||
| 
 | |||
| .WdateDiv .yminput{ | |||
| 	margin-top:2px; | |||
| 	text-align:center; | |||
| 	border:0px; | |||
| 	height:20px; | |||
| 	width:50px; | |||
| 	color:#034c50; | |||
| 	background-color:transparent; | |||
| 	cursor:pointer; | |||
| } | |||
| 
 | |||
| .WdateDiv .yminputfocus{ | |||
| 	margin-top:2px; | |||
| 	text-align:center; | |||
| 	border:#939393 1px solid; | |||
| 	font-weight:bold; | |||
| 	color:#034c50;	 | |||
| 	height:20px; | |||
| 	width:50px; | |||
| } | |||
| 
 | |||
| .WdateDiv .menuSel{ | |||
| 	z-index:1; | |||
| 	position:absolute; | |||
| 	background-color:#FFFFFF; | |||
| 	border:#A3C6C8 1px solid; | |||
| 	display:none; | |||
| } | |||
| 
 | |||
| .WdateDiv .menu{ | |||
| 	cursor:pointer; | |||
| 	background-color:#fff; | |||
| 	color:#11777C; | |||
| } | |||
| 
 | |||
| .WdateDiv .menuOn{ | |||
| 	cursor:pointer; | |||
| 	background-color:#BEEBEE; | |||
| } | |||
| 
 | |||
| .WdateDiv .invalidMenu{ | |||
| 	color:#aaa; | |||
| } | |||
| 
 | |||
| .WdateDiv .YMenu{ | |||
| 	margin-top:20px; | |||
| } | |||
| 
 | |||
| .WdateDiv .MMenu{ | |||
| 	margin-top:20px; | |||
| 	*width:62px; | |||
| } | |||
| 
 | |||
| .WdateDiv .hhMenu{ | |||
| 	margin-top:-90px;  | |||
| 	margin-left:26px; | |||
| } | |||
| 
 | |||
| .WdateDiv .mmMenu{ | |||
| 	margin-top:-46px;  | |||
| 	margin-left:26px; | |||
| } | |||
| 
 | |||
| .WdateDiv .ssMenu{ | |||
| 	margin-top:-24px;  | |||
| 	margin-left:26px; | |||
| } | |||
| 
 | |||
|  .WdateDiv .Wweek { | |||
|  	text-align:center; | |||
| 	background:#DAF3F5; | |||
| 	border-right:#BDEBEE 1px solid; | |||
|  } | |||
| 
 | |||
| .WdateDiv .MTitle{ | |||
| 	color:#13777e; | |||
| 	background-color:#bdebee; | |||
| } | |||
| .WdateDiv .WdayTable2{ | |||
| 	border-collapse:collapse; | |||
| 	border:#BEE9F0 1px solid; | |||
| } | |||
| .WdateDiv .WdayTable2 table{ | |||
| 	border:0; | |||
| } | |||
| 
 | |||
| .WdateDiv .WdayTable{ | |||
| 	line-height:20px;	 | |||
| 	color:#13777e; | |||
| 	background-color:#edfbfb; | |||
| 	border:#BEE9F0 1px solid; | |||
| } | |||
| .WdateDiv .WdayTable td{ | |||
| 	text-align:center; | |||
| } | |||
| 
 | |||
| .WdateDiv .Wday{ | |||
| 	cursor:pointer; | |||
| } | |||
| 
 | |||
| .WdateDiv .WdayOn{ | |||
| 	cursor:pointer; | |||
| 	background-color:#74d2d9 ; | |||
| } | |||
| 
 | |||
| .WdateDiv .Wwday{ | |||
| 	cursor:pointer; | |||
| 	color:#ab1e1e; | |||
| } | |||
| 
 | |||
| .WdateDiv .WwdayOn{ | |||
| 	cursor:pointer; | |||
| 	background-color:#74d2d9; | |||
| } | |||
| .WdateDiv .Wtoday{ | |||
| 	cursor:pointer; | |||
| 	color:blue; | |||
| } | |||
| .WdateDiv .Wselday{ | |||
| 	background-color:#A7E2E7; | |||
| } | |||
| .WdateDiv .WspecialDay{ | |||
| 	background-color:#66F4DF; | |||
| } | |||
| 
 | |||
| .WdateDiv .WotherDay{  | |||
| 	cursor:pointer; | |||
| 	color:#0099CC;	 | |||
| } | |||
| 
 | |||
| .WdateDiv .WotherDayOn{  | |||
| 	cursor:pointer; | |||
| 	background-color:#C0EBEF;	 | |||
| } | |||
| 
 | |||
| .WdateDiv .WinvalidDay{ | |||
| 	color:#aaa; | |||
| } | |||
| 
 | |||
| .WdateDiv #dpTime{ | |||
| 	float:left; | |||
| 	margin-top:3px; | |||
| 	margin-right:30px; | |||
| } | |||
| 
 | |||
| .WdateDiv #dpTime #dpTimeStr{ | |||
| 	margin-left:1px; | |||
| 	color:#497F7F; | |||
| } | |||
| 
 | |||
| .WdateDiv #dpTime input{ | |||
| 	height:20px; | |||
| 	width:18px; | |||
| 	text-align:center; | |||
| 	color:#333; | |||
| 	border:#61CAD0 1px solid;	 | |||
| } | |||
| 
 | |||
| .WdateDiv #dpTime .tB{ | |||
| 	border-right:0px; | |||
| } | |||
| 
 | |||
| .WdateDiv #dpTime .tE{ | |||
| 	border-left:0; | |||
| 	border-right:0; | |||
| } | |||
| 
 | |||
| .WdateDiv #dpTime .tm{ | |||
| 	width:7px; | |||
| 	border-left:0; | |||
| 	border-right:0; | |||
| } | |||
| 
 | |||
| .WdateDiv #dpTime #dpTimeUp{ | |||
| 	height:10px; | |||
| 	width:13px; | |||
| 	border:0px; | |||
| 	background:url(img.gif) no-repeat -32px -16px; | |||
| } | |||
| 
 | |||
| .WdateDiv #dpTime #dpTimeDown{ | |||
| 	height:10px; | |||
| 	width:13px; | |||
| 	border:0px; | |||
| 	background:url(img.gif) no-repeat -48px -16px; | |||
| } | |||
| 
 | |||
|  .WdateDiv #dpQS { | |||
|  	float:left; | |||
| 	margin-right:3px; | |||
| 	margin-top:3px; | |||
| 	background:url(img.gif) no-repeat 0px -16px; | |||
| 	width:20px; | |||
| 	height:20px; | |||
| 	cursor:pointer; | |||
|  } | |||
| .WdateDiv #dpControl { | |||
| 	text-align:right; | |||
| 	margin-top:3px; | |||
| } | |||
| .WdateDiv .dpButton{  | |||
| 	height:20px; | |||
| 	width:45px; | |||
| 	margin-top:2px; | |||
| 	border:#38B1B9 1px solid; | |||
| 	background-color:#CFEBEE; | |||
| 	color:#08575B; | |||
| } | |||
| After Width: | Height: | Size: 1.6 KiB | 
| @ -0,0 +1,190 @@ | |||
| /*jslint adsafe: false, bitwise: true, browser: true, cap: false, css: false, | |||
|   debug: false, devel: true, eqeqeq: true, es5: false, evil: false, | |||
|   forin: false, fragment: false, immed: true, laxbreak: false, newcap: true, | |||
|   nomen: false, on: false, onevar: true, passfail: false, plusplus: true, | |||
|   regexp: false, rhino: true, safe: false, strict: false, sub: false, | |||
|   undef: true, white: false, widget: false, windows: false */ | |||
| /*global jQuery: false, window: false */ | |||
| "use strict"; | |||
| 
 | |||
| /* | |||
|  * Original code (c) 2010 Nick Galbreath | |||
|  * http://code.google.com/p/stringencoders/source/browse/#svn/trunk/javascript
 | |||
|  * | |||
|  * jQuery port (c) 2010 Carlo Zottmann | |||
|  * http://github.com/carlo/jquery-base64
 | |||
|  * | |||
|  * Permission is hereby granted, free of charge, to any person | |||
|  * obtaining a copy of this software and associated documentation | |||
|  * files (the "Software"), to deal in the Software without | |||
|  * restriction, including without limitation the rights to use, | |||
|  * copy, modify, merge, publish, distribute, sublicense, and/or sell | |||
|  * copies of the Software, and to permit persons to whom the | |||
|  * Software is furnished to do so, subject to the following | |||
|  * conditions: | |||
|  * | |||
|  * The above copyright notice and this permission notice shall be | |||
|  * included in all copies or substantial portions of the Software. | |||
|  * | |||
|  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | |||
|  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES | |||
|  * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | |||
|  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT | |||
|  * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | |||
|  * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | |||
|  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | |||
|  * OTHER DEALINGS IN THE SOFTWARE. | |||
| */ | |||
| 
 | |||
| /* base64 encode/decode compatible with window.btoa/atob | |||
|  * | |||
|  * window.atob/btoa is a Firefox extension to convert binary data (the "b") | |||
|  * to base64 (ascii, the "a"). | |||
|  * | |||
|  * It is also found in Safari and Chrome.  It is not available in IE. | |||
|  * | |||
|  * if (!window.btoa) window.btoa = $.base64.encode | |||
|  * if (!window.atob) window.atob = $.base64.decode | |||
|  * | |||
|  * The original spec's for atob/btoa are a bit lacking | |||
|  * https://developer.mozilla.org/en/DOM/window.atob
 | |||
|  * https://developer.mozilla.org/en/DOM/window.btoa
 | |||
|  * | |||
|  * window.btoa and $.base64.encode takes a string where charCodeAt is [0,255] | |||
|  * If any character is not [0,255], then an exception is thrown. | |||
|  * | |||
|  * window.atob and $.base64.decode take a base64-encoded string | |||
|  * If the input length is not a multiple of 4, or contains invalid characters | |||
|  *   then an exception is thrown. | |||
|  */ | |||
|   | |||
| jQuery.base64 = ( function( $ ) { | |||
|    | |||
|   var _PADCHAR = "=", | |||
|     _ALPHA = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", | |||
|     _VERSION = "1.0"; | |||
| 
 | |||
| 
 | |||
|   function _getbyte64( s, i ) { | |||
|     // This is oddly fast, except on Chrome/V8.
 | |||
|     // Minimal or no improvement in performance by using a
 | |||
|     // object with properties mapping chars to value (eg. 'A': 0)
 | |||
| 
 | |||
|     var idx = _ALPHA.indexOf( s.charAt( i ) ); | |||
| 
 | |||
|     if ( idx === -1 ) { | |||
|       throw "Cannot decode base64"; | |||
|     } | |||
| 
 | |||
|     return idx; | |||
|   } | |||
|    | |||
|    | |||
|   function _decode( s ) { | |||
|     var pads = 0, | |||
|       i, | |||
|       b10, | |||
|       imax = s.length, | |||
|       x = []; | |||
| 
 | |||
|     s = String( s ); | |||
|      | |||
|     if ( imax === 0 ) { | |||
|       return s; | |||
|     } | |||
| 
 | |||
|     if ( imax % 4 !== 0 ) { | |||
|       throw "Cannot decode base64"; | |||
|     } | |||
| 
 | |||
|     if ( s.charAt( imax - 1 ) === _PADCHAR ) { | |||
|       pads = 1; | |||
| 
 | |||
|       if ( s.charAt( imax - 2 ) === _PADCHAR ) { | |||
|         pads = 2; | |||
|       } | |||
| 
 | |||
|       // either way, we want to ignore this last block
 | |||
|       imax -= 4; | |||
|     } | |||
| 
 | |||
|     for ( i = 0; i < imax; i += 4 ) { | |||
|       b10 = ( _getbyte64( s, i ) << 18 ) | ( _getbyte64( s, i + 1 ) << 12 ) | ( _getbyte64( s, i + 2 ) << 6 ) | _getbyte64( s, i + 3 ); | |||
|       x.push( String.fromCharCode( b10 >> 16, ( b10 >> 8 ) & 0xff, b10 & 0xff ) ); | |||
|     } | |||
| 
 | |||
|     switch ( pads ) { | |||
|       case 1: | |||
|         b10 = ( _getbyte64( s, i ) << 18 ) | ( _getbyte64( s, i + 1 ) << 12 ) | ( _getbyte64( s, i + 2 ) << 6 ); | |||
|         x.push( String.fromCharCode( b10 >> 16, ( b10 >> 8 ) & 0xff ) ); | |||
|         break; | |||
| 
 | |||
|       case 2: | |||
|         b10 = ( _getbyte64( s, i ) << 18) | ( _getbyte64( s, i + 1 ) << 12 ); | |||
|         x.push( String.fromCharCode( b10 >> 16 ) ); | |||
|         break; | |||
|     } | |||
| 
 | |||
|     return x.join( "" ); | |||
|   } | |||
|    | |||
|    | |||
|   function _getbyte( s, i ) { | |||
|     var x = s.charCodeAt( i ); | |||
| 
 | |||
|     if ( x > 255 ) { | |||
|       throw "INVALID_CHARACTER_ERR: DOM Exception 5"; | |||
|     } | |||
|      | |||
|     return x; | |||
|   } | |||
| 
 | |||
| 
 | |||
|   function _encode( s ) { | |||
|     if ( arguments.length !== 1 ) { | |||
|       throw "SyntaxError: exactly one argument required"; | |||
|     } | |||
| 
 | |||
|     s = String( s ); | |||
| 
 | |||
|     var i, | |||
|       b10, | |||
|       x = [], | |||
|       imax = s.length - s.length % 3; | |||
| 
 | |||
|     if ( s.length === 0 ) { | |||
|       return s; | |||
|     } | |||
| 
 | |||
|     for ( i = 0; i < imax; i += 3 ) { | |||
|       b10 = ( _getbyte( s, i ) << 16 ) | ( _getbyte( s, i + 1 ) << 8 ) | _getbyte( s, i + 2 ); | |||
|       x.push( _ALPHA.charAt( b10 >> 18 ) ); | |||
|       x.push( _ALPHA.charAt( ( b10 >> 12 ) & 0x3F ) ); | |||
|       x.push( _ALPHA.charAt( ( b10 >> 6 ) & 0x3f ) ); | |||
|       x.push( _ALPHA.charAt( b10 & 0x3f ) ); | |||
|     } | |||
| 
 | |||
|     switch ( s.length - imax ) { | |||
|       case 1: | |||
|         b10 = _getbyte( s, i ) << 16; | |||
|         x.push( _ALPHA.charAt( b10 >> 18 ) + _ALPHA.charAt( ( b10 >> 12 ) & 0x3F ) + _PADCHAR + _PADCHAR ); | |||
|         break; | |||
| 
 | |||
|       case 2: | |||
|         b10 = ( _getbyte( s, i ) << 16 ) | ( _getbyte( s, i + 1 ) << 8 ); | |||
|         x.push( _ALPHA.charAt( b10 >> 18 ) + _ALPHA.charAt( ( b10 >> 12 ) & 0x3F ) + _ALPHA.charAt( ( b10 >> 6 ) & 0x3f ) + _PADCHAR ); | |||
|         break; | |||
|     } | |||
| 
 | |||
|     return x.join( "" ); | |||
|   } | |||
| 
 | |||
| 
 | |||
|   return { | |||
|     decode: _decode, | |||
|     encode: _encode, | |||
|     VERSION: _VERSION | |||
|   }; | |||
|        | |||
| }( jQuery ) ); | |||
| 
 | |||
| @ -0,0 +1,255 @@ | |||
| /* @license  | |||
|  * jQuery.print, version 1.5.1 | |||
|  *  (c) Sathvik Ponangi, Doers' Guild | |||
|  * Licence: CC-By (http://creativecommons.org/licenses/by/3.0/)
 | |||
|  *--------------------------------------------------------------------------*/ | |||
| (function ($) { | |||
|     "use strict"; | |||
|     // A nice closure for our definitions
 | |||
|     function getjQueryObject(string) { | |||
|         // Make string a vaild jQuery thing
 | |||
|         var jqObj = $(""); | |||
|         try { | |||
|             jqObj = $(string) | |||
|                 .clone(); | |||
|         } catch (e) { | |||
|             jqObj = $("<span />") | |||
|                 .html(string); | |||
|         } | |||
|         return jqObj; | |||
|     } | |||
| 
 | |||
|     function printFrame(frameWindow, content, options) { | |||
|         // Print the selected window/iframe
 | |||
|         var def = $.Deferred(); | |||
|         try { | |||
|             frameWindow = frameWindow.contentWindow || frameWindow.contentDocument || frameWindow; | |||
|             var wdoc = frameWindow.document || frameWindow.contentDocument || frameWindow; | |||
|             if(options.doctype) { | |||
|                 wdoc.write(options.doctype); | |||
|             } | |||
|             wdoc.write(content); | |||
|             wdoc.close(); | |||
|             var printed = false; | |||
|             var callPrint = function () { | |||
|                 if(printed) { | |||
|                     return; | |||
|                 } | |||
|                 // Fix for IE : Allow it to render the iframe
 | |||
|                 frameWindow.focus(); | |||
|                 try { | |||
|                     // Fix for IE11 - printng the whole page instead of the iframe content
 | |||
|                     if (!frameWindow.document.execCommand('print', false, null)) { | |||
|                         // document.execCommand returns false if it failed -http://stackoverflow.com/a/21336448/937891
 | |||
|                         frameWindow.print(); | |||
|                     } | |||
|                     // focus body as it is losing focus in iPad and content not getting printed
 | |||
|                     $('body').focus(); | |||
|                 } catch (e) { | |||
|                     frameWindow.print(); | |||
|                 } | |||
|                 frameWindow.close(); | |||
|                 printed = true; | |||
|                 def.resolve(); | |||
|             } | |||
|             // Print once the frame window loads - seems to work for the new-window option but unreliable for the iframe
 | |||
|             $(frameWindow).on("load", callPrint); | |||
|             // Fallback to printing directly if the frame doesn't fire the load event for whatever reason
 | |||
|             setTimeout(callPrint, options.timeout); | |||
|         } catch (err) { | |||
|             def.reject(err); | |||
|         } | |||
|         return def; | |||
|     } | |||
| 
 | |||
|     function printContentInIFrame(content, options) { | |||
|         var $iframe = $(options.iframe + ""); | |||
|         var iframeCount = $iframe.length; | |||
|         if (iframeCount === 0) { | |||
|             // Create a new iFrame if none is given
 | |||
|             $iframe = $('<iframe height="0" width="0" border="0" wmode="Opaque"/>') | |||
|                 .prependTo('body') | |||
|                 .css({ | |||
|                     "position": "absolute", | |||
|                     "top": -999, | |||
|                     "left": -999 | |||
|                 }); | |||
|         } | |||
|         var frameWindow = $iframe.get(0); | |||
|         return printFrame(frameWindow, content, options) | |||
|             .done(function () { | |||
|                 // Success
 | |||
|                 setTimeout(function () { | |||
|                     // Wait for IE
 | |||
|                     if (iframeCount === 0) { | |||
|                         // Destroy the iframe if created here
 | |||
|                         $iframe.remove(); | |||
|                     } | |||
|                 }, 1000); | |||
|             }) | |||
|             .fail(function (err) { | |||
|                 // Use the pop-up method if iframe fails for some reason
 | |||
|                 console.error("Failed to print from iframe", err); | |||
|                 printContentInNewWindow(content, options); | |||
|             }) | |||
|             .always(function () { | |||
|                 try { | |||
|                     options.deferred.resolve(); | |||
|                 } catch (err) { | |||
|                     console.warn('Error notifying deferred', err); | |||
|                 } | |||
|             }); | |||
|     } | |||
| 
 | |||
|     function printContentInNewWindow(content, options) { | |||
|         // Open a new window and print selected content
 | |||
|         var frameWindow = window.open(); | |||
|         return printFrame(frameWindow, content, options) | |||
|             .always(function () { | |||
|                 try { | |||
|                     options.deferred.resolve(); | |||
|                 } catch (err) { | |||
|                     console.warn('Error notifying deferred', err); | |||
|                 } | |||
|             }); | |||
|     } | |||
| 
 | |||
|     function isNode(o) { | |||
|         /* http://stackoverflow.com/a/384380/937891 */ | |||
|         return !!(typeof Node === "object" ? o instanceof Node : o && typeof o === "object" && typeof o.nodeType === "number" && typeof o.nodeName === "string"); | |||
|     } | |||
|     $.print = $.fn.print = function () { | |||
|         // Print a given set of elements
 | |||
|         var options, $this, self = this; | |||
|         // console.log("Printing", this, arguments);
 | |||
|         if (self instanceof $) { | |||
|             // Get the node if it is a jQuery object
 | |||
|             self = self.get(0); | |||
|         } | |||
|         if (isNode(self)) { | |||
|             // If `this` is a HTML element, i.e. for
 | |||
|             // $(selector).print()
 | |||
|             $this = $(self); | |||
|             if (arguments.length > 0) { | |||
|                 options = arguments[0]; | |||
|             } | |||
|         } else { | |||
|             if (arguments.length > 0) { | |||
|                 // $.print(selector,options)
 | |||
|                 $this = $(arguments[0]); | |||
|                 if (isNode($this[0])) { | |||
|                     if (arguments.length > 1) { | |||
|                         options = arguments[1]; | |||
|                     } | |||
|                 } else { | |||
|                     // $.print(options)
 | |||
|                     options = arguments[0]; | |||
|                     $this = $("html"); | |||
|                 } | |||
|             } else { | |||
|                 // $.print()
 | |||
|                 $this = $("html"); | |||
|             } | |||
|         } | |||
|         // Default options
 | |||
|         var defaults = { | |||
|             globalStyles: true, | |||
|             mediaPrint: false, | |||
|             stylesheet: null, | |||
|             noPrintSelector: ".no-print", | |||
|             iframe: true, | |||
|             append: null, | |||
|             prepend: null, | |||
|             manuallyCopyFormValues: true, | |||
|             deferred: $.Deferred(), | |||
|             timeout: 750, | |||
|             title: null, | |||
|             doctype: '<!doctype html>' | |||
|         }; | |||
|         // Merge with user-options
 | |||
|         options = $.extend({}, defaults, (options || {})); | |||
|         var $styles = $(""); | |||
|         if (options.globalStyles) { | |||
|             // Apply the stlyes from the current sheet to the printed page
 | |||
|             $styles = $("style, link, meta, base, title"); | |||
|         } else if (options.mediaPrint) { | |||
|             // Apply the media-print stylesheet
 | |||
|             $styles = $("link[media=print]"); | |||
|         } | |||
|         if (options.stylesheet) { | |||
|             // Add a custom stylesheet if given
 | |||
|             $styles = $.merge($styles, $('<link rel="stylesheet" href="' + options.stylesheet + '">')); | |||
|         } | |||
|         // Create a copy of the element to print
 | |||
|         var copy = $this.clone(); | |||
|         // Wrap it in a span to get the HTML markup string
 | |||
|         copy = $("<span/>") | |||
|             .append(copy); | |||
|         // Remove unwanted elements
 | |||
|         copy.find(options.noPrintSelector) | |||
|             .remove(); | |||
|         // Add in the styles
 | |||
|         copy.append($styles.clone()); | |||
|         // Update title
 | |||
|         if (options.title) { | |||
|             var title = $("title", copy); | |||
|             if (title.length === 0) { | |||
|                 title = $("<title />"); | |||
|                 copy.append(title);                 | |||
|             } | |||
|             title.text(options.title);             | |||
|         } | |||
|         // Appedned content
 | |||
|         copy.append(getjQueryObject(options.append)); | |||
|         // Prepended content
 | |||
|         copy.prepend(getjQueryObject(options.prepend)); | |||
|         if (options.manuallyCopyFormValues) { | |||
|             // Manually copy form values into the HTML for printing user-modified input fields
 | |||
|             // http://stackoverflow.com/a/26707753
 | |||
|             copy.find("input") | |||
|                 .each(function () { | |||
|                     var $field = $(this); | |||
|                     if ($field.is("[type='radio']") || $field.is("[type='checkbox']")) { | |||
|                         if ($field.prop("checked")) { | |||
|                             $field.attr("checked", "checked"); | |||
|                         } | |||
|                     } else { | |||
|                         $field.attr("value", $field.val()); | |||
|                     } | |||
|                 }); | |||
|             copy.find("select").each(function () { | |||
|                 var $field = $(this); | |||
|                 $field.find(":selected").attr("selected", "selected"); | |||
|             }); | |||
|             copy.find("textarea").each(function () { | |||
|                 // Fix for https://github.com/DoersGuild/jQuery.print/issues/18#issuecomment-96451589
 | |||
|                 var $field = $(this); | |||
|                 $field.text($field.val()); | |||
|             }); | |||
|         } | |||
|         // Get the HTML markup string
 | |||
|         var content = copy.html(); | |||
|         // Notify with generated markup & cloned elements - useful for logging, etc
 | |||
|         try { | |||
|             options.deferred.notify('generated_markup', content, copy); | |||
|         } catch (err) { | |||
|             console.warn('Error notifying deferred', err); | |||
|         } | |||
|         // Destroy the copy
 | |||
|         copy.remove(); | |||
|         if (options.iframe) { | |||
|             // Use an iframe for printing
 | |||
|             try { | |||
|                 printContentInIFrame(content, options); | |||
|             } catch (e) { | |||
|                 // Use the pop-up method if iframe fails for some reason
 | |||
|                 console.error("Failed to print from iframe", e.stack, e.message); | |||
|                 printContentInNewWindow(content, options); | |||
|             } | |||
|         } else { | |||
|             // Use a new window for printing
 | |||
|             printContentInNewWindow(content, options); | |||
|         } | |||
|         return this; | |||
|     }; | |||
| })(jQuery); | |||
| After Width: | Height: | Size: 601 B | 
| After Width: | Height: | Size: 580 B | 
| After Width: | Height: | Size: 570 B | 
| After Width: | Height: | Size: 762 B | 
| After Width: | Height: | Size: 399 B | 
| After Width: | Height: | Size: 710 B | 
| After Width: | Height: | Size: 432 B | 
| After Width: | Height: | Size: 534 B | 
| After Width: | Height: | Size: 529 B | 
| After Width: | Height: | Size: 467 B | 
| After Width: | Height: | Size: 45 B | 
| After Width: | Height: | Size: 381 B | 
| After Width: | Height: | Size: 5.4 KiB | 
| After Width: | Height: | Size: 14 KiB | 
| @ -0,0 +1,97 @@ | |||
| /*------------------------------------- | |||
| zTree Style | |||
| 
 | |||
| version:	3.5.19 | |||
| author:		Hunter.z | |||
| email:		hunter.z@263.net | |||
| website:	http://code.google.com/p/jquerytree/ | |||
| 
 | |||
| -------------------------------------*/ | |||
| 
 | |||
| .ztree * {padding:0; margin:0; font-size:12px; font-family: Verdana, Arial, Helvetica, AppleGothic, sans-serif} | |||
| .ztree {margin:0; padding:5px; color:#333} | |||
| .ztree li{padding:0; margin:0; list-style:none; line-height:14px; text-align:left; white-space:nowrap; outline:0} | |||
| .ztree li ul{ margin:0; padding:0 0 0 18px} | |||
| .ztree li ul.line{ background:url(./img/line_conn.gif) 0 0 repeat-y;} | |||
| 
 | |||
| .ztree li a {padding:1px 3px 0 0; margin:0; cursor:pointer; height:17px; color:#333; background-color: transparent; | |||
| 	text-decoration:none; vertical-align:top; display: inline-block} | |||
| .ztree li a:hover {text-decoration:underline} | |||
| .ztree li a.curSelectedNode {padding-top:0px; background-color:#FFE6B0; color:black; height:16px; border:1px #FFB951 solid; opacity:0.8;} | |||
| .ztree li a.curSelectedNode_Edit {padding-top:0px; background-color:#FFE6B0; color:black; height:16px; border:1px #FFB951 solid; opacity:0.8;} | |||
| .ztree li a.tmpTargetNode_inner {padding-top:0px; background-color:#316AC5; color:white; height:16px; border:1px #316AC5 solid; | |||
| 	opacity:0.8; filter:alpha(opacity=80)} | |||
| .ztree li a.tmpTargetNode_prev {} | |||
| .ztree li a.tmpTargetNode_next {} | |||
| .ztree li a input.rename {height:14px; width:80px; padding:0; margin:0; | |||
| 	font-size:12px; border:1px #7EC4CC solid; *border:0px} | |||
| .ztree li span {line-height:16px; margin-right:2px} | |||
| .ztree li span.button {line-height:0; margin:0; width:16px; height:16px; display: inline-block; vertical-align:middle; | |||
| 	border:0 none; cursor: pointer;outline:none; | |||
| 	background-color:transparent; background-repeat:no-repeat; background-attachment: scroll; | |||
| 	background-image:url("./img/zTreeStandard.png"); *background-image:url("./img/zTreeStandard.gif")} | |||
| 
 | |||
| .ztree li span.button.chk {width:13px; height:13px; margin:0 3px 0 0; cursor: auto} | |||
| .ztree li span.button.chk.checkbox_false_full {background-position:0 0} | |||
| .ztree li span.button.chk.checkbox_false_full_focus {background-position:0 -14px} | |||
| .ztree li span.button.chk.checkbox_false_part {background-position:0 -28px} | |||
| .ztree li span.button.chk.checkbox_false_part_focus {background-position:0 -42px} | |||
| .ztree li span.button.chk.checkbox_false_disable {background-position:0 -56px} | |||
| .ztree li span.button.chk.checkbox_true_full {background-position:-14px 0} | |||
| .ztree li span.button.chk.checkbox_true_full_focus {background-position:-14px -14px} | |||
| .ztree li span.button.chk.checkbox_true_part {background-position:-14px -28px} | |||
| .ztree li span.button.chk.checkbox_true_part_focus {background-position:-14px -42px} | |||
| .ztree li span.button.chk.checkbox_true_disable {background-position:-14px -56px} | |||
| .ztree li span.button.chk.radio_false_full {background-position:-28px 0} | |||
| .ztree li span.button.chk.radio_false_full_focus {background-position:-28px -14px} | |||
| .ztree li span.button.chk.radio_false_part {background-position:-28px -28px} | |||
| .ztree li span.button.chk.radio_false_part_focus {background-position:-28px -42px} | |||
| .ztree li span.button.chk.radio_false_disable {background-position:-28px -56px} | |||
| .ztree li span.button.chk.radio_true_full {background-position:-42px 0} | |||
| .ztree li span.button.chk.radio_true_full_focus {background-position:-42px -14px} | |||
| .ztree li span.button.chk.radio_true_part {background-position:-42px -28px} | |||
| .ztree li span.button.chk.radio_true_part_focus {background-position:-42px -42px} | |||
| .ztree li span.button.chk.radio_true_disable {background-position:-42px -56px} | |||
| 
 | |||
| .ztree li span.button.switch {width:18px; height:18px} | |||
| .ztree li span.button.root_open{background-position:-92px -54px} | |||
| .ztree li span.button.root_close{background-position:-74px -54px} | |||
| .ztree li span.button.roots_open{background-position:-92px 0} | |||
| .ztree li span.button.roots_close{background-position:-74px 0} | |||
| .ztree li span.button.center_open{background-position:-92px -18px} | |||
| .ztree li span.button.center_close{background-position:-74px -18px} | |||
| .ztree li span.button.bottom_open{background-position:-92px -36px} | |||
| .ztree li span.button.bottom_close{background-position:-74px -36px} | |||
| .ztree li span.button.noline_open{background-position:-92px -72px} | |||
| .ztree li span.button.noline_close{background-position:-74px -72px} | |||
| .ztree li span.button.root_docu{ background:none;} | |||
| .ztree li span.button.roots_docu{background-position:-56px 0} | |||
| .ztree li span.button.center_docu{background-position:-56px -18px} | |||
| .ztree li span.button.bottom_docu{background-position:-56px -36px} | |||
| .ztree li span.button.noline_docu{ background:none;} | |||
| 
 | |||
| .ztree li span.button.ico_open{margin-right:2px; background-position:-110px -16px; vertical-align:top; *vertical-align:middle} | |||
| .ztree li span.button.ico_close{margin-right:2px; background-position:-110px 0; vertical-align:top; *vertical-align:middle} | |||
| .ztree li span.button.ico_docu{margin-right:2px; background-position:-110px -32px; vertical-align:top; *vertical-align:middle} | |||
| .ztree li span.button.edit {margin-right:2px; background-position:-110px -48px; vertical-align:top; *vertical-align:middle} | |||
| .ztree li span.button.remove {margin-right:2px; background-position:-110px -64px; vertical-align:top; *vertical-align:middle} | |||
| 
 | |||
| .ztree li span.button.ico_loading{margin-right:2px; background:url(./img/loading.gif) no-repeat scroll 0 0 transparent; vertical-align:top; *vertical-align:middle} | |||
| 
 | |||
| ul.tmpTargetzTree {background-color:#FFE6B0; opacity:0.8; filter:alpha(opacity=80)} | |||
| 
 | |||
| span.tmpzTreeMove_arrow {width:16px; height:16px; display: inline-block; padding:0; margin:2px 0 0 1px; border:0 none; position:absolute; | |||
| 	background-color:transparent; background-repeat:no-repeat; background-attachment: scroll; | |||
| 	background-position:-110px -80px; background-image:url("./img/zTreeStandard.png"); *background-image:url("./img/zTreeStandard.gif")} | |||
| 
 | |||
| ul.ztree.zTreeDragUL {margin:0; padding:0; position:absolute; width:auto; height:auto;overflow:hidden; background-color:#cfcfcf; border:1px #00B83F dotted; opacity:0.8; filter:alpha(opacity=80)} | |||
| .zTreeMask {z-index:10000; background-color:#cfcfcf; opacity:0.0; filter:alpha(opacity=0); position:absolute} | |||
| 
 | |||
| /* level style*/ | |||
| /*.ztree li span.button.level0 { | |||
| 	display:none; | |||
| } | |||
| .ztree li ul.level0 { | |||
| 	padding:0; | |||
| 	background:none; | |||
| }*/ | |||
| @ -0,0 +1,7 @@ | |||
| /** | |||
| * 选择列表插件 | |||
| * varstion 2.0.0 | |||
| * by Houfeng | |||
| * Houfeng@DCloud.io | |||
| **/ | |||
| .mui-pciker-list li,.mui-picker,.mui-picker-inner{box-sizing:border-box;overflow:hidden}.mui-picker{background-color:#ddd;position:relative;height:200px;border:1px solid rgba(0,0,0,.1);-webkit-user-select:none;user-select:none}.mui-dtpicker,.mui-poppicker{left:0;background-color:#eee;box-shadow:0 -5px 7px 0 rgba(0,0,0,.1);-webkit-transition:.3s;width:100%}.mui-picker-inner{position:relative;width:100%;height:100%;-webkit-mask-box-image:-webkit-linear-gradient(bottom,transparent,transparent 5%,#fff 20%,#fff 80%,transparent 95%,transparent);-webkit-mask-box-image:linear-gradient(top,transparent,transparent 5%,#fff 20%,#fff 80%,transparent 95%,transparent)}.mui-pciker-list,.mui-pciker-rule{box-sizing:border-box;padding:0;margin:-18px 0 0;width:100%;height:36px;line-height:36px;position:absolute;left:0;top:50%}.mui-pciker-rule-bg{z-index:0}.mui-pciker-rule-ft{z-index:2;border-top:solid 1px rgba(0,0,0,.1);border-bottom:solid 1px rgba(0,0,0,.1)}.mui-pciker-list{z-index:1;-webkit-transform-style:preserve-3d;transform-style:preserve-3d;-webkit-transform:perspective(750pt) rotateY(0) rotateX(0);transform:perspective(750pt) rotateY(0) rotateX(0)}.mui-pciker-list li{width:100%;height:100%;position:absolute;text-align:center;vertical-align:middle;-webkit-backface-visibility:hidden;backface-visibility:hidden;font-size:1pc;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;color:#888;padding:0 8px;white-space:nowrap;-webkit-text-overflow:ellipsis;text-overflow:ellipsis;cursor:default;visibility:hidden}.mui-pciker-list li.highlight,.mui-pciker-list li.visible{visibility:visible}.mui-pciker-list li.highlight{color:#222}.mui-poppicker{position:fixed;z-index:999;border-top:solid 1px #ccc;bottom:0;-webkit-transform:translateY(300px)}.mui-poppicker.mui-active{-webkit-transform:translateY(0)}.mui-android-5-1 .mui-poppicker{bottom:-300px;-webkit-transition-property:bottom;-webkit-transform:none}.mui-android-5-1 .mui-poppicker.mui-active{bottom:0;-webkit-transition-property:bottom;-webkit-transform:none}.mui-poppicker-header{padding:6px;font-size:14px;color:#888}.mui-poppicker-header .mui-btn{font-size:9pt;padding:5px 10px}.mui-poppicker-btn-cancel{float:left}.mui-poppicker-btn-ok{float:right}.mui-poppicker-clear{clear:both;height:0;line-height:0;font-size:0;overflow:hidden}.mui-poppicker-body{position:relative;width:100%;height:200px;border-top:solid 1px #ddd}.mui-poppicker-body .mui-picker{width:100%;height:100%;margin:0;border:none;float:left}.mui-dtpicker{position:fixed;z-index:999999;border-top:solid 1px #ccc;bottom:0;-webkit-transform:translateY(300px)}.mui-dtpicker.mui-active{-webkit-transform:translateY(0)}.mui-dtpicker-active-for-page{overflow:hidden!important}.mui-android-5-1 .mui-dtpicker{bottom:-300px;-webkit-transition-property:bottom;-webkit-transform:none}.mui-android-5-1 .mui-dtpicker.mui-active{bottom:0;-webkit-transition-property:bottom;-webkit-transform:none}.mui-dtpicker-header{padding:6px;font-size:14px;color:#888}.mui-dtpicker-header button{font-size:9pt;padding:5px 10px}.mui-dtpicker-header button:last-child{float:right}.mui-dtpicker-body{position:relative;width:100%;height:200px}.mui-ios .mui-dtpicker-body{-webkit-perspective:75pc;perspective:75pc;-webkit-transform-style:preserve-3d;transform-style:preserve-3d}.mui-dtpicker-title h5{display:inline-block;width:20%;margin:0;padding:8px;text-align:center;border-top:solid 1px #ddd;background-color:#f0f0f0;border-bottom:solid 1px #ccc}[data-type=hour] [data-id=title-i],[data-type=hour] [data-id=picker-i],[data-type=month] [data-id=title-i],[data-type=month] [data-id=picker-d],[data-type=month] [data-id=title-d],[data-type=month] [data-id=picker-h],[data-type=month] [data-id=title-h],[data-type=month] [data-id=picker-i],[data-type=time] [data-id=picker-y],[data-type=time] [data-id=picker-m],[data-type=time] [data-id=picker-d],[data-type=time] [data-id=title-y],[data-type=time] [data-id=title-m],[data-type=time] [data-id=title-d],[data-type=date] [data-id=title-i],[data-type=date] [data-id=picker-h],[data-type=date] [data-id=title-h],[data-type=date] [data-id=picker-i]{display:none}.mui-dtpicker .mui-picker{width:20%;height:100%;margin:0;float:left;border:none}[data-type=hour] [data-id=picker-h],[data-type=hour] [data-id=title-h],[data-type=datetime] [data-id=picker-h],[data-type=datetime] [data-id=title-h]{border-left:dotted 1px #ccc}[data-type=datetime] .mui-picker,[data-type=time] .mui-dtpicker-title h5{width:20%}[data-type=date] .mui-dtpicker-title h5,[data-type=date] .mui-picker{width:33.3%}[data-type=hour] .mui-dtpicker-title h5,[data-type=hour] .mui-picker{width:25%}[data-type=month] .mui-dtpicker-title h5,[data-type=month] .mui-picker,[data-type=time] .mui-dtpicker-title h5,[data-type=time] .mui-picker{width:50%} | |||
| @ -0,0 +1,519 @@ | |||
| /** @license | |||
| jSignature v2 SVG export plugin. | |||
| 
 | |||
| */ | |||
| /** | |||
| Copyright (c) 2012 Willow Systems Corp http://willow-systems.com
 | |||
| MIT License <http://www.opensource.org/licenses/mit-license.php>
 | |||
| */ | |||
| 
 | |||
| ;(function(){ | |||
| 	'use strict' | |||
| 		 | |||
| /** @preserve | |||
| Simplify.js BSD  | |||
| (c) 2012, Vladimir Agafonkin | |||
| mourner.github.com/simplify-js | |||
| 
 | |||
| */ | |||
| 	;(function(a,b){function c(a,b){var c=a.x-b.x,d=a.y-b.y;return c*c+d*d}function d(a,b,c){var d=b.x,e=b.y,f=c.x-d,g=c.y-e,h;if(f!==0||g!==0)h=((a.x-d)*f+(a.y-e)*g)/(f*f+g*g),h>1?(d=c.x,e=c.y):h>0&&(d+=f*h,e+=g*h);return f=a.x-d,g=a.y-e,f*f+g*g}function e(a,b){var d,e=a.length,f,g=a[0],h=[g];for(d=1;d<e;d++)f=a[d],c(f,g)>b&&(h.push(f),g=f);return g!==f&&h.push(f),h}function f(a,c){var e=a.length,f=typeof Uint8Array!=b+""?Uint8Array:Array,g=new f(e),h=0,i=e-1,j,k,l,m,n=[],o=[],p=[];g[h]=g[i]=1;while(i){k=0;for(j=h+1;j<i;j++)l=d(a[j],a[h],a[i]),l>k&&(m=j,k=l);k>c&&(g[m]=1,n.push(h),o.push(m),n.push(m),o.push(i)),h=n.pop(),i=o.pop()}for(j=0;j<e;j++)g[j]&&p.push(a[j]);return p}"use strict";var g=a;g.simplify=function(a,c,d){var g=c!==b?c*c:1;return d||(a=e(a,g)),a=f(a,g),a}})(window); | |||
| 
 | |||
| 
 | |||
| 	/** | |||
| 	Vector class. Allows us to simplify representation and manipulation of coordinate-pair | |||
| 	representing shift against (0, 0) | |||
| 
 | |||
| 	@public | |||
| 	@class | |||
| 	@param | |||
| 	@returns {Type} | |||
| 	*/ | |||
| 	function Vector(x,y){ | |||
| 		this.x = x | |||
| 		this.y = y | |||
| 		this.reverse = function(){ | |||
| 			return new this.constructor(  | |||
| 				this.x * -1 | |||
| 				, this.y * -1 | |||
| 			) | |||
| 		} | |||
| 		this._length = null | |||
| 		this.getLength = function(){ | |||
| 			if (!this._length){ | |||
| 				this._length = Math.sqrt( Math.pow(this.x, 2) + Math.pow(this.y, 2) ) | |||
| 			} | |||
| 			return this._length | |||
| 		} | |||
| 		 | |||
| 		var polarity = function (e){ | |||
| 			return Math.round(e / Math.abs(e)) | |||
| 		} | |||
| 		this.resizeTo = function(length){ | |||
| 			// proportionally changes x,y such that the hypotenuse (vector length) is = new length
 | |||
| 			if (this.x === 0 && this.y === 0){ | |||
| 				this._length = 0 | |||
| 			} else if (this.x === 0){ | |||
| 				this._length = length | |||
| 				this.y = length * polarity(this.y) | |||
| 			} else if(this.y === 0){ | |||
| 				this._length = length | |||
| 				this.x = length * polarity(this.x) | |||
| 			} else { | |||
| 				var proportion = Math.abs(this.y / this.x) | |||
| 					, x = Math.sqrt(Math.pow(length, 2) / (1 + Math.pow(proportion, 2))) | |||
| 					, y = proportion * x | |||
| 				this._length = length | |||
| 				this.x = x * polarity(this.x) | |||
| 				this.y = y * polarity(this.y) | |||
| 			} | |||
| 			return this | |||
| 		} | |||
| 		 | |||
| 		/** | |||
| 		 * Calculates the angle between 'this' vector and another. | |||
| 		 * @public | |||
| 		 * @function | |||
| 		 * @returns {Number} The angle between the two vectors as measured in PI.  | |||
| 		 */ | |||
| 		this.angleTo = function(vectorB) { | |||
| 			var divisor = this.getLength() * vectorB.getLength() | |||
| 			if (divisor === 0) { | |||
| 				return 0 | |||
| 			} else { | |||
| 				// JavaScript floating point math is screwed up.
 | |||
| 				// because of it, the core of the formula can, on occasion, have values
 | |||
| 				// over 1.0 and below -1.0.
 | |||
| 				return Math.acos( | |||
| 					Math.min(  | |||
| 						Math.max(  | |||
| 							( this.x * vectorB.x + this.y * vectorB.y ) / divisor | |||
| 							, -1.0 | |||
| 						) | |||
| 						, 1.0 | |||
| 					) | |||
| 				) / Math.PI | |||
| 			} | |||
| 		} | |||
| 	} | |||
| 
 | |||
| 	function Point(x,y){ | |||
| 		this.x = x | |||
| 		this.y = y | |||
| 		 | |||
| 		this.getVectorToCoordinates = function (x, y) { | |||
| 			return new Vector(x - this.x, y - this.y) | |||
| 		} | |||
| 		this.getVectorFromCoordinates = function (x, y) { | |||
| 			return this.getVectorToCoordinates(x, y).reverse() | |||
| 		} | |||
| 		this.getVectorToPoint = function (point) { | |||
| 			return new Vector(point.x - this.x, point.y - this.y) | |||
| 		} | |||
| 		this.getVectorFromPoint = function (point) { | |||
| 			return this.getVectorToPoint(point).reverse() | |||
| 		} | |||
| 	} | |||
| 
 | |||
| 	/** | |||
| 	Allows one to round a number to arbitrary precision. | |||
| 	Math.round() rounds to whole only. | |||
| 	Number.toFixed(precision) returns a string. | |||
| 	I need float to float, but with arbitrary precision, hence: | |||
| 
 | |||
| 	@public | |||
| 	@function | |||
| 	@param number {Number} | |||
| 	@param position {Number} number of digits right of decimal point to keep. If negative, rounding to the left of decimal. | |||
| 	@returns {Type} | |||
| 	*/ | |||
| 	function round (number, position){ | |||
| 		var tmp = Math.pow(10, position) | |||
| 		return Math.round( number * tmp ) / tmp | |||
| 	} | |||
| 
 | |||
| 	//	/**
 | |||
| 	//	 * This is a simple, points-to-lines (not curves) renderer. 
 | |||
| 	//	 * Keeping it around so we can activate it from time to time and see
 | |||
| 	//	 * if smoothing logic is off much.
 | |||
| 	//	 * @public
 | |||
| 	//	 * @function
 | |||
| 	//	 * @returns {String} Like so "l 1 2 3 5' with stroke as long line chain. 
 | |||
| 	//	 */
 | |||
| 	//	function compressstroke(stroke, shiftx, shifty){
 | |||
| 	//		// we combine strokes data into string like this:
 | |||
| 	//		// 'M 53 7 l 1 2 3 4 -5 -6 5 -6'
 | |||
| 	//		// see SVG documentation for Path element's 'd' argument.
 | |||
| 	//		var lastx = stroke.x[0]
 | |||
| 	//		, lasty = stroke.y[0]
 | |||
| 	//		, i
 | |||
| 	//		, l = stroke.x.length
 | |||
| 	//		, answer = ['M', lastx - shiftx, lasty - shifty, 'l']
 | |||
| 	//		
 | |||
| 	//		if (l === 1){
 | |||
| 	//			// meaning this was just a DOT, not a stroke.
 | |||
| 	//			// instead of creating a circle, we just create a short line
 | |||
| 	//			answer.concat(1, -1)
 | |||
| 	//		} else {
 | |||
| 	//			for(i = 1; i < l; i++){
 | |||
| 	//				answer = answer.concat(stroke.x[i] - lastx, stroke.y[i] - lasty)
 | |||
| 	//				lastx = stroke.x[i]
 | |||
| 	//				lasty = stroke.y[i]
 | |||
| 	//			}
 | |||
| 	//		}
 | |||
| 	//		return answer.join(' ')
 | |||
| 	//	} 
 | |||
| 
 | |||
| 	function segmentToCurve(stroke, positionInStroke, lineCurveThreshold){ | |||
| 		'use strict' | |||
| 		// long lines (ones with many pixels between them) do not look good when they are part of a large curvy stroke.
 | |||
| 		// You know, the jaggedy crocodile spine instead of a pretty, smooth curve. Yuck!
 | |||
| 		// We want to approximate pretty curves in-place of those ugly lines.
 | |||
| 		// To approximate a very nice curve we need to know the direction of line before and after.
 | |||
| 		// Hence, on long lines we actually wait for another point beyond it to come back from
 | |||
| 		// mousemoved before we draw this curve.
 | |||
| 		 | |||
| 		// So for "prior curve" to be calc'ed we need 4 points 
 | |||
| 		// 	A, B, C, D (we are on D now, A is 3 points in the past.)
 | |||
| 		// and 3 lines:
 | |||
| 		//  pre-line (from points A to B), 
 | |||
| 		//  this line (from points B to C), (we call it "this" because if it was not yet, it's the only one we can draw for sure.) 
 | |||
| 		//  post-line (from points C to D) (even through D point is 'current' we don't know how we can draw it yet)
 | |||
| 		//
 | |||
| 		// Well, actually, we don't need to *know* the point A, just the vector A->B
 | |||
| 
 | |||
| 		// Again, we can only derive curve between points positionInStroke-1 and positionInStroke
 | |||
| 		// Thus, since we can only draw a line if we know one point ahead of it, we need to shift our focus one point ahead.
 | |||
| 		positionInStroke += 1 | |||
| 		// Let's hope the code that calls us knows we do that and does not call us with positionInStroke = index of last point.
 | |||
| 		 | |||
| 		var Cpoint = new Point(stroke.x[positionInStroke-1], stroke.y[positionInStroke-1]) | |||
| 			, Dpoint = new Point(stroke.x[positionInStroke], stroke.y[positionInStroke]) | |||
| 			, CDvector = Cpoint.getVectorToPoint(Dpoint) | |||
| 		// Again, we have a chance here to draw only PREVIOUS line segment - BC
 | |||
| 		 | |||
| 		// So, let's start with BC curve.
 | |||
| 		// if there is only 2 points in stroke array (C, D), we don't have "history" long enough to have point B, let alone point A.
 | |||
| 		// so positionInStroke should start with 2, ie
 | |||
| 		// we are here when there are at least 3 points in stroke array.
 | |||
| 		var Bpoint = new Point(stroke.x[positionInStroke-2], stroke.y[positionInStroke-2]) | |||
| 		, BCvector = Bpoint.getVectorToPoint(Cpoint) | |||
| 		, ABvector | |||
| 		, rounding = 2 | |||
| 		 | |||
| 		if ( BCvector.getLength() > lineCurveThreshold ){ | |||
| 			// Yey! Pretty curves, here we come!
 | |||
| 			if(positionInStroke > 2) { | |||
| 				ABvector = (new Point(stroke.x[positionInStroke-3], stroke.y[positionInStroke-3])).getVectorToPoint(Bpoint) | |||
| 			} else { | |||
| 				ABvector = new Vector(0,0) | |||
| 			} | |||
| 			var minlenfraction = 0.05 | |||
| 			, maxlen = BCvector.getLength() * 0.35 | |||
| 			, ABCangle = BCvector.angleTo(ABvector.reverse()) | |||
| 			, BCDangle = CDvector.angleTo(BCvector.reverse()) | |||
| 			, BtoCP1vector = new Vector(ABvector.x + BCvector.x, ABvector.y + BCvector.y).resizeTo( | |||
| 				Math.max(minlenfraction, ABCangle) * maxlen | |||
| 			) | |||
| 			, CtoCP2vector = (new Vector(BCvector.x + CDvector.x, BCvector.y + CDvector.y)).reverse().resizeTo( | |||
| 				Math.max(minlenfraction, BCDangle) * maxlen | |||
| 			) | |||
| 			, BtoCP2vector = new Vector(BCvector.x + CtoCP2vector.x, BCvector.y + CtoCP2vector.y) | |||
| 			 | |||
| 			// returing curve for BC segment
 | |||
| 			// all coords are vectors against Bpoint
 | |||
| 			return [ | |||
| 				'c' // bezier curve
 | |||
| 				, round( BtoCP1vector.x, rounding ) | |||
| 				, round( BtoCP1vector.y, rounding ) | |||
| 				, round( BtoCP2vector.x, rounding ) | |||
| 				, round( BtoCP2vector.y, rounding ) | |||
| 				, round( BCvector.x, rounding ) | |||
| 				, round( BCvector.y, rounding ) | |||
| 			] | |||
| 		} else { | |||
| 			return [ | |||
| 				'l' // line
 | |||
| 				, round( BCvector.x, rounding ) | |||
| 				, round( BCvector.y, rounding ) | |||
| 			] | |||
| 		} | |||
| 	} | |||
| 
 | |||
| 	function lastSegmentToCurve(stroke, lineCurveThreshold){ | |||
| 		'use strict' | |||
| 		// Here we tidy up things left unfinished
 | |||
| 		 | |||
| 		// What's left unfinished there is the curve between the last points
 | |||
| 		// in the stroke
 | |||
| 		// We can also be called when there is only one point in the stroke (meaning, the 
 | |||
| 		// stroke was just a dot), in which case there is nothing for us to do.
 | |||
| 
 | |||
| 		// So for "this curve" to be calc'ed we need 3 points 
 | |||
| 		// 	A, B, C
 | |||
| 		// and 2 lines:
 | |||
| 		//  pre-line (from points A to B), 
 | |||
| 		//  this line (from points B to C) 
 | |||
| 		// Well, actually, we don't need to *know* the point A, just the vector A->B
 | |||
| 		// so, we really need points B, C and AB vector.
 | |||
| 		var positionInStroke = stroke.x.length - 1 | |||
| 		 | |||
| 		// there must be at least 2 points in the stroke.for us to work. Hope calling code checks for that.
 | |||
| 		var Cpoint = new Point(stroke.x[positionInStroke], stroke.y[positionInStroke]) | |||
| 		, Bpoint = new Point(stroke.x[positionInStroke-1], stroke.y[positionInStroke-1]) | |||
| 		, BCvector = Bpoint.getVectorToPoint(Cpoint) | |||
| 		, rounding = 2 | |||
| 		 | |||
| 		if (positionInStroke > 1 && BCvector.getLength() > lineCurveThreshold){ | |||
| 			// we have at least 3 elems in stroke
 | |||
| 			var ABvector = (new Point(stroke.x[positionInStroke-2], stroke.y[positionInStroke-2])).getVectorToPoint(Bpoint) | |||
| 			, ABCangle = BCvector.angleTo(ABvector.reverse()) | |||
| 			, minlenfraction = 0.05 | |||
| 			, maxlen = BCvector.getLength() * 0.35 | |||
| 			, BtoCP1vector = new Vector(ABvector.x + BCvector.x, ABvector.y + BCvector.y).resizeTo( | |||
| 				Math.max(minlenfraction, ABCangle) * maxlen | |||
| 			) | |||
| 			 | |||
| 			return [ | |||
| 				'c' // bezier curve
 | |||
| 				, round( BtoCP1vector.x, rounding ) | |||
| 				, round( BtoCP1vector.y, rounding ) | |||
| 				, round( BCvector.x, rounding ) // CP2 is same as Cpoint
 | |||
| 				, round( BCvector.y, rounding ) // CP2 is same as Cpoint
 | |||
| 				, round( BCvector.x, rounding ) | |||
| 				, round( BCvector.y, rounding ) | |||
| 			] | |||
| 		} else { | |||
| 			// Since there is no AB leg, there is no curve to draw. This is just line
 | |||
| 			return [ | |||
| 				'l' // simple line
 | |||
| 				, round( BCvector.x, rounding ) | |||
| 				, round( BCvector.y, rounding ) | |||
| 			] | |||
| 		} | |||
| 	} | |||
| 
 | |||
| 	function addstroke(stroke, shiftx, shifty){ | |||
| 		'use strict' | |||
| 		// we combine strokes data into string like this:
 | |||
| 		// 'M 53 7 l 1 2 c 3 4 -5 -6 5 -6'
 | |||
| 		// see SVG documentation for Path element's 'd' argument.
 | |||
| 		var lines = [ | |||
| 			'M' // move to
 | |||
| 			, round( (stroke.x[0] - shiftx), 2) | |||
| 			, round( (stroke.y[0] - shifty), 2) | |||
| 		] | |||
| 		// processing all points but first and last. 
 | |||
| 		, i = 1 // index zero item in there is STARTING point. we already extracted it.
 | |||
| 		, l = stroke.x.length - 1 // this is a trick. We are leaving last point coordinates for separate processing.
 | |||
| 		, lineCurveThreshold = 1 | |||
| 		 | |||
| 		for(; i < l; i++){ | |||
| 			lines.push.apply(lines, segmentToCurve(stroke, i, lineCurveThreshold)) | |||
| 		} | |||
| 		if (l > 0 /* effectively more than 1, since we "-1" above */){ | |||
| 			lines.push.apply(lines, lastSegmentToCurve(stroke, i, lineCurveThreshold)) | |||
| 		} else if (l === 0){ | |||
| 			// meaning we only have ONE point in the stroke (and otherwise refer to the stroke as "dot")
 | |||
| 			lines.push.apply(lines, ['l' , 1, 1]) | |||
| 		} | |||
| 		return lines.join(' ') | |||
| 	} | |||
| 
 | |||
| 	function simplifystroke(stroke){ | |||
| 		var d = [] | |||
| 		, newstroke = {'x':[], 'y':[]} | |||
| 		, i, l | |||
| 		 | |||
| 		for (i = 0, l = stroke.x.length; i < l; i++){ | |||
| 			d.push({'x':stroke.x[i], 'y':stroke.y[i]}) | |||
| 		} | |||
| 		d = simplify(d, 0.7, true) | |||
| 		for (i = 0, l = d.length; i < l; i++){ | |||
| 			newstroke.x.push(d[i].x) | |||
| 			newstroke.y.push(d[i].y) | |||
| 		}		 | |||
| 		return newstroke | |||
| 	} | |||
| 
 | |||
| 	// generate SVG style from settings
 | |||
| 	function styleFromSettings(settings){ | |||
| 		var styles = []; | |||
| 		var meta = [ | |||
| 			// ["style attr", "key in settings", "default value"]
 | |||
| 			["fill", undefined, "none"], | |||
| 			["stroke", "color", "#000000"], | |||
| 			["stroke-width", "lineWidth", 2], | |||
| 			["stroke-linecap", undefined, "round"], | |||
| 			["stroke-linejoin", undefined, "round"] | |||
| 		]; | |||
| 		for (var i = meta.length - 1; i >= 0; i--){ | |||
| 			var attr = meta[i][0] | |||
| 			, key = meta[i][1] | |||
| 			, defaultVal = meta[i][2]; | |||
| 			styles.push(attr + '="' + (key in settings && settings[key] ? settings[key] : defaultVal) + '"'); | |||
| 		} | |||
| 		return styles.join(' '); | |||
| 	} | |||
| 
 | |||
| 	function compressstrokes(data, settings){ | |||
| 		'use strict' | |||
| 		var answer = [ | |||
| 			'<?xml version="1.0" encoding="UTF-8" standalone="no"?>' | |||
| 			, '<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">' | |||
| 	    ] | |||
| 		, i , l = data.length | |||
| 		, stroke | |||
| 		, xlimits = [] | |||
| 		, ylimits = [] | |||
| 		, sizex = 0 | |||
| 		, sizey = 0 | |||
| 		, shiftx = 0 | |||
| 		, shifty = 0 | |||
| 		, minx, maxx, miny, maxy, padding = 1 | |||
| 		, simplifieddata = [] | |||
| 		 | |||
| 		if(l !== 0){ | |||
| 			for(i = 0; i < l; i++){ | |||
| 				stroke = simplifystroke( data[i] ) | |||
| 				simplifieddata.push(stroke) | |||
| 				xlimits = xlimits.concat(stroke.x) | |||
| 				ylimits = ylimits.concat(stroke.y) | |||
| 			} | |||
| 			  | |||
| 			minx = Math.min.apply(null, xlimits) - padding | |||
| 			maxx = Math.max.apply(null, xlimits) + padding | |||
| 			miny = Math.min.apply(null, ylimits) - padding | |||
| 			maxy = Math.max.apply(null, ylimits) + padding | |||
| 			shiftx = minx < 0? 0 : minx | |||
| 			shifty = miny < 0? 0 : miny | |||
| 			sizex = maxx - minx | |||
| 			sizey = maxy - miny | |||
| 		} | |||
| 		 | |||
| 		answer.push( | |||
| 			'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="'+  | |||
| 			sizex.toString() + | |||
| 			'" height="'+  | |||
| 			sizey.toString() + | |||
| 			'">' | |||
| 		) | |||
| 		 | |||
| 	//		// This is a nice idea: use style declaration on top, and mark the lines with 'class="f"'
 | |||
| 	//		// thus saving space in svg... 
 | |||
| 	//		// alas, many SVG renderers don't understand "class" and render the strokes in default "fill = black, no stroke" style. Ugh!!!
 | |||
| 	//		// TODO: Rewrite ImageMagic / GraphicsMagic, InkScape, http://svg.codeplex.com/ to support style + class. until then, we hardcode the stroke style within the path. 
 | |||
| 	//		answer.push(
 | |||
| 	//			'<style type="text/css"><![CDATA[.f {fill:none;stroke:#000000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}]]></style>'
 | |||
| 	//		)
 | |||
| 
 | |||
| 	//		// This set is accompaniment to "simple line renderer" - compressstroke
 | |||
| 	//		answer.push(
 | |||
| 	//			'<style type="text/css"><![CDATA[.t {fill:none;stroke:#FF0000;stroke-width:2}]]></style>'
 | |||
| 	//		)
 | |||
| 	//		for(i = 0; i < l; i++){
 | |||
| 	//			stroke = data[i]
 | |||
| 	//			// This one is accompaniment to "simple line renderer"
 | |||
| 	//			answer.push('<path class="t" d="'+ compressstroke(stroke, shiftx, shifty) +'"/>')
 | |||
| 	//		}
 | |||
| 
 | |||
| 		for(i = 0, l = simplifieddata.length; i < l; i++){ | |||
| 			stroke = simplifieddata[i] | |||
| 			answer.push('<path ' + styleFromSettings(settings) + ' d="'+ addstroke(stroke, shiftx, shifty) + '"/>') | |||
| 		} | |||
| 		answer.push('</svg>') | |||
| 		return answer.join('') | |||
| 	} | |||
| 
 | |||
| 	if (typeof btoa !== 'function') | |||
| 	{ | |||
| 		var btoa = function(data) { | |||
| /** @preserve | |||
| base64 encoder | |||
| MIT, GPL | |||
| http://phpjs.org/functions/base64_encode
 | |||
| +   original by: Tyler Akins (http://rumkin.com)
 | |||
| +   improved by: Bayron Guevara | |||
| +   improved by: Thunder.m | |||
| +   improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
 | |||
| +   bugfixed by: Pellentesque Malesuada | |||
| +   improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
 | |||
| +   improved by: Rafal Kukawski (http://kukawski.pl)
 | |||
| 
 | |||
| */ | |||
| 		    var b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=" | |||
| 		    , b64a = b64.split('') | |||
| 		    , o1, o2, o3, h1, h2, h3, h4, bits, i = 0, | |||
| 	        ac = 0, | |||
| 	        enc = "", | |||
| 	        tmp_arr = []; | |||
| 		  | |||
| 		    do { // pack three octets into four hexets
 | |||
| 		        o1 = data.charCodeAt(i++); | |||
| 		        o2 = data.charCodeAt(i++); | |||
| 		        o3 = data.charCodeAt(i++); | |||
| 		  | |||
| 		        bits = o1 << 16 | o2 << 8 | o3; | |||
| 		  | |||
| 		        h1 = bits >> 18 & 0x3f; | |||
| 		        h2 = bits >> 12 & 0x3f; | |||
| 		        h3 = bits >> 6 & 0x3f; | |||
| 		        h4 = bits & 0x3f; | |||
| 		  | |||
| 		        // use hexets to index into b64, and append result to encoded string
 | |||
| 		        tmp_arr[ac++] = b64a[h1] + b64a[h2] + b64a[h3] + b64a[h4]; | |||
| 		    } while (i < data.length); | |||
| 
 | |||
| 		    enc = tmp_arr.join(''); | |||
| 		    var r = data.length % 3; | |||
| 		    return (r ? enc.slice(0, r - 3) : enc) + '==='.slice(r || 3); | |||
| 
 | |||
| 		    // end of base64 encoder MIT, GPL
 | |||
| 		} | |||
| 	} | |||
| 
 | |||
| 	var unencodedmime = 'image/svg+xml' | |||
| 	function getUnencodedSVG(data, settings){ | |||
| 		return [unencodedmime , compressstrokes(data, settings)]; | |||
| 	} | |||
| 
 | |||
| 	var base64encodedmime = 'image/svg+xml;base64' | |||
| 	function getBase64encodedSVG(data, settings){ | |||
| 
 | |||
| 		return [base64encodedmime , btoa( compressstrokes(data, settings) )]; | |||
| 	}  | |||
| 
 | |||
| 	function Initializer($){ | |||
| 		var mothership = $.fn['jSignature'] | |||
| 		mothership( | |||
| 			'addPlugin' | |||
| 			,'export' | |||
| 			,'svg' // alias
 | |||
| 			,getUnencodedSVG | |||
| 		) | |||
| 		mothership( | |||
| 			'addPlugin' | |||
| 			,'export' | |||
| 			,unencodedmime // full name
 | |||
| 			,getUnencodedSVG | |||
| 		) | |||
| 		mothership( | |||
| 			'addPlugin' | |||
| 			,'export' | |||
| 			,'svgbase64' // alias
 | |||
| 			,getBase64encodedSVG | |||
| 		) | |||
| 		mothership( | |||
| 			'addPlugin' | |||
| 			,'export' | |||
| 			,base64encodedmime // full name
 | |||
| 			,getBase64encodedSVG | |||
| 		) | |||
| 	} | |||
| 
 | |||
| 	//  //Because plugins are minified together with jSignature, multiple defines per (minified) file blow up and dont make sense
 | |||
| 	//	//Need to revisit this later.
 | |||
| 		 | |||
| 	if(typeof $ === 'undefined') {throw new Error("We need jQuery for some of the functionality. jQuery is not detected. Failing to initialize...")} | |||
| 	Initializer($) | |||
| 
 | |||
| })(); | |||
| @ -0,0 +1,165 @@ | |||
| /** @license | |||
| jSignature v2 jSignature's Undo Button and undo functionality plugin | |||
| 
 | |||
| */ | |||
| /** | |||
| Copyright (c) 2011 Willow Systems Corp http://willow-systems.com
 | |||
| MIT License <http://www.opensource.org/licenses/mit-license.php>
 | |||
| */ | |||
| 
 | |||
| ;(function(){ | |||
| 
 | |||
| 	var apinamespace = 'jSignature' | |||
| 
 | |||
| 	function attachHandlers(buttonRenderer, apinamespace, extensionName) { | |||
| 		var $undoButton = buttonRenderer.call(this) | |||
| 
 | |||
| 		;(function(jSignatureInstance, $undoButton, apinamespace) { | |||
| 			jSignatureInstance.events.subscribe( | |||
| 				apinamespace + '.change' | |||
| 				, function(){ | |||
| 					if (jSignatureInstance.dataEngine.data.length) { | |||
| 						$undoButton.show() | |||
| 					} else { | |||
| 						$undoButton.hide() | |||
| 					} | |||
| 				} | |||
| 			) | |||
| 		})( this, $undoButton, apinamespace ) | |||
| 
 | |||
| 		;(function(jSignatureInstance, $undoButton, apinamespace) { | |||
| 
 | |||
| 			var eventName = apinamespace + '.undo' | |||
| 
 | |||
| 			$undoButton.bind('click', function(){ | |||
| 				jSignatureInstance.events.publish(eventName) | |||
| 			}) | |||
| 
 | |||
| 			// This one creates new "undo" event listener to jSignature instance
 | |||
| 			// It handles the actual undo-ing.
 | |||
| 			jSignatureInstance.events.subscribe( | |||
| 				eventName | |||
| 				, function(){ | |||
| 					var data = jSignatureInstance.dataEngine.data | |||
| 					if (data.length) { | |||
| 						data.pop() | |||
| 						jSignatureInstance.resetCanvas(data) | |||
| 					} | |||
| 				} | |||
| 			) | |||
| 		})(  | |||
| 			this | |||
| 			, $undoButton | |||
| 			, this.events.topics.hasOwnProperty( apinamespace + '.undo' ) ?  | |||
| 				// oops, seems some other plugin or code has already claimed "jSignature.undo" event
 | |||
| 				// we will use this extension's name for event name prefix
 | |||
| 				extensionName : | |||
| 				// Great! we will use 'jSignature' for event name prefix.
 | |||
| 				apinamespace | |||
| 		) | |||
| 	} | |||
| 
 | |||
| 	function ExtensionInitializer(extensionName){ | |||
| 		// we are called very early in instance's life.
 | |||
| 		// right after the settings are resolved and 
 | |||
| 		// jSignatureInstance.events is created 
 | |||
| 		// and right before first ("jSignature.initializing") event is called.
 | |||
| 		// You don't really need to manupilate 
 | |||
| 		// jSignatureInstance directly, just attach
 | |||
| 		// a bunch of events to jSignatureInstance.events
 | |||
| 		// (look at the source of jSignatureClass to see when these fire)
 | |||
| 		// and your special pieces of code will attach by themselves.
 | |||
| 
 | |||
| 		// this function runs every time a new instance is set up.
 | |||
| 		// this means every var you create will live only for one instance
 | |||
| 		// unless you attach it to something outside, like "window."
 | |||
| 		// and pick it up later from there.
 | |||
| 
 | |||
| 		// when globalEvents' events fire, 'this' is globalEvents object
 | |||
| 		// when jSignatureInstance's events fire, 'this' is jSignatureInstance
 | |||
| 
 | |||
| 		// Here,
 | |||
| 		// this = is new jSignatureClass's instance.
 | |||
| 
 | |||
| 		// The way you COULD approch setting this up is:
 | |||
| 		// if you have multistep set up, attach event to "jSignature.initializing"
 | |||
| 		// that attaches other events to be fired further lower the init stream.
 | |||
| 		// Or, if you know for sure you rely on only one jSignatureInstance's event,
 | |||
| 		// just attach to it directly
 | |||
| 
 | |||
| 		var apinamespace = 'jSignature' | |||
| 
 | |||
| 		this.events.subscribe( | |||
| 			// name of the event
 | |||
| 			apinamespace + '.attachingEventHandlers' | |||
| 			// event handlers, can pass args too, but in majority of cases,
 | |||
| 			// 'this' which is jSignatureClass object instance pointer is enough to get by.
 | |||
| 			, function(){ | |||
| 
 | |||
| 				// hooking up "undo" button	to lower edge of Canvas.
 | |||
| 				// but only when options passed to jSignature('init', options)
 | |||
| 				// contain "undoButton":renderingFunction pair.
 | |||
| 				// or "undoButton":true (in which case default, internal rendering fn is used)
 | |||
| 				if (this.settings[extensionName]) { | |||
| 					var oursettings = this.settings[extensionName] | |||
| 					if (typeof oursettings !== 'function') { | |||
| 						// we make it a function.
 | |||
| 
 | |||
| 						// we allow people to override the button rendering code,
 | |||
| 						// but when developler is OK with default look (and just passes "truthy" value)
 | |||
| 						// this defines default look for the button:
 | |||
| 						// centered against canvas, hanging on its lower side.
 | |||
| 						oursettings = function(){ | |||
| 							// this === jSignatureInstance 
 | |||
| 							var undoButtonSytle = 'position:absolute;display:none;margin:0 !important;top:auto' | |||
| 							, $undoButton = $('<input type="button" value="撤销" style="'+undoButtonSytle+'" />') | |||
| 								.appendTo(this.$controlbarLower) | |||
| 
 | |||
| 							// this centers the button against the canvas.
 | |||
| 							var buttonWidth = $undoButton.width() | |||
| 							$undoButton.css( | |||
| 								'left' | |||
| 								, Math.round(( this.canvas.width - buttonWidth ) / 2) | |||
| 							) | |||
| 							// IE 7 grows the button. Correcting for that.
 | |||
| 							if ( buttonWidth !== $undoButton.width() ) { | |||
| 								$undoButton.width(buttonWidth) | |||
| 							} | |||
| 
 | |||
| 							return $undoButton | |||
| 						} | |||
| 					} | |||
| 
 | |||
| 					attachHandlers.call(  | |||
| 						this | |||
| 						, oursettings | |||
| 						, apinamespace | |||
| 						, extensionName | |||
| 					) | |||
| 				} | |||
| 			} | |||
| 		) | |||
| 	} | |||
| 
 | |||
| 	var ExtensionAttacher = function(){ | |||
| 		$.fn[apinamespace]( | |||
| 			'addPlugin' | |||
| 			,'instance' // type of plugin
 | |||
| 			,'UndoButton' // extension name
 | |||
| 			,ExtensionInitializer | |||
| 		) | |||
| 	} | |||
| 	 | |||
| 
 | |||
| //  //Because plugins are minified together with jSignature, multiple defines per (minified) file blow up and dont make sense
 | |||
| //	//Need to revisit this later.
 | |||
| 	 | |||
| //	if ( typeof define === "function" && define.amd != null) {
 | |||
| //		// AMD-loader compatible resource declaration
 | |||
| //		// you need to call this one with jQuery as argument.
 | |||
| //		define(function(){return Initializer} )
 | |||
| //	} else {
 | |||
| 		ExtensionAttacher() | |||
| //	}
 | |||
| 
 | |||
| })(); | |||
| @ -0,0 +1,17 @@ | |||
| <template> | |||
|   <iframe src="editor.html" v-bind="objectOfAttrs" /> | |||
| </template> | |||
| 
 | |||
| <script> | |||
| export default { | |||
|   data() { | |||
|     return { | |||
|       objectOfAttrs: { | |||
|         width: '100%', | |||
|         height: '90%', | |||
|         frameborder: 0 | |||
|       } | |||
|     } | |||
|   } | |||
| } | |||
| </script> | |||
| @ -0,0 +1,53 @@ | |||
| <template> | |||
|   <div class="flex formManage"> | |||
|     <div class="leftContent">新增表单</div> | |||
|     <div class="flex1" style="background: #FFFFFF;padding:0 10px"> | |||
|       <div style="padding: 10px 0"> | |||
|         <el-button type="primary" size="mini" @click="saveForm">保存</el-button> | |||
|         <el-button type="primary" size="mini" @click="setForm">设置</el-button> | |||
|       </div> | |||
|       <editor mode="design" @after-init.native="onAfterInit" /> | |||
|     </div> | |||
|   </div> | |||
| </template> | |||
| <script> | |||
| import Editor from '@/components/formEditor/Editor.vue' | |||
| 
 | |||
| export default { | |||
|   name: 'Index', | |||
|   components: { Editor }, | |||
|   data() { | |||
|     return { | |||
|       editor: null, | |||
|       formList: [] | |||
|     } | |||
|   }, | |||
|   methods: { | |||
|     onAfterInit(e) { | |||
|       this.editor = e.editor | |||
|       this.editor.execCommand('new') | |||
|     }, | |||
|     saveForm() { | |||
|       const html = this.editor.getHtml() | |||
|       console.log(this.editor.getBindObject()) | |||
|       window.sessionStorage.setItem('form', encodeURIComponent(html)) | |||
|     }, | |||
|     setForm() { | |||
|       const html = decodeURIComponent(window.sessionStorage.getItem('form')) | |||
|       this.editor.loadHtml(html) | |||
|       this.editor.execCommand('design') | |||
|     } | |||
|   } | |||
| } | |||
| </script> | |||
| <style lang="scss" scoped> | |||
| .formManage{ | |||
|   width: 100%; | |||
|   height: calc(100vh - 50px - 20px); | |||
| } | |||
| .leftContent{ | |||
|   width: 240px; | |||
|   background: #fff; | |||
|   margin-right: 10px; | |||
| } | |||
| </style> | |||