(function ($) { $.pe = $.pe || { version: '0.3.7' }; $.fn.easydrag = function (h) { return i(this, h, 'd') }; $.fn.easyresize = function (h) { return i(this, h, 'r') }; $.dragandresize = { dragandresize: {}, e: 0, drag: function (v) { if (m.k == 'd') e.css({ left: m.x + v.pagex - m.px, top: m.y + v.pagey - m.py }); else e.css({ width: math.max(v.pagex - m.px + m.w, 0), height: math.max(v.pagey - m.py + m.h, 0) }); return false }, stop: function () { //e.css('opacity', 1); $(document).unbind('mousemove', j.drag).unbind('mouseup', j.stop) } }; var j = $.dragandresize, m = j.dragandresize, e = j.e, i = function (e, h, k) { return e.each(function () { h = (h) ? $(h, e) : e; h.css('cursor', 'move'); h.bind('mousedown', { e: e, k: k }, function (v) { var d = v.data, p = {}; e = d.e; if (e.css('position') != 'relative') { try { e.position(p); } catch (e) { } } m = { x: p.left || f('left') || 0, y: p.top || f('top') || 0, w: f('width') || e[0].scrollwidth || 0, h: f('height') || e[0].scrollheight || 0, px: v.pagex, py: v.pagey, k: d.k }; e.css({ //opacity: 0.8 }); $(document).mousemove($.dragandresize.drag).mouseup($.dragandresize.stop); return false }) }) }, f = function (k) { return parseint(e.css(k)) || false }; var l; l = $.pe.expose = { conf: { maskid: 'expose', loadspeed: 'slow', closespeed: 'fast', closeonclick: true, closeonesc: true, zindex: 9998, opacity: 0.5, startopacity: 0, color: '#000', onload: null, onclose: null } }; function viewport() { if ($.browser.msie) { var d = $(document).height(), w = $(window).height(); return [window.innerwidth || document.documentelement.clientwidth || document.body.clientwidth, d - w < 20 ? w : d] } return [$(document).width(), $(document).height()] } function call(a) { if (a) { return a.call($.mask) } } var m, exposed, loaded, config, overlayindex; $.mask = { load: function (b, c) { if (loaded) { return this } if (typeof b == 'string') { b = { color: b } } b = b || config; config = b = $.extend($.extend({}, l.conf), b); m = $("#" + b.maskid); if (!m.length) { m = $('
').attr("id", b.maskid); $("body").append(m) } var d = viewport(); m.css({ position: 'absolute', top: 0, left: 0, width: d[0], height: d[1], display: 'none', opacity: b.startopacity, zindex: b.zindex }); if (b.color) { m.css("backgroundcolor", b.color) } if (call(b.onbeforeload) === false) { return this } if (b.closeonesc) { $(document).bind("keydown.mask", function (e) { if (e.keycode == 27) { $.mask.close(e) } }) } if (b.closeonclick) { m.bind("click.mask", function (e) { $.mask.close(e) }) } $(window).bind("resize.mask", function () { $.mask.fit() }); if (c && c.length) { overlayindex = c.eq(0).css("zindex"); $.each(c, function () { var a = $(this); if (!/relative|absolute|fixed/i.test(a.css("position"))) { a.css("position", "relative") } }); exposed = c.css({ zindex: math.max(b.zindex + 1, overlayindex == 'auto' ? 0 : overlayindex) }) } m.css({ display: 'block' }).fadeto(b.loadspeed, b.opacity, function () { $.mask.fit(); call(b.onload) }); loaded = true; return this }, close: function () { if (loaded) { if (call(config.onbeforeclose) === false) { return this } m.fadeout(config.closespeed, function () { call(config.onclose); if (exposed) { exposed.css({ zindex: overlayindex }) } }); $(document).unbind("keydown.mask"); m.unbind("click.mask"); $(window).unbind("resize.mask"); loaded = false } return this }, fit: function () { if (loaded) { var a = viewport(); m.css({ width: a[0], height: a[1] }) } }, getmask: function () { return m }, isloaded: function () { return loaded }, getconf: function () { return config }, getexposed: function () { return exposed } }; $.fn.mask = function (a) { $.mask.load(a); return this }; $.fn.expose = function (a) { $.mask.load(a, this); return this }; $.pe.overlay = { addeffect: function (a, b, c) { effects[a] = [b, c] }, conf: { close: null, closeonclick: true, closeonesc: true, closespeed: 'fast', effect: 'default', render: false, width: 500, height: 360, title: '标题', loadurl: 'http://www.powereasy.net', fixed: !$.browser.msie || $.browser.version > 6, left: 'center', load: false, mask: null, oneinstance: true, speed: 'normal', target: null, top: 'center' } }; var n = [], effects = {}; $.pe.overlay.addeffect('default', function (a, b) { var c = this.getconf(), w = $(window); if (!c.fixed) { a.top += w.scrolltop(); a.left += w.scrollleft() } a.position = c.fixed ? 'fixed' : 'absolute'; this.getoverlay().css(a).fadein(c.speed, b) }, function (a) { this.getoverlay().fadeout(this.getconf().closespeed, a) }); function overlay(c, d) { var f = this, fire = c.add(f), w = $(window), closers, overlay, opened, maskconf = $.pe.expose && (d.mask || d.expose), uid = math.random().tostring().slice(10); if (maskconf) { if (typeof maskconf == 'string') { maskconf = { color: maskconf } } maskconf.closeonclick = maskconf.closeonesc = false } var g = d.target || c.attr("rel"); overlay = g ? $(g) : null || c; if (d.render) { overlay.html(''); var h = '
'; h += '

'; h += d.title; h += '

'; h += '
'; h += '
'; overlay.append(h) } if (!overlay.length) { throw "could not find overlay: " + g; } if (c && c.index(overlay) == -1) { c.click(function (e) { f.load(e); return e.preventdefault() }) } $.extend(f, { load: function (e) { if (f.isopened()) { return f } var a = effects[d.effect]; if (!a) { throw "overlay: cannot find effect : \"" + d.effect + "\""; } if (d.oneinstance) { $.each(n, function () { this.close(e) }) } e = e || $.event(); e.type = "onbeforeload"; fire.trigger(e); if (e.isdefaultprevented()) { return f } opened = true; if (maskconf) { $(overlay).expose(maskconf) } var b = d.top, left = d.left, owidth = overlay.outerwidth({ margin: true }), oheight = overlay.outerheight({ margin: true }); if (typeof b == 'string') { b = b == 'center' ? math.max((w.height() - d.height) / 2, 0) : parseint(b, 10) / 100 * w.height() } if (left == 'center') { left = math.max((w.width() - d.width) / 2, 0) } a[0].call(f, { top: b, left: left }, function () { if (opened) { e.type = "onload"; fire.trigger(e) } }); fire.css('display', 'block'); if (maskconf && d.closeonclick) { $.mask.getmask().one("click", f.close) } if (d.closeonclick) { $(document).bind("click." + uid, function (e) { if (!$(e.target).parents(overlay).length) { f.close(e) } }) } if (d.closeonesc) { $(document).bind("keydown." + uid, function (e) { if (e.keycode == 27) { f.close(e) } }) } return f }, close: function (e) { if (!f.isopened()) { return f } e = e || $.event(); e.type = "onbeforeclose"; fire.trigger(e); if (e.isdefaultprevented()) { return } opened = false; effects[d.effect][1].call(f, function () { e.type = "onclose"; fire.trigger(e) }); $(document).unbind("click." + uid).unbind("keydown." + uid); if (maskconf) { $.mask.close() } return f }, getoverlay: function () { return overlay }, gettrigger: function () { return c }, getclosers: function () { return closers }, isopened: function () { return opened }, getconf: function () { return d } }); $.each("onbeforeload,onstart,onload,onbeforeclose,onclose".split(","), function (i, b) { if ($.isfunction(d[b])) { $(f).bind(b, d[b]) } f[b] = function (a) { $(f).bind(b, a); return f } }); var j = overlay.find('.overlay_header'); overlay.easydrag(j); closers = overlay.find(d.close || ".overlay_header_close" || ".close"); if (!closers.length && !d.close) { closers = $(''); overlay.prepend(closers) } closers.click(function (e) { f.close(e) }); if (d.load) { f.load() } } $.fn.overlay = function (a) { var b = this.data("overlay"); if (b) { this.removedata("overlay") } if ($.isfunction(a)) { a = { onbeforeload: a } } a = $.extend(true, {}, $.pe.overlay.conf, a); this.each(function () { b = new overlay($(this), a); n.push(b); $(this).data("overlay", b) }); return a.api ? b : this }; $.pe.tabs = { conf: { tabs: 'a', current: 'current', onbeforeclick: null, onclick: null, effect: 'default', initialindex: 0, event: 'click', rotate: false, history: false }, addeffect: function (a, b) { h[a] = b } }; var h = { 'default': function (i, a) { this.getpanes().hide().eq(i).show(); a.call() }, fade: function (i, a) { var b = this.getconf(), speed = b.fadeoutspeed, panes = this.getpanes(); if (speed) { panes.fadeout(speed) } else { panes.hide() } panes.eq(i).fadein(b.fadeinspeed, a) }, slide: function (i, a) { this.getpanes().slideup(200); this.getpanes().eq(i).slidedown(400, a) }, ajax: function (i, a) { this.getpanes().eq(0).load(this.gettabs().eq(i).attr("href"), a) } }; var w; $.pe.tabs.addeffect("horizontal", function (i, a) { if (!w) { w = this.getpanes().eq(0).width() } this.getcurrentpane().animate({ width: 0 }, function () { $(this).hide() }); this.getpanes().eq(i).animate({ width: w }, function () { $(this).show(); a.call() }) }); function tabs(c, d, f) { var g = this, trigger = c.add(this), tabs = c.find(f.tabs), panes = d.jquery ? d : c.children(d), current; if (!tabs.length) { tabs = c.children() } if (!panes.length) { panes = c.parent().find(d) } if (!panes.length) { panes = $(d) } $.extend(this, { click: function (i, e) { var a = tabs.eq(i); if (typeof i == 'string' && i.replace("#", "")) { a = tabs.filter("[href*=" + i.replace("#", "") + "]"); i = math.max(tabs.index(a), 0) } if (f.rotate) { var b = tabs.length - 1; if (i < 0) { return g.click(b, e) } if (i > b) { return g.click(0, e) } } if (!a.length) { if (current >= 0) { return g } i = f.initialindex; a = tabs.eq(i) } if (i === current) { return g } e = e || $.event(); e.type = "onbeforeclick"; trigger.trigger(e, [i]); if (e.isdefaultprevented()) { return } h[f.effect].call(g, i, function () { e.type = "onclick"; trigger.trigger(e, [i]) }); current = i; tabs.removeclass(f.current); a.addclass(f.current); return g }, getconf: function () { return f }, gettabs: function () { return tabs }, getpanes: function () { return panes }, getcurrentpane: function () { return panes.eq(current) }, getcurrenttab: function () { return tabs.eq(current) }, getindex: function () { return current }, next: function () { return g.click(current + 1) }, prev: function () { return g.click(current - 1) }, destroy: function () { tabs.unbind(f.event).removeclass(f.current); panes.find('a[href^="#"]').unbind("click.t"); return g } }); $.each("onbeforeclick,onclick".split(","), function (i, b) { if ($.isfunction(f[b])) { $(g).bind(b, f[b]) } g[b] = function (a) { $(g).bind(b, a); return g } }); if (f.history && $.fn.history) { $.pe.history.init(tabs); f.event = 'history' } tabs.each(function (i) { $(this).bind(f.event, function (e) { g.click(i, e); return e.preventdefault() }) }); panes.find('a[href^="#"]').bind("click.t", function (e) { g.click($(this).attr("href"), e) }); if (location.hash) { g.click(location.hash) } else { if (f.initialindex === 0 || f.initialindex > 0) { g.click(f.initialindex) } } }; $.fn.tabs = function (a, b) { var c = this.data("tabs"); if (c) { c.destroy(); this.removedata("tabs") } if ($.isfunction(b)) { b = { onbeforeclick: b } } b = $.extend({}, $.pe.tabs.conf, b); this.each(function () { c = new tabs($(this), a, b); $(this).data("tabs", c) }); return b.api ? c : this }; $.fn.extend({ jsrightmenu: function (options) { options = $.extend({ menulist: [] }, options); if ($("#div_rightmenu").size() == 0); { $(document.body).append("\
\<\/div>"); $("#div_rightmenu").hide(); } return this.each(function () { this.oncontextmenu = function () { var menucount = options.menulist.length; var divmunuitem = ""; if (menucount > 0) { for (var i = 0; i < menucount; i++) { divmunuitem += "
" + options.menulist[i].menuname + "
"; } $("#div_rightmenu").html(divmunuitem); $("#div_rightmenu").hide(); } var objmenu = $("#div_rightmenu"); if (objmenu.size() > 0) { objmenu.hide(); var event = arguments[0] || window.event; var clientx = event.clientx; var clienty = event.clienty; var redge = document.documentelement.clientwidth - clientx; var bedge = document.documentelement.clientheight - clienty; var menu = objmenu.get(0); var menuleft = 0; var menutop = 0; if (redge < menu.offsetwidth) menuleft = document.documentelement.scrollleft + clientx - menu.offsetwidth; else menuleft = document.documentelement.scrollleft + clientx; if (bedge < menu.offsetheight) menutop = document.documentelement.scrolltop + clienty - menu.offsetheight; else menutop = document.documentelement.scrolltop + clienty; objmenu.css({ top: menutop + "px", left: menuleft + "px" }); objmenu.show(); return false; } } document.onclick = function () { var objmenu = $("#div_rightmenu"); if (objmenu.size() > 0) objmenu.hide(); } }); } }); $.fn.extend({ check: function () { return this.each(function () { this.checked = true }) }, uncheck: function () { return this.each(function () { this.checked = false }) }, inverse: function () { return this.each(function () { this.checked = (this.checked == true ? false : true); }) }, shiftselect: function (m) { var g = this; var h; $(this).click(function (a) { if (!h) { h = this; return } if (a.shiftkey) { var b = g.index(this); var c = g.index(h); var d = h.checked; if (b == c) { return true } var e = math.max(b, c); var f = math.min(b, c); for (i = f; i <= e; i++) { g[i].checked = d } if ($.isfunction(m)) call(m); } h = this }) }, lostfocus: function () { $(this).focus(function () { this.blur() }) }, addfavorite: function () { $(this).click(function () { var a = $('title').text(); if (document.all) window.external.addfavorite(location.href, a); else if (window.sidebar) window.sidebar.addpanel(a, location.href, null); else alert('您可以尝试通过快捷键ctrl + d 加入到收藏夹') }) }, sethomepage: function () { $(this).click(function () { if (document.all) { document.body.style.behavior = 'url(#default#homepage)'; document.body.sethomepage(location.href) } else if (window.sidebar) { if (window.netscape) { try { netscape.security.privilegemanager.enableprivilege("universalxpconnect") } catch (e) { alert("该操作被浏览器拒绝,如果想启用该功能,请在地址栏内输入 about:config,然后将项 signed.applets.codebase_principal_support 值该为true"); return } } var a = components.classes['@mozilla.org/preferences-service;1'].getservice(components.interfaces.nsiprefbranch); a.setcharpref('browser.startup.homepage', location.href) } }); }, imageresize: function (options) { var params = jquery.extend({ height: 500, width: 660 }, options); this.each(function () { var height = params.height, width = params.width, img_height = $(this).height(), img_width = $(this).width(), m_ceil = math.ceil, m_floor = math.floor; if (img_height <= height && img_width <= width) { return; } if (img_height >= img_width) { width = m_floor(m_ceil(img_width / img_height * height)); } else { height = m_floor(m_ceil(img_height / img_width * width)); } $(this).attr({ 'height': height, 'width': width }).css({ 'height': height + 'px', 'width': width + 'px' }); }); }, usekeypresssubmit: function (target) { $(this).keypress(function (e) { if ((e.which && e.which == 13) || (e.keycode && e.keycode == 13)) { $(target).click(); return false; } return true; }) } }) $.extend($.pe, { htmlencode: function (text) { var standard = function (text) { var span = $(''); span.html(text); return span.html(); }; var fix1 = (standard('\n').tolowercase() == '
') ? function (text) { // #3874 ie and safari encode line-break into
return standard(text).replace(/
/gi, '\n'); } : standard; var fix2 = (standard('>') == '>') ? function (text) { // webkit does't encode the ">" character, which makes sense, but // it's different than other browsers. return fix1(text).replace(/>/g, '>'); } : fix1; var fix3 = (standard(' ') == '  ') ? function (text) { // #3785 ie8 changes spaces (>= 2) to   return fix2(text).replace(/ /g, ' '); } : fix2; this.htmlencode = fix3; return this.htmlencode(text); }, random: function (a) { return math.floor(a * (math.random() % 1)) }, cookie: function (a, b, c) { if (typeof b != 'undefined') { c = c || {}; if (b === null) { b = ''; c.expires = -1 } var d = ''; if (c.expires && (typeof c.expires == 'number' || c.expires.toutcstring)) { var e; if (typeof c.expires == 'number') { e = new date(); e.settime(e.gettime() + (c.expires * 24 * 60 * 60 * 1000)) } else { e = c.expires } d = '; expires=' + e.toutcstring() } var f = c.path ? '; path=' + (c.path) : '', domain = c.domain ? '; domain=' + (c.domain) : '', secure = c.secure ? '; secure' : ''; document.cookie = [a, '=', encodeuricomponent(b), d, f, domain, secure].join('') } else { var g = null; if (document.cookie && document.cookie != '') { var h = document.cookie.split(';'); for (var i = 0; i < h.length; i++) { var j = $.trim(h[i]); if (j.substring(0, a.length + 1) == (a + '=')) { g = decodeuricomponent(j.substring(a.length + 1)); break } } } return g } }, stringtojson: function (string) { return eval('(' + string + ')'); }, jsontostring: function (obj) { var this = this; switch (typeof (obj)) { case 'string': return '"' + obj.replace(/(["\\])/g, '\\$1') + '"'; case 'array': return '[' + obj.map(this.jsontostring).join(',') + ']'; case 'object': if (obj instanceof array) { var strarr = []; var len = obj.length; for (var i = 0; i < len; i++) { strarr.push(this.jsontostring(obj[i])); } return '[' + strarr.join(',') + ']'; } else if (obj == null) { return 'null'; } else { var string = []; for (var property in obj) string.push(this.jsontostring(property) + ':' + this.jsontostring(obj[property])); return '{' + string.join(',') + '}'; } case 'number': return obj; case false: return obj; } }, ajax: function (e, f) { if (typeof (e) != 'string' || e == 'undefind') return; var g = { url: sitesetup.ajaxpath, data: '', type: 'post', datatype: 'xml', params: {} }; var h = function (a, b) { var c = ''; for (var d in a.params) { if (b) c += ('<' + d + '>' + $.pe.htmlencode(a.params[d]) + ''); else c += ('<' + d + '>' + $.pe.htmlencode(a.params[d]) + '') } return c } var i = $.extend(g, f); var e = $.trim(e).tolowercase(); switch (e) { case 'accesslabel': e = 'updatelabel'; break; case 'accesspage': e = 'updatepage'; break; case 'checkuserlogin': e = 'logincheck'; break; case 'checkloginvalidate': e = 'enablevalidcode'; break; case 'logout': e = 'userlogout'; break; default: break; } var j = '' + e + ''; switch (e) { case 'updatelabel': j += ('' + i.labelname + '') j += ('' + i.currentpage + ''); j += h(i, true); break; case 'updatepage': j += ('' + i.labelname + ''); j += ('' + i.pagename + ''); j += ('' + i.pagesize + ''); j += ('' + i.currentpage + ''); j += ('' + i.recordcount + ''); break; default: j += h(i, false); break; } j += ''; i.data = j; $.ajax(i) }, refreshvalidatecode: function (a) { var path = sitesetup.sitepath + 'controls/validatecodeimage.aspx?code=' + $.pe.random(100); $(a).attr('src', path); }, replaceuserinfovariable: function (a, b) { a = a.replace('{username}', b.find('username').text()); a = a.replace('{experience}', b.find('exp').text()); a = a.replace('{message}', b.find('msg').text()); a = a.replace('{logincount}', b.find('logintimes').text()); a = a.replace('{pointname}', b.find('pointname').text()); a = a.replace('{point}', b.find('point').text()); a = a.replace('{pointunit}', b.find('pointunit').text()); a = a.replace('{signinarticle}', b.find('signincontent').text()); a = a.replace('{balances}', b.find('balance').text()); return a }, supplydemandinfovariable: function (a, b) { a = a.replace('{username}', b.find('username').text()); a = a.replace('{experience}', b.find('exp').text()); a = a.replace('{message}', b.find('msg').text()); a = a.replace('{logincount}', b.find('logintimes').text()); a = a.replace('{pointname}', b.find('pointname').text()); a = a.replace('{point}', b.find('point').text()); a = a.replace('{signinarticle}', b.find('signincontent').text()); a = a.replace('{balances}', b.find('balance').text()); a = a.replace(new regexp('{indexurl}', 'g'), b.find('indexurl').text()); a = a.replace(new regexp('{contacturl}', 'g'), b.find('contacturl').text()); a = a.replace('{supplylisturl}', b.find('supplylisturl').text()); a = a.replace('{companyurl}', b.find('companyurl').text()); a = a.replace('{contact}', b.find('contact').text()); a = a.replace(new regexp('{companyname}', 'g'), b.find('companyname').text()); return a } }) $.pe.pealert = function (message, options) { message = message || ""; message = message.replace(/\r\n/gi, "
"); var defaultoptions = { title: '提示信息', top: 160 }; if (options) { defaultoptions = $.extend(defaultoptions, options); } var closealertbox = function () { $(".msgbox").remove(); $("#expose").remove(); } closealertbox(); var $alerbox = $("
x

" + defaultoptions.title + "

" + message + "
"); $("body").append($alerbox); $alerbox.overlay({ top: defaultoptions.top, mask: { color: '#ccc', loadspeed: 10, opacity: 0.5 }, closeonclick: true, closeonesc: true, api: true }).load(); $alerbox.easydrag(); $("#closealertbox", $alerbox).bind("click", closealertbox); $("#btnconfirmalert", $alerbox).bind("click", closealertbox); } })(jquery); (function (d) { function r(b, c) { return 32 - (new date(b, c, 32)).getdate() } function s(b, c) { b = "" + b; for (c = c || 2; b.length < c; ) b = "0" + b; return b } function t(b, c, j) { var m = b.getdate(), h = b.getday(), t = b.getmonth(); b = b.getfullyear(); var f = { d: m, dd: s(m), ddd: b[j].shortdays[h], dddd: b[j].days[h], m: t + 1, mm: s(t + 1), mmm: b[j].shortmonths[t], mmmm: b[j].months[t], yy: string(b).slice(2), yyyy: b }; c = c.replace(x, function (o) { return o in f ? f[o] : o.slice(1, o.length - 1) }); return y.html(c).html() } function y(b) { return parseint(b, 10) } function u(b, c) { return b.getfullyear() === c.getfullyear() && b.getmonth() == c.getmonth() && b.getdate() == c.getdate() } function c(b) { if (b) { if (b.constructor == date) return b; if (typeof b == "string") { var c = b.split("-"); if (c.length == 3) return new date(y(c[0]), y(c[1]) - 1, y(c[2])); if (!/^-?\d+$/.test(b)) return; b = y(b) } c = new date; c.setdate(c.getdate() + b); return c } } function z(b, c) { function j(a, e, g) { l = a; d = a.getfullyear(); e = a.getmonth(); g = a.getdate(); g = g || d.event("api"); g.type = "change"; h.trigger(g, [a]); if (!g.isdefaultprevented()) { b.val(t(a, e.format, e.lang)); b.data("date", a); h.hide(g) } } function m(a) { a.type = "onshow"; h.trigger(a); d(document).bind("keydown.d", function (e) { var g = e.keycode; if (g == 8) { b.val(""); return h.hide(e) } if (g == 27) return h.hide(e); if (d(v).index(g) >= 0) { if (!u) { h.show(e); return e.preventdefault() } var i = d("#" + f.weeks + " a"), p = d("." + f.focus), q = i.index(p); p.removeclass(f.focus); if (g == 74 || g == 40) q += 7; else if (g == 75 || g == 38) q -= 7; else if (g == 76 || g == 39) q += 1; else if (g == 72 || g == 37) q -= 1; if (q == -1) { h.addmonth(-1); p = d("#" + f.weeks + " a:last") } else if (q == 35) { h.addmonth(); p = d("#" + f.weeks + " a:first") } else p = i.eq(q); p.addclass(f.focus); return e.preventdefault() } if (g == 34) return h.addmonth(); if (g == 33) return h.addmonth(-1); if (g == 36) return h.today(); if (g == 13) d(e.target).is("select") || d("." + f.focus).click(); return d([16, 17, 18, 9]).index(g) >= 0 }); d(document).bind("click.d", function (e) { var g = e.target; if (!d(g).parents("#" + f.root).length && g != b[0] && (!k || g != k[0])) h.hide(e) }) } var h = this, t = new date, f = c.css, o = b[c.lang], k = d("#" + f.root), l = k.find("#" + f.title), k, i, j, d, e, g, l = b.attr("data-value") || c.value || b.val(), r = b.attr("min") || c.min, s = b.attr("max") || c.max, u; l = c(l) || t; r = c(r || c.yearrange[0] * 365); s = c(s || c.yearrange[1] * 365); if (!o) throw "dateinput: invalid language: " + c.lang; if (b.attr("type") == "date") { var m = d(""); d.each("name,readonly,disabled,value,required".split(","), function (a, e) { m.attr(e, b.attr(e)) }); b.replacewith(m); b = m } b.addclass(f.input); var h = b.add(h); if (!k.length) { k = d("
").hide().css({ position: "absolute" }).attr("id", f.root); k.children().eq(0).attr("id", f.head).end().eq(1).attr("id", f.body).children().eq(0).attr("id", f.days).end().eq(1).attr("id", f.weeks).end().end().end().find("a").eq(0).attr("id", f.prev).end().eq(1).attr("id", f.next); l = k.find("#" + f.head).find("div").attr("id", f.title); if (c.selectors) { var z = d("").attr("id", f.year); l.append(z.add(a)) } for (var $ = k.find("#" + f.days), n = 0; n < 7; n++) $.append(d("").text(o.shortdays[(n + c.firstday) % 7])); b.after(k) } if (c.trigger) k = d("").attr("href", "#").addclass(f.trigger).click(function (a) { h.show(); return a.preventdefault() }).insertafter(b); var o = k.find("#" + f.weeks); a = k.find("#" + f.year); z = k.find("#" + f.month); d.extend(h, { show: function (a) { if (!(b.is("[readonly]") || u)) { a = a || d.event(); a.type = "onbeforeshow"; h.trigger(a); if (!a.isdefaultprevented()) { d.each(w, function () { this.hide() }); u = true; z.unbind("change").change(function () { h.setvalue(a.val(), d(this).val()) }); a.unbind("change").change(function () { h.setvalue(d(this).val(), z.val()) }); i = k.find("#" + f.prev).unbind("click").click(function () { i.hasclass(f.disabled) || h.addmonth(-1); return false }); j = k.find("#" + f.next).unbind("click").click(function () { j.hasclass(f.disabled) || h.addmonth(); return false }); h.setvalue(l); var e = b.position(); k.css({ top: e.top + b.outerheight({ margins: true }) + c.offset[0], left: e.left + c.offset[1] }); if (c.speed) k.show(c.speed, function () { m(a) }); else { k.show(); m(a) } return h } } }, setvalue: function (a, e, g) { var i; if (parseint(e, 10) >= -1) { a = y(a); e = y(e); g = y(g); i = new date(a, e, g) } else { i = a || l; a = i.getfullyear(); e = i.getmonth(); g = i.getdate() } if (e == -1) { e = 11; a-- } else if (e == 12) { e = 0; a++ } if (!u) { j(i, c); return h } e = e; d = a; i = new date(a, e, 1 - c.firstday); g = i.getday(); var p = r(a, e), q = r(a, e - 1), p; if (c.selectors) { z.empty(); d.each(o.months, function (v, f) { r < new date(a, v + 1, -1) && s > new date(a, v, 0) && z.append(d(""); if (w % 7 === 0) { p = d("
").addclass(f.week); o.append(p) } if (w < g) { n.addclass(f.off); x = q - g + w + 1; i = new date(a, e - 1, x) } else if (w >= g + p) { n.addclass(f.off); x = w - p - g + 1; i = new date(a, e + 1, x) } else { x = w - g + 1; i = new date(a, e, x); if (u(l, i)) n.attr("id", f.current).addclass(f.focus); else u(t, i) && n.attr("id", f.today) } r && i < r && n.add(i).addclass(f.disabled); s && i > s && n.add(j).addclass(f.disabled); n.attr("href", "#" + x).text(x).data("date", i); p.append(n); n.click(function (v) { var f = d(this); if (!f.hasclass(f.disabled)) { d("#" + f.current).removeattr("id"); f.attr("id", f.current); j(f.data("date"), c, v) } return false }) } f.sunday && o.find(f.week).each(function () { var v = c.firstday ? 7 - c.firstday : 0; d(this).children().slice(v, v + 1).addclass(f.sunday) }); return h }, setmin: function (a, e) { r = c(a); e && l < r && h.setvalue(r); return h }, setmax: function (a, e) { s = c(a); e && l > s && h.setvalue(s); return h }, today: function () { return h.setvalue(t) }, addday: function (a) { return this.setvalue(d, e, g + (a || 1)) }, addmonth: function (a) { return this.setvalue(d, e + (a || 1), g) }, addyear: function (a) { return this.setvalue(d + (a || 1), e, g) }, hide: function (a) { if (u) { a = a || d.event(); a.type = "onhide"; h.trigger(a); d(document).unbind("click.d").unbind("keydown.d"); if (a.isdefaultprevented()) return; k.hide(); u = false } return h }, getconf: function () { return c }, getinput: function () { return b }, getcalendar: function () { return k }, getvalue: function (a) { return a ? t(l, a, c.lang) : l }, isopen: function () { return u } }); d.each(["onbeforeshow", "onshow", "change", "onhide"], function (a, e) { d.isfunction(c[e]) && d(h).bind(e, c[e]); h[e] = function (g) { d(h).bind(e, g); return h } }); b.bind("focus click", h.show).keydown(function (a) { var e = a.keycode; if (!u && d(v).index(e) >= 0) { h.show(a); return a.preventdefault() } return a.shiftkey || a.ctrlkey || a.altkey || e == 9 ? true : a.preventdefault() }); c(b.val()) && j(l, c) } d.tools = d.tools || { version: "1.2.3" }; var w = [], q, v = [75, 76, 38, 39, 74, 72, 40, 37], b = {}; q = d.tools.dateinput = { conf: { format: "mm/dd/yy", selectors: false, yearrange: [-5, 5], lang: "en", offset: [0, 0], speed: 0, firstday: 0, min: 0, max: 0, trigger: false, css: { prefix: "cal", input: "date", root: 0, head: 0, title: 0, prev: 0, next: 0, month: 0, year: 0, days: 0, body: 0, weeks: 0, today: 0, current: 0, week: 0, off: 0, sunday: 0, focus: 0, disabled: 0, trigger: 0 } }, localize: function (b, c) { d.each(c, function (j, m) { c[j] = m.split(",") }); b[b] = c } }; q.localize("en", { months: "一月,二月,三月,四月,五月,六月,七月,八月,九月,十月,十一月,十二月", shortmonths: "一月,二月,三月,四月,五月,六月,七月,八月,九月,十月,十一月,十二月", days: "日,一,二,三,四,五,六", shortdays: "日,一,二,三,四,五,六" }); var x = /d{1,4}|m{1,4}|yy(?:yy)?|"[^"]*"|'[^']*'/g, y = d(""); d.expr[":"].date = function (b) { var c = b.getattribute("type"); return c && c == "date" || !!d(b).data("dateinput") }; d.fn.dateinput = function (b) { if (this.data("dateinput")) return this; b = d.extend(true, {}, q.conf, b); d.each(b.css, function (j, m) { if (!m && j != "prefix") b.css[j] = (b.css.prefix || "") + (m || j) }); var c; this.each(function () { var j = new z(d(this), b); w.push(j); j = j.getinput().data("dateinput", j); c = c ? c.add(j) : j }); return c ? c : this } $(function () { var videoall = $("body").find('.edui-upload-video'); var videodiv = $('[data-ui="video"]'); var embedall = $("body").find('embed[class="edui-faked-video"]'); var videoedui = $("body").find('.edui-faked-video'); if (videoall.length > 0 || videodiv.length > 0 || embedall.length > 0 || videoedui.length > 0) { // 加载ckplayer.js文件 var cktag = ''; var domck = $.parsehtml(cktag); $(domck).attr('src', '/ckplayer/ckplayer.min.js'); $(domck).on('load', function () { }).appendto($('body')); if (navigator.appname == "microsoft internet explorer" && (navigator.appversion.match(/8./i) == "8." || navigator.useragent.indexof("msie 7.0") > 0)) { // ie8下加载swfobject.js文件 var swfobjecttag = ''; var domswfobject = $.parsehtml(swfobjecttag); $(domswfobject).attr('src', '/ueditor/videoplayer/swfobject.js'); $(domswfobject).on('load', function () { }).appendto($('body')); } // 加载视频播放.js文件 var scripttag = ''; var domvideo = $.parsehtml(scripttag); $(domvideo).attr('src', '/ueditor/videoplayer/power.videoreversion.js'); $(domvideo).on('load', function () { }).appendto($('body')); } // 加载ueditor.parse.min.js文件,处理编辑框的表格、列表等样式加载 var fontzoom = $("body").find('#fontzoom'); var lblcontent = $("body").find('#lblcontent'); if (fontzoom.length > 0 || lblcontent.length > 0) { var scriptparsetag = ''; var domparse = $.parsehtml(scriptparsetag); $(domparse).attr('src', '/ueditor/ueditor.parse.min.js'); $(domparse).on('load', function () { }).appendto($('body')); } }); })(jquery); /*--密码强度--*/ function issecurity(v) { if (v.length < 6) { iss.reset(v.length); return } var a = -1; var b = (v.search(/[a-za-z]/) != -1) ? 1 : 0; var c = (v.search(/[0-9]/) != -1) ? 1 : 0; var d = (v.search(/[^a-za-z0-9_]/) != -1) ? 1 : 0; var a = b + c + d; switch (a) { case 1: iss.level0(); break; case 2: iss.level1(); break; case 3: iss.level2(); break; default: iss.reset(v.length) } } var iss = { width: ["60", "80", "100", "10"], reset: function (a) { $("#barborder_txtuserpassword").html(" 密码强度:弱"); }, level0: function () { $("#barborder_txtuserpassword").html(" 密码强度:一般"); }, level1: function () { $("#barborder_txtuserpassword").html(" 密码强度:强"); }, level2: function () { $("#barborder_txtuserpassword").html(" 密码强度:很强"); } } function bardisplaynone() { $("#barborder_txtuserpassword").hide(); } function bardisplayshow() { $("#barborder_txtuserpassword").empty(); $("#ctl00_cphcontent_valruserpassword").hide(); document.getelementbyid("barborder_txtuserpassword").style.display = "inline" } string.prototype.endwith = function (a) { var b = new regexp(a + "$"); return b.test(this) } function batchconfirm(a, b) { var a = (arguments.length > 0) ? arguments[0] : "确定要进行此批量操作?"; var b = (arguments.length > 1) ? arguments[1] : "请选择所要操作的记录!"; var c = false; for (var i = 0; i < document.forms[0].length; i++) { var o = document.forms[0][i]; if (o.type == "checkbox" && o.name.endwith("checkboxbutton") && o.checked == true) { c = true; break } } if (!c) { alert(b); return false } else { if (!confirm(a)) { return false } } }