/*! jFormPlugin309 */ (function (h) { var j = {}; j.fileapi = h("").get(0).files !== undefined; j.formdata = window.FormData !== undefined; h.fn.ajaxSubmit = function (Q) { if (!this.length) { i("ajaxSubmit: skipping submit process - no element selected"); return this } var R, d, O, M = this; if (typeof Q == "function") { Q = {success: Q} } R = this.attr("method"); d = this.attr("action"); O = (typeof d === "string") ? h.trim(d) : ""; O = O || window.location.href || ""; if (O) { O = (O.match(/^([^#]+)/) || [])[1] } Q = h.extend(true, { url: O, success: h.ajaxSettings.success, type: R || "GET", iframeSrc: /^https/i.test(window.location.href || "") ? "javascript:false" : "about:blank" }, Q); var F = {}; this.trigger("form-pre-serialize", [this, Q, F]); if (F.veto) { i("ajaxSubmit: submit vetoed via form-pre-serialize trigger"); return this } if (Q.beforeSerialize && Q.beforeSerialize(this, Q) === false) { i("ajaxSubmit: submit aborted via beforeSerialize callback"); return this } var N = Q.traditional; if (N === undefined) { N = h.ajaxSettings.traditional } var J = []; var a, I = this.formToArray(Q.semantic, J); if (Q.data) { Q.extraData = Q.data; a = h.param(Q.data, N) } if (Q.beforeSubmit && Q.beforeSubmit(I, this, Q) === false) { i("ajaxSubmit: submit aborted via beforeSubmit callback"); return this } this.trigger("form-submit-validate", [I, this, Q, F]); if (F.veto) { i("ajaxSubmit: submit vetoed via form-submit-validate trigger"); return this } var k = h.param(I, N); if (a) { k = (k ? (k + "&" + a) : a) } if (Q.type.toUpperCase() == "GET") { Q.url += (Q.url.indexOf("?") >= 0 ? "&" : "?") + k; Q.data = null } else { Q.data = k } var E = []; if (Q.resetForm) { E.push(function () { M.resetForm() }) } if (Q.clearForm) { E.push(function () { M.clearForm(Q.includeHidden) }) } if (!Q.dataType && Q.target) { var P = Q.success || function () { }; E.push(function (m) { var l = Q.replaceTarget ? "replaceWith" : "html"; h(Q.target)[l](m).each(P, arguments) }) } else { if (Q.success) { E.push(Q.success) } } Q.success = function (n, p, m) { var o = Q.context || Q; for (var r = 0, l = E.length; r < l; r++) { E[r].apply(o, [n, p, m || M, M]) } }; var b = h("input:file:enabled[value]", this); var L = b.length > 0; var c = "multipart/form-data"; var q = (M.attr("enctype") == c || M.attr("encoding") == c); var D = j.fileapi && j.formdata; i("fileAPI :" + D); var K = (L || q) && !D; if (Q.iframe !== false && (Q.iframe || K)) { if (Q.closeKeepAlive) { h.get(Q.closeKeepAlive, function () { G(I) }) } else { G(I) } } else { if ((L || q) && D) { H(I) } else { h.ajax(Q) } } for (var e = 0; e < J.length; e++) { J[e] = null } this.trigger("form-submit-notify", [this, Q]); return this; function H(p) { var l = new FormData(); for (var r = 0; r < p.length; r++) { l.append(p[r].name, p[r].value) } if (Q.extraData) { for (var m in Q.extraData) { if (Q.extraData.hasOwnProperty(m)) { l.append(m, Q.extraData[m]) } } } Q.data = null; var n = h.extend(true, {}, h.ajaxSettings, Q, { contentType: false, processData: false, cache: false, type: "POST" }); if (Q.uploadProgress) { n.xhr = function () { var s = jQuery.ajaxSettings.xhr(); if (s.upload) { s.upload.onprogress = function (t) { var u = 0; var w = t.loaded || t.position; var v = t.total; if (t.lengthComputable) { u = Math.ceil(w / v * 100) } Q.uploadProgress(t, w, v, u) } } return s } } n.data = null; var o = n.beforeSend; n.beforeSend = function (s, t) { t.data = l; if (o) { o.call(t, s, Q) } }; h.ajax(n) } function G(ao) { var ag = M[0], ah, n, u, l, r, ae, z, B, A, p, m, w; var C = !!h.fn.prop; if (h(":input[name=submit],:input[id=submit]", ag).length) { alert('Error: Form elements must not have name or id of "submit".'); return } if (ao) { for (n = 0; n < J.length; n++) { ah = h(J[n]); if (C) { ah.prop("disabled", false) } else { ah.removeAttr("disabled") } } } u = h.extend(true, {}, h.ajaxSettings, Q); u.context = u.context || u; r = "jqFormIO" + (new Date().getTime()); if (u.iframeTarget) { ae = h(u.iframeTarget); p = ae.attr("name"); if (!p) { ae.attr("name", r) } else { r = p } } else { ae = h(''; mask = _doc.createElement('div'); mask.id = 'ldg_lockmask'; mask.style.cssText = 'position:' + positionType + ';left:0;top:0;width:100%;height:100%;overflow:hidden;'; style = mask.style; if (_ie6) mask.innerHTML = frm; _doc.body.appendChild(mask) } if (positionType === 'absolute') { style.width = _$top.width(); style.height = _$top.height(); style.top = _$top.scrollTop(); style.left = _$top.scrollLeft(); that._setFixed(mask) } style.zIndex = index; style.display = ''; that.zindex(); that.DOM.border.addClass('ui_state_lock'); that._lock = true; return that }, unlock: function () { var that = this, config = that.config, mask = $('#ldg_lockmask', _doc)[0]; if (mask && that._lock) { if (config.parent && config.parent._lock) { var index = config.parent.DOM.wrap[0].style.zIndex; mask.style.zIndex = parseInt(index, 10) - 1 } else mask.style.display = 'none'; that.DOM.border.removeClass('ui_state_lock') } that._lock = false; return that }, close: function () { var that = this, DOM = that.DOM, wrap = DOM.wrap, list = lhgdialog.list, fn = that.config.close; that.time(); if (that.iframe) { if (typeof fn === 'function' && fn.call(that, that.iframe.contentWindow, window) === false) return that; $(that.iframe).unbind('load', that._fmLoad).attr('src', "javascript:''").remove(); DOM.content.removeClass('ui_state_full'); if (that._frmTimer) clearTimeout(that._frmTimer) } else { if (typeof fn === 'function' && fn.call(that, window) === false) return that } that.unlock(); if (that._maxState) { _$html.removeClass('ui_lock_scroll'); DOM.res[0].style.display = 'none' } if (lhgdialog.focus === that) lhgdialog.focus = null; that._removeEvent(); delete list[that.config.id]; if (_singleton) wrap.remove(); else { _singleton = that; if (that._minState) { DOM.main[0].style.display = ''; DOM.buttons[0].style.display = ''; DOM.dialog[0].style.width = '' } DOM.wrap[0].style.cssText = 'left:0;top:0;'; DOM.wrap[0].className = ''; DOM.border.removeClass('ui_state_focus'); DOM.title[0].innerHTML = ''; DOM.content.html(''); DOM.icon[0].innerHTML = ''; DOM.buttons[0].innerHTML = ''; that.hide(true)._setAbsolute(); for (var i in that) { if (that.hasOwnProperty(i) && i !== 'DOM') delete that[i] } } that.closed = true; return that }, max: function () { var that = this, maxSize, DOM = that.DOM, wrapStyle = DOM.wrap[0].style, mainStyle = DOM.main[0].style, rbStyle = DOM.rb[0].style, titleStyle = DOM.title[0].style, config = that.config, top = _$top.scrollTop(), left = _$top.scrollLeft(); if (!that._maxState) { _$html.addClass('ui_lock_scroll'); if (that._minState) that.min(); that._or = { t: wrapStyle.top, l: wrapStyle.left, w: mainStyle.width, h: mainStyle.height, d: config.drag, r: config.resize, rc: rbStyle.cursor, tc: titleStyle.cursor }; wrapStyle.top = top + 'px'; wrapStyle.left = left + 'px'; maxSize = that._maxSize(); that.size(maxSize.w, maxSize.h)._setAbsolute(); if (_ie6 && _doctype) wrapStyle.width = _$top.width() + 'px'; config.drag = false; config.resize = false; rbStyle.cursor = 'auto'; titleStyle.cursor = 'auto'; DOM.max[0].style.display = 'none'; DOM.res[0].style.display = 'inline-block'; that._maxState = true } else { _$html.removeClass('ui_lock_scroll'); wrapStyle.top = that._or.t; wrapStyle.left = that._or.l; that.size(that._or.w, that._or.h)._autoPositionType(); config.drag = that._or.d; config.resize = that._or.r; rbStyle.cursor = that._or.rc; titleStyle.cursor = that._or.tc; DOM.res[0].style.display = 'none'; DOM.max[0].style.display = 'inline-block'; delete that._or; that._maxState = false } return that }, min: function () { var that = this, DOM = that.DOM, main = DOM.main[0].style, buttons = DOM.buttons[0].style, dialog = DOM.dialog[0].style, rb = DOM.rb[0].style.cursor, resize = that.config.resize; if (!that._minState) { if (that._maxState) that.max(); that._minRz = {rzs: resize, btn: buttons.display}; main.display = 'none'; buttons.display = 'none'; dialog.width = main.width; rb.cursor = 'auto'; resize = false; that._minState = true } else { main.display = ''; buttons.display = that._minRz.btn; dialog.width = ''; resize = that._minRz; rb.cursor = that._minRz.rzs ? 'se-resize' : 'auto'; delete that._minRz; that._minState = false } that._ie6SelectFix(); return that }, get: function (id, object) { if (lhgdialog.list[id]) { if (object === 1) return lhgdialog.list[id]; else return lhgdialog.list[id].content || null } return null }, reload: function (win, url, callback) { win = win || window; try { win.location.href = url ? url : win.location.href } catch (e) { url = this.iframe.src; $(this.iframe).attr('src', url) } ;callback && callback.call(this); return this }, _iframe: function (url) { var that = this, iframe, $iframe, iwin, $idoc, $ibody, iWidth, iHeight, $content = that.DOM.content, config = that.config, loading = that._load = $('.ui_loading', $content[0])[0], initCss = 'position:absolute;left:-9999em;border:none 0;background:transparent', loadCss = 'width:100%;height:100%;border:none 0;'; if (config.cache === false) { var ts = (new Date).getTime(), ret = url.replace(/([?&])_=[^&]*/, '$1_=' + ts); url = ret + ((ret === url) ? (/\?/.test(url) ? '&' : '?') + '_=' + ts : '') } iframe = that.iframe = _doc.createElement('iframe'); iframe.name = config.id; iframe.style.cssText = initCss; iframe.setAttribute('frameborder', 0, 0); $iframe = $(iframe); $content[0].appendChild(iframe); that._frmTimer = setTimeout(function () { $iframe.attr('src', url) }, 1); var load = that._fmLoad = function () { $content.addClass('ui_state_full'); var DOM = that.DOM, ltSize, lt = DOM.lt[0].offsetHeight, main = DOM.main[0].style; loading.style.cssText = 'display:none;position:absolute;background:#FFF;opacity:0;filter:alpha(opacity=0);z-index:1;width:' + main.width + ';height:' + main.height + ';'; try { iwin = that.content = iframe.contentWindow; $idoc = $(iwin.document); $ibody = $(iwin.document.body) } catch (e) { iframe.style.cssText = loadCss; return } iWidth = config.width === 'auto' ? $idoc.width() + (_ie6 ? 0 : parseInt($ibody.css('marginLeft'))) : config.width; iHeight = config.height === 'auto' ? $idoc.height() : config.height; setTimeout(function () { iframe.style.cssText = loadCss }, 0); if (!that._maxState) { that.size(iWidth, iHeight).position(config.left, config.top) } loading.style.width = main.width; loading.style.height = main.height; config.init && config.init.call(that, iwin, _top) }; that.iframe.api = that; $iframe.bind('load', load) }, _getDOM: function () { var wrap = _doc.createElement('div'), body = _doc.body; wrap.style.cssText = 'position:absolute;left:0;top:0;visibility:hidden;'; wrap.innerHTML = dialogTpl; var name, i = 0, DOM = {wrap: $(wrap)}, els = wrap.getElementsByTagName('*'), len = els.length; for (; i < len; i++) { name = els[i].className.split('ui_')[1]; if (name) DOM[name] = $(els[i]) } ;body.insertBefore(wrap, body.firstChild); return DOM }, _toNumber: function (thisValue, maxValue) { if (typeof thisValue === 'number') return thisValue; if (thisValue.indexOf('%') !== -1) thisValue = parseInt(maxValue * thisValue.split('%')[0] / 100); return thisValue }, _maxSize: function () { var that = this, DOM = that.DOM, wrap = DOM.wrap[0], main = DOM.main[0], maxWidth, maxHeight; maxWidth = _$top.width() - wrap.offsetWidth + main.offsetWidth; maxHeight = _$top.height() - wrap.offsetHeight + main.offsetHeight; return {w: maxWidth, h: maxHeight} }, _ie6PngFix: function () { if (_ie6) { var i = 0, elem, png, pngPath, runtimeStyle, path = lhgdialog.setting.path + '/skins/', list = this.DOM.wrap[0].getElementsByTagName('*'); for (; i < list.length; i++) { elem = list[i]; png = elem.currentStyle['png']; if (png) { pngPath = path + png; runtimeStyle = elem.runtimeStyle; runtimeStyle.backgroundImage = 'none'; runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + pngPath + "',sizingMethod='scale')" } } } return this }, _ie6SelectFix: _ie6 ? function () { var $wrap = this.DOM.wrap, wrap = $wrap[0], expando = expando + 'iframeMask', iframe = $wrap[expando], width = wrap.offsetWidth, height = wrap.offsetHeight; width = width + 'px'; height = height + 'px'; if (iframe) { iframe.style.width = width; iframe.style.height = height } else { iframe = wrap.appendChild(_doc.createElement('iframe')); $wrap[expando] = iframe; iframe.src = "javascript:''"; iframe.style.cssText = 'position:absolute;z-index:-1;left:0;top:0;filter:alpha(opacity=0);width:' + width + ';height:' + height } } : _fn, _autoPositionType: function () { this[this.config.fixed ? '_setFixed' : '_setAbsolute']() }, _setFixed: function (el) { var style = el ? el.style : this.DOM.wrap[0].style; if (_ie6) { var sLeft = _$top.scrollLeft(), sTop = _$top.scrollTop(), left = parseInt(style.left) - sLeft, top = parseInt(style.top) - sTop, txt = _doctype ? 'this.ownerDocument.body' : 'this.ownerDocument.documentElement'; this._setAbsolute(); style.setExpression('left', txt + '.scrollLeft +' + left); style.setExpression('top', txt + '.scrollTop +' + top) } else style.position = 'fixed' }, _setAbsolute: function () { var style = this.DOM.wrap[0].style; if (_ie6) { style.removeExpression('left'); style.removeExpression('top') } style.position = 'absolute' }, _click: function (name) { var that = this, fn = that._listeners[name] && that._listeners[name].callback; return typeof fn !== 'function' || fn.call(that, window) !== false ? that.close() : that }, _reset: function () { var test = !!window.ActiveXObject, newSize, that = this, tw = _$top.width(), tt = _$top.height(), oldSize = that._winSize || tw * tt, oldWidth = that._lockDocW || tw, left = that._left, top = that._top; if (test) { if (that._lock && _ie6) $('#ldg_lockmask', _doc).css({width: tw + 'px', height: tt + 17 + 'px'}); newWidth = that._lockDocW = tw; newSize = that._winSize = tw * tt; if (oldSize === newSize) return } ; if (that._maxState) { var size = that._maxSize(); that.size(size.w, size.h) } if (test && Math.abs(oldWidth - newWidth) === 17) return; if (left || top) that.position(left, top) }, _addEvent: function () { var resizeTimer, that = this, config = that.config, DOM = that.DOM; that._winResize = function () { resizeTimer && clearTimeout(resizeTimer); resizeTimer = setTimeout(function () { that._reset() }, 140) }; _$top.bind('resize', that._winResize); DOM.wrap.bind('click', function (event) { var target = event.target, callbackID; if (target.disabled) return false; if (target === DOM.close[0]) { that._click('cancel'); return false } else if (target === DOM.max[0] || target === DOM.res[0] || target === DOM.max_b[0] || target === DOM.res_b[0] || target === DOM.res_t[0]) { that.max(); return false } else if (target === DOM.min[0] || target === DOM.min_b[0]) { that.min(); return false } else { callbackID = target[expando + 'callback']; callbackID && that._click(callbackID) } }).bind('mousedown', function (event) { that.zindex(); var target = event.target; if (config.drag !== false && target === DOM.title[0] || config.resize !== false && target === DOM.rb[0]) { _use(event); return false } }); if (config.max) DOM.title.bind('dblclick', function () { that.max(); return false }) }, _removeEvent: function () { var that = this, DOM = that.DOM; DOM.wrap.unbind(); DOM.title.unbind(); _$top.unbind('resize', that._winResize) } }; lhgdialog.fn._init.prototype = lhgdialog.fn; lhgdialog.focus = null; lhgdialog.list = {}; onKeyDown = function (event) { var target = event.target, api = lhgdialog.focus, keyCode = event.keyCode; if (!api || !api.config.esc || api.config.cancel === false) return; keyCode === 27 && api._click(api.config.cancelVal) }; _$doc.bind('keydown', onKeyDown); _top != window && $(window).bind('unload', function () { var list = lhgdialog.list; for (var i in list) { if (list[i]) list[i].close() } _singleton && _singleton.DOM.wrap.remove(); _$doc.unbind('keydown', onKeyDown); $('#ldg_lockmask', _doc)[0] && $('#ldg_lockmask', _doc).remove(); $('#ldg_dragmask', _doc)[0] && $('#ldg_dragmask', _doc).remove() }); lhgdialog.setting = { content: '
loading...
', title: '\u89C6\u7A97 ', button: null, ok: null, cancel: null, init: null, close: null, okVal: '\u786E\u5B9A', cancelVal: '\u53D6\u6D88', skin: '', esc: true, show: true, width: 'auto', height: 'auto', icon: null, path: _path, lock: false, focus: true, parent: null, padding: '10px', fixed: false, left: '50%', top: '38.2%', max: true, min: true, zIndex: 1976, resize: true, drag: true, cache: true, data: null, extendDrag: false }; var _use, _isSetCapture = 'setCapture' in _root, _isLosecapture = 'onlosecapture' in _root; lhgdialog.dragEvent = { onstart: _fn, start: function (event) { var that = lhgdialog.dragEvent; _$doc.bind('mousemove', that.move).bind('mouseup', that.end); that._sClientX = event.clientX; that._sClientY = event.clientY; that.onstart(event.clientX, event.clientY); return false }, onmove: _fn, move: function (event) { var that = lhgdialog.dragEvent; that.onmove(event.clientX - that._sClientX, event.clientY - that._sClientY); return false }, onend: _fn, end: function (event) { var that = lhgdialog.dragEvent; _$doc.unbind('mousemove', that.move).unbind('mouseup', that.end); that.onend(event.clientX, event.clientY); return false } }; _use = function (event) { var limit, startWidth, startHeight, startLeft, startTop, isResize, api = lhgdialog.focus, config = api.config, DOM = api.DOM, wrap = DOM.wrap[0], title = DOM.title, main = DOM.main[0], _dragEvent = lhgdialog.dragEvent, clsSelect = 'getSelection' in _top ? function () { _top.getSelection().removeAllRanges() } : function () { try { _doc.selection.empty() } catch (e) { } }; _dragEvent.onstart = function (x, y) { if (isResize) { startWidth = main.offsetWidth; startHeight = main.offsetHeight } else { startLeft = wrap.offsetLeft; startTop = wrap.offsetTop } ;_$doc.bind('dblclick', _dragEvent.end); !_ie6 && _isLosecapture ? title.bind('losecapture', _dragEvent.end) : _$top.bind('blur', _dragEvent.end); _isSetCapture && title[0].setCapture(); DOM.border.addClass('ui_state_drag'); api.focus() }; _dragEvent.onmove = function (x, y) { if (isResize) { var wrapStyle = wrap.style, style = main.style, width = x + startWidth, height = y + startHeight; wrapStyle.width = 'auto'; config.width = style.width = Math.max(0, width) + 'px'; wrapStyle.width = wrap.offsetWidth + 'px'; config.height = style.height = Math.max(0, height) + 'px'; api._load && $(api._load).css({width: style.width, height: style.height}) } else { var style = wrap.style, left = x + startLeft, top = y + startTop; config.left = Math.max(limit.minX, Math.min(limit.maxX, left)); config.top = Math.max(limit.minY, Math.min(limit.maxY, top)); style.left = config.left + 'px'; style.top = config.top + 'px' } clsSelect() }; _dragEvent.onend = function (x, y) { _$doc.unbind('dblclick', _dragEvent.end); !_ie6 && _isLosecapture ? title.unbind('losecapture', _dragEvent.end) : _$top.unbind('blur', _dragEvent.end); _isSetCapture && title[0].releaseCapture(); _ie6 && api._autoPositionType(); DOM.border.removeClass('ui_state_drag') }; isResize = event.target === DOM.rb[0] ? true : false; limit = (function (fixed) { var ow = wrap.offsetWidth, oh = title[0].offsetHeight || 20, ww = _$top.width(), wh = _$top.height(), dl = fixed ? 0 : _$top.scrollLeft(), dt = fixed ? 0 : _$top.scrollTop(); maxX = ww - ow + dl; maxY = wh - oh + dt; return {minX: dl, minY: dt, maxX: maxX, maxY: maxY} })(wrap.style.position === 'fixed'); _dragEvent.start(event) }; $(function () { setTimeout(function () { if (_count) return; lhgdialog({left: '-9999em', time: 9, fixed: false, lock: false, focus: false}) }, 150); lhgdialog.setting.extendDrag && (function (dragEvent) { var mask = _doc.createElement('div'), style = mask.style, positionType = _ie6 ? 'absolute' : 'fixed'; mask.id = 'ldg_dragmask'; style.cssText = 'display:none;position:' + positionType + ';left:0;top:0;width:100%;height:100%;cursor:move;filter:alpha(opacity=0);opacity:0;background:#FFF;pointer-events:none;'; _doc.body.appendChild(mask); dragEvent._start = dragEvent.start; dragEvent._end = dragEvent.end; dragEvent.start = function () { var api = lhgdialog.focus, main = api.DOM.main[0], iframe = api.iframe; dragEvent._start.apply(this, arguments); style.display = 'block'; style.zIndex = lhgdialog.setting.zIndex + 3; if (positionType === 'absolute') { style.width = _$top.width() + 'px'; style.height = _$top.height() + 'px'; style.left = _$doc.scrollLeft() + 'px'; style.top = _$doc.scrollTop() + 'px' } ; if (iframe && main.offsetWidth * main.offsetHeight > 307200) main.style.visibility = 'hidden' }; dragEvent.end = function () { var api = lhgdialog.focus; dragEvent._end.apply(this, arguments); style.display = 'none'; if (api) api.DOM.main[0].style.visibility = 'visible' } })(lhgdialog.dragEvent) }); $.fn.dialog = function () { var config = arguments; this.bind('click', function () { lhgdialog.apply(this, config); return false }); return this }; window.lhgdialog = $.dialog = lhgdialog })(this.jQuery || this.lhgcore, this); (function ($, lhgdialog, undefined) { var _zIndex = function () { return lhgdialog.setting.zIndex }; lhgdialog.alert = function (content, callback, parent) { return lhgdialog({ title: getRootWin().portalI18nMap.get("portal.lhgdialog.warning"), id: 'Alert', zIndex: _zIndex(), icon: 'alert.gif', fixed: true, lock: true, content: content, ok: true, okVal: getRootWin().portalI18nMap.get("portal.web.dialog.ok.btn"), cancelVal: getRootWin().portalI18nMap.get("portal.web.dialog.cancel.btn"), resize: false, close: callback, parent: parent || null }) }; lhgdialog.confirm = function (content, yes, no, parent) { return lhgdialog({ title: getRootWin().portalI18nMap.get("portal.lhgdialog.confirm"), id: 'confirm.gif', zIndex: _zIndex(), icon: 'confirm.gif', fixed: true, lock: true, content: content, resize: false, parent: parent || null, ok: function (here) { return yes.call(this, here) }, cancel: function (here) { return no && no.call(this, here) }, okVal: getRootWin().portalI18nMap.get("portal.web.dialog.ok.btn"), cancelVal: getRootWin().portalI18nMap.get("portal.web.dialog.cancel.btn") }) }; lhgdialog.prompt = function (content, yes, value, parent) { value = value || ''; var input; return lhgdialog({ title: getRootWin().portalI18nMap.get("portal.lhgdialog.prompt"), id: 'Prompt', zIndex: _zIndex(), icon: 'prompt.gif', fixed: true, lock: true, parent: parent || null, content: ['
', content, '
', '
', '', '
'].join(''), init: function () { input = this.DOM.content[0].getElementsByTagName('input')[0]; input.select(); input.focus() }, ok: function (here) { return yes && yes.call(this, input.value, here) }, okVal: getRootWin().portalI18nMap.get("portal.web.dialog.ok.btn"), cancelVal: getRootWin().portalI18nMap.get("portal.web.dialog.cancel.btn"), cancel: true }) }; lhgdialog.tips = function (content, time, icon, callback) { var reIcon = icon ? function () { this.DOM.icon[0].innerHTML = ''; this.DOM.icon[0].style.display = ''; if (callback) this.config.close = callback } : function () { this.DOM.icon[0].style.display = 'none'; if (callback) this.config.close = callback }; return lhgdialog({ id: 'Tips', zIndex: _zIndex(), title: false, cancel: false, fixed: true, lock: false, resize: false, okVal: getRootWin().portalI18nMap.get("portal.web.dialog.ok.btn"), cancelVal: getRootWin().portalI18nMap.get("portal.web.dialog.cancel.btn"), }).content(content).time(time || 1.5, reIcon) } })(this.jQuery || this.lhgcore, this.lhgdialog); lhgdialog.setting.cancelVal = getRootWin().portalI18nMap.get("portal.web.dialog.cancel.btn"); lhgdialog.setting.okVal = getRootWin().portalI18nMap.get("portal.web.dialog.ok.btn"); //jquery tips插件 $.extend($.fn, { Tips: function (f) { var e = $.extend({type: "load", text: "加载中...", time: 3}, f), h = ".jquery_tips", d = {okay: "#080", warn: "#808", error: "#800", load: "#008"}; if ($(h).length > 0) { $(h).remove() } var a = e.text.length * 14 + 65, g = $(document).width() / 2 - a / 2, b = $(document).scrollTop() + 200; return $('

' + e.text + "

").css({ width: a, left: g, top: b, color: d[e.type] }).appendTo("body").delay((e.time - 1) * 1000).fadeOut(1000, function () { $(h).remove() }) } }); var path = "/eportal/uiFramework/huilan-jquery-ui/images/simple-tree/"; $.fn.simpleTree = function (b) { return this.each(function () { var k = this; var m = $(".root", this); var q = false; var l = false; var r = false; var p = false; var a = false; var n = false; var o = Array(); k.option = { drag: true, animate: false, autoclose: false, speed: "fast", afterAjax: false, afterMove: false, afterClick: false, afterDblClick: false, afterContextMenu: false, docToFolderConvert: false }; k.option = $.extend(k.option, b); $.extend(this, { getSelected: function () { return $("span.active", this).parent() } }); k.closeNearby = function (c) { $(c).siblings().filter(".folder-open, .folder-open-last").each(function () { var e = $(">ul", this); var d = this.className; this.className = d.replace("open", "close"); if (k.option.animate) { e.animate({height: "toggle"}, k.option.speed) } else { e.hide() } }) }; k.nodeToggle = function (c) { var d = $(">ul", c); if (d.is(":visible")) { c.className = c.className.replace("open", "close"); if (k.option.animate) { d.animate({height: "toggle"}, k.option.speed) } else { d.hide() } } else { c.className = c.className.replace("close", "open"); if (k.option.animate) { d.animate({height: "toggle"}, k.option.speed, function () { if (k.option.autoclose) { k.closeNearby(c) } if (d.is(".ajax")) { k.setAjaxNodes(d, c.id) } }) } else { d.show(); if (k.option.autoclose) { k.closeNearby(c) } if (d.is(".ajax")) { k.setAjaxNodes(d, c.id) } } } }; k.setAjaxNodes = function (d, f, c) { if ($.inArray(f, o) == -1) { o[o.length] = f; var e = $.trim($(">li", d).text()); if (e && e.indexOf("url:")) { e = $.trim(e.replace(/.*\{url:(.*)\}/i, "$1")); $.ajax({ type: "GET", url: e, contentType: "html", cache: false, success: function (g) { d.removeAttr("class"); d.html(g); $.extend(d, {url: e}); k.setTreeNodes(d, true); if (typeof k.option.afterAjax == "function") { k.option.afterAjax(d) } if (typeof c == "function") { c(d) } } }) } } }; k.setTreeNodes = function (c, d) { c = d ? c.parent() : c; $("li>span", c).addClass("text").bind("selectstart", function () { return false }).click(function () { $(".active", k).attr("class", "text"); if (this.className == "text") { this.className = "active" } if (typeof k.option.afterClick == "function") { k.option.afterClick($(this).parent()) } return false }).dblclick(function () { q = false; k.nodeToggle($(this).parent().get(0)); if (typeof k.option.afterDblClick == "function") { k.option.afterDblClick($(this).parent()) } return false }).bind("contextmenu", function () { $(".active", k).attr("class", "text"); if (this.className == "text") { this.className = "active" } if (typeof k.option.afterContextMenu == "function") { k.option.afterContextMenu($(this).parent()) } return false }).mousedown(function (f) { q = true; cloneNode = $(this).parent().clone(); var e = $(this).parent(); if (k.option.drag) { $(">ul", cloneNode).hide(); $("body").append('
'); $("#drag_container").hide().css({opacity: "0.8"}); $("#drag_container >ul").append(cloneNode); $("").attr({id: "tree_plus", src: path + "plus.gif"}).css({ width: "7px", display: "block", position: "absolute", left: "5px", top: "5px", display: "none" }).appendTo("body"); $(document).bind("mousemove", {LI: e}, k.dragStart).bind("mouseup", k.dragEnd) } return false }).mouseup(function () { if (q && l && a) { k.moveNodeToFolder($(this).parent()) } k.eventDestroy() }); $("li", c).each(function (h) { var g = this.className; var j = false; var t = false; var e = this; var i = $(">ul", this); if (i.size() > 0) { var f = "folder-"; if (g && g.indexOf("open") >= 0) { f = f + "open"; j = true } else { f = f + "close" } this.className = f + ($(this).is(":last-child") ? "-last" : ""); if (!j || g.indexOf("ajax") >= 0) { i.hide() } k.setTrigger(this) } else { var f = "doc"; this.className = f + ($(this).is(":last-child") ? "-last" : "") } }).before('
  •  
  • ').filter(":last-child").after('
  • '); k.setEventLine($(".line, .line-last", c)) }; k.setTrigger = function (c) { $(">span", c).before(""); var d = $(">.trigger", c); d.click(function (e) { k.nodeToggle(c) }); if (!$.browser.msie) { d.css("float", "left") } }; k.dragStart = function (j) { var i = $(j.data.LI); if (q) { l = true; if (n) { clearTimeout(n) } if ($("#drag_container:not(:visible)")) { $("#drag_container").show(); i.prev(".line").hide(); a = i } $("#drag_container").css({position: "absolute", left: (j.pageX + 5), top: (j.pageY + 15)}); if (i.is(":visible")) { i.hide() } var g = false; if (j.target.tagName.toLowerCase() == "span" && $.inArray(j.target.className, Array("text", "active", "trigger")) != -1) { var c = j.target.parentNode; var d = $(c).offset({scroll: false}); var t = {x: (d.left - 3), y: j.pageY - d.top}; var e = $("#tree_plus").attr("src"); var f = $(">ul.ajax", c).size(); var h = $(">ul.ajax", c); t.x += 19; t.y = j.pageY - t.y + 5; if (c.className.indexOf("folder-close") >= 0 && f == 0) { if (e.indexOf("minus") != -1) { $("#tree_plus").attr("src", path + "plus.gif") } $("#tree_plus").css({left: t.x, top: t.y}).show(); n = setTimeout(function () { c.className = c.className.replace("close", "open"); $(">ul", c).show() }, 700) } else { if (c.className.indexOf("folder") >= 0 && f == 0) { if (e.indexOf("minus") != -1) { $("#tree_plus").attr("src", path + "plus.gif") } $("#tree_plus").css({left: t.x, top: t.y}).show() } else { if (c.className.indexOf("folder-close") >= 0 && f > 0) { l = false; $("#tree_plus").attr("src", path + "minus.gif"); $("#tree_plus").css({left: t.x, top: t.y}).show(); $(">ul", c).show(); k.setAjaxNodes(h, c.id, function () { c.className = c.className.replace("close", "open"); l = true; $("#tree_plus").attr("src", path + "plus.gif"); $("#tree_plus").css({left: t.x, top: t.y}).show() }) } else { if (k.option.docToFolderConvert) { $("#tree_plus").css({left: t.x, top: t.y}).show() } else { $("#tree_plus").hide() } } } } } else { $("#tree_plus").hide() } return false } return true }; k.dragEnd = function () { if (n) { clearTimeout(n) } k.eventDestroy() }; k.setEventLine = function (c) { c.mouseover(function () { if (this.className.indexOf("over") < 0 && q && l) { this.className = this.className.replace("line", "line-over") } }).mouseout(function () { if (this.className.indexOf("over") >= 0) { this.className = this.className.replace("-over", "") } }).mouseup(function () { if (q && a && l) { p = $(this).parents("li:first"); k.moveNodeToLine(this); k.eventDestroy() } }) }; k.checkNodeIsLast = function (c) { if (c.className.indexOf("last") >= 0) { var d = a.prev().prev(); if (d.size() > 0) { d[0].className += "-last" } c.className = c.className.replace("-last", "") } }; k.checkLineIsLast = function (d) { if (d.className.indexOf("last") >= 0) { var c = $(d).prev(); if (c.size() > 0) { c[0].className = c[0].className.replace("-last", "") } a[0].className += "-last" } }; k.eventDestroy = function () { $(document).unbind("mousemove", k.dragStart).unbind("mouseup").unbind("mousedown"); $("#drag_container, #tree_plus").remove(); if (a) { $(a).show().prev(".line").show() } p = a = q = l = false }; k.convertToFolder = function (c) { c[0].className = c[0].className.replace("doc", "folder-open"); c.append(''); k.setTrigger(c[0]); k.setEventLine($(".line, .line-last", c)) }; k.convertToDoc = function (c) { $(">ul", c).remove(); $("img", c).remove(); c[0].className = c[0].className.replace(/folder-(open|close)/gi, "doc") }; k.moveNodeToFolder = function (c) { if (!k.option.docToFolderConvert && c[0].className.indexOf("doc") != -1) { return true } else { if (k.option.docToFolderConvert && c[0].className.indexOf("doc") != -1) { k.convertToFolder(c) } } k.checkNodeIsLast(a[0]); var d = $(">ul >.line-last", c); if (d.size() > 0) { k.moveNodeToLine(d[0]) } }; k.moveNodeToLine = function (g) { k.checkNodeIsLast(a[0]); k.checkLineIsLast(g); var c = $(a).parents("li:first"); var d = $(a).prev(".line"); $(g).before(a); $(a).before(d); g.className = g.className.replace("-over", ""); var e = $(">ul >li", c).not(".line, .line-last").filter(":visible").size(); if (k.option.docToFolderConvert && e == 0) { k.convertToDoc(c) } else { if (e == 0) { c[0].className = c[0].className.replace("open", "close"); $(">ul", c).hide() } } if ($("span:first", a).attr("class") == "text") { $(".active", k).attr("class", "text"); $("span:first", a).attr("class", "active") } if (typeof (k.option.afterMove) == "function") { var f = $(a).prevAll(":not(.line)").size(); k.option.afterMove($(g).parents("li:first"), $(a), f) } }; k.addNode = function (f, d, c) { var e = $('
  • "); k.setTreeNodes(e); p = k.getSelected(); a = $(".doc-last", e); k.moveNodeToFolder(p); e.remove(); if (typeof (c) == "function") { c(p, a) } }; k.delNode = function (c) { a = k.getSelected(); k.checkNodeIsLast(a[0]); a.prev().remove(); a.remove(); if (typeof (c) == "function") { c(p) } }; k.init = function (c) { k.setTreeNodes(c, false) }; k.init(m) }) }; (function (j) { var h = [], k = /^url\(["']?([^"'\)]*)["']?\);?$/i, l = /\.png$/i, g = !!window.createPopup && document.documentElement.currentStyle.minWidth == "undefined"; function i() { j.each(h, function () { this.refresh(true) }) } j(window).resize(i); j.Poshytip = function (a, b) { this.$elm = j(a); this.opts = j.extend({}, j.fn.poshytip.defaults, b); this.$tip = j(['
    ', '
    ', '
    ', "
    "].join("")).appendTo(document.body); this.$arrow = this.$tip.find("div.tip-arrow"); this.$inner = this.$tip.find("div.tip-inner"); this.disabled = false; this.content = null; this.init() }; j.Poshytip.prototype = { init: function () { h.push(this); var a = this.$elm.attr("title"); this.$elm.data("title.poshytip", a !== undefined ? a : null).data("poshytip", this); if (this.opts.showOn != "none") { this.$elm.bind({ "mouseenter.poshytip": j.proxy(this.mouseenter, this), "mouseleave.poshytip": j.proxy(this.mouseleave, this) }); switch (this.opts.showOn) { case"hover": if (this.opts.alignTo == "cursor") { this.$elm.bind("mousemove.poshytip", j.proxy(this.mousemove, this)) } if (this.opts.allowTipHover) { this.$tip.hover(j.proxy(this.clearTimeouts, this), j.proxy(this.mouseleave, this)) } break; case"focus": this.$elm.bind({ "focus.poshytip": j.proxy(this.showDelayed, this), "blur.poshytip": j.proxy(this.hideDelayed, this) }); break } } }, mouseenter: function (a) { if (this.disabled) { return true } this.$elm.attr("title", ""); if (this.opts.showOn == "focus") { return true } this.showDelayed() }, mouseleave: function (b) { if (this.disabled || this.asyncAnimating && (this.$tip[0] === b.relatedTarget || jQuery.contains(this.$tip[0], b.relatedTarget))) { return true } if (!this.$tip.data("active")) { var a = this.$elm.data("title.poshytip"); if (a !== null) { this.$elm.attr("title", a) } } if (this.opts.showOn == "focus") { return true } this.hideDelayed() }, mousemove: function (a) { if (this.disabled) { return true } this.eventX = a.pageX; this.eventY = a.pageY; if (this.opts.followCursor && this.$tip.data("active")) { this.calcPos(); this.$tip.css({left: this.pos.l, top: this.pos.t}); if (this.pos.arrow) { this.$arrow[0].className = "tip-arrow tip-arrow-" + this.pos.arrow } } }, show: function () { if (this.disabled || this.$tip.data("active")) { return } this.reset(); this.update(); if (!this.content) { return } this.display(); if (this.opts.timeOnScreen) { this.hideDelayed(this.opts.timeOnScreen) } }, showDelayed: function (a) { this.clearTimeouts(); this.showTimeout = setTimeout(j.proxy(this.show, this), typeof a == "number" ? a : this.opts.showTimeout) }, hide: function () { if (this.disabled || !this.$tip.data("active")) { return } this.display(true) }, hideDelayed: function (a) { this.clearTimeouts(); this.hideTimeout = setTimeout(j.proxy(this.hide, this), typeof a == "number" ? a : this.opts.hideTimeout) }, reset: function () { this.$tip.queue([]).detach().css("visibility", "hidden").data("active", false); this.$inner.find("*").poshytip("hide"); if (this.opts.fade) { this.$tip.css("opacity", this.opacity) } this.$arrow[0].className = "tip-arrow tip-arrow-top tip-arrow-right tip-arrow-bottom tip-arrow-left"; this.asyncAnimating = false }, update: function (b, a) { if (this.disabled) { return } var c = b !== undefined; if (c) { if (!a) { this.opts.content = b } if (!this.$tip.data("active")) { return } } else { b = this.opts.content } var d = this, e = typeof b == "function" ? b.call(this.$elm[0], function (f) { d.update(f) }) : b == "[title]" ? this.$elm.data("title.poshytip") : b; if (this.content !== e) { this.$inner.empty().append(e); this.content = e } this.refresh(c) }, refresh: function (s) { if (this.disabled) { return } if (s) { if (!this.$tip.data("active")) { return } var f = {left: this.$tip.css("left"), top: this.$tip.css("top")} } this.$tip.css({left: 0, top: 0}).appendTo(document.body); if (this.opacity === undefined) { this.opacity = this.$tip.css("opacity") } var e = this.$tip.css("background-image").match(k), d = this.$arrow.css("background-image").match(k); if (e) { var r = l.test(e[1]); if (g && r) { this.$tip.css("background-image", "none"); this.$inner.css({margin: 0, border: 0, padding: 0}); e = r = false } else { this.$tip.prepend('
    ').css({ border: 0, padding: 0, "background-image": "none", "background-color": "transparent" }).find(".tip-bg-image").css("background-image", 'url("' + e[1] + '")').end().find("td").eq(3).append(this.$inner) } if (r && !j.support.opacity) { this.opts.fade = false } } if (d && !j.support.opacity) { if (g && l.test(d[1])) { d = false; this.$arrow.css("background-image", "none") } this.opts.fade = false } var b = this.$tip.find("> table.tip-table"); if (g) { this.$tip[0].style.width = ""; b.width("auto").find("td").eq(3).width("auto"); var c = this.$tip.width(), q = parseInt(this.$tip.css("min-width")), t = parseInt(this.$tip.css("max-width")); if (!isNaN(q) && c < q) { c = q } else { if (!isNaN(t) && c > t) { c = t } } this.$tip.add(b).width(c).eq(0).find("td").eq(3).width("100%") } else { if (b[0]) { b.width("auto").find("td").eq(3).width("auto").end().end().width(document.defaultView && document.defaultView.getComputedStyle && parseFloat(document.defaultView.getComputedStyle(this.$tip[0], null).width) || this.$tip.width()).find("td").eq(3).width("100%") } } this.tipOuterW = this.$tip.outerWidth(); this.tipOuterH = this.$tip.outerHeight(); this.calcPos(); if (d && this.pos.arrow) { this.$arrow[0].className = "tip-arrow tip-arrow-" + this.pos.arrow; this.$arrow.css("visibility", "inherit") } if (s && this.opts.refreshAniDuration) { this.asyncAnimating = true; var a = this; this.$tip.css(f).animate({ left: this.pos.l, top: this.pos.t }, this.opts.refreshAniDuration, function () { a.asyncAnimating = false }) } else { this.$tip.css({left: this.pos.l, top: this.pos.t}) } }, display: function (f) { var e = this.$tip.data("active"); if (e && !f || !e && f) { return } this.$tip.stop(); if ((this.opts.slide && this.pos.arrow || this.opts.fade) && (f && this.opts.hideAniDuration || !f && this.opts.showAniDuration)) { var p = {}, a = {}; if (this.opts.slide && this.pos.arrow) { var b, o; if (this.pos.arrow == "bottom" || this.pos.arrow == "top") { b = "top"; o = "bottom" } else { b = "left"; o = "right" } var c = parseInt(this.$tip.css(b)); p[b] = c + (f ? 0 : (this.pos.arrow == o ? -this.opts.slideOffset : this.opts.slideOffset)); a[b] = c + (f ? (this.pos.arrow == o ? this.opts.slideOffset : -this.opts.slideOffset) : 0) + "px" } if (this.opts.fade) { p.opacity = f ? this.$tip.css("opacity") : 0; a.opacity = f ? 0 : this.opacity } this.$tip.css(p).animate(a, this.opts[f ? "hideAniDuration" : "showAniDuration"]) } f ? this.$tip.queue(j.proxy(this.reset, this)) : this.$tip.css("visibility", "inherit"); if (e) { var d = this.$elm.data("title.poshytip"); if (d !== null) { this.$elm.attr("title", d) } } this.$tip.data("active", !e) }, disable: function () { this.reset(); this.disabled = true }, enable: function () { this.disabled = false }, destroy: function () { this.reset(); this.$tip.remove(); delete this.$tip; this.content = null; this.$elm.unbind(".poshytip").removeData("title.poshytip").removeData("poshytip"); h.splice(j.inArray(this, h), 1) }, clearTimeouts: function () { if (this.showTimeout) { clearTimeout(this.showTimeout); this.showTimeout = 0 } if (this.hideTimeout) { clearTimeout(this.hideTimeout); this.hideTimeout = 0 } }, calcPos: function () { var d = {l: 0, t: 0, arrow: ""}, u = j(window), r = {l: u.scrollLeft(), t: u.scrollTop(), w: u.width(), h: u.height()}, b, s, e, t, a, v; if (this.opts.alignTo == "cursor") { b = s = e = this.eventX; t = a = v = this.eventY } else { var c = this.$elm.offset(), f = {l: c.left, t: c.top, w: this.$elm.outerWidth(), h: this.$elm.outerHeight()}; b = f.l + (this.opts.alignX != "inner-right" ? 0 : f.w); s = b + Math.floor(f.w / 2); e = b + (this.opts.alignX != "inner-left" ? f.w : 0); t = f.t + (this.opts.alignY != "inner-bottom" ? 0 : f.h); a = t + Math.floor(f.h / 2); v = t + (this.opts.alignY != "inner-top" ? f.h : 0) } switch (this.opts.alignX) { case"right": case"inner-left": d.l = e + this.opts.offsetX; if (this.opts.keepInViewport && d.l + this.tipOuterW > r.l + r.w) { d.l = r.l + r.w - this.tipOuterW } if (this.opts.alignX == "right" || this.opts.alignY == "center") { d.arrow = "left" } break; case"center": d.l = s - Math.floor(this.tipOuterW / 2); if (this.opts.keepInViewport) { if (d.l + this.tipOuterW > r.l + r.w) { d.l = r.l + r.w - this.tipOuterW } else { if (d.l < r.l) { d.l = r.l } } } break; default: d.l = b - this.tipOuterW - this.opts.offsetX; if (this.opts.keepInViewport && d.l < r.l) { d.l = r.l } if (this.opts.alignX == "left" || this.opts.alignY == "center") { d.arrow = "right" } } switch (this.opts.alignY) { case"bottom": case"inner-top": d.t = v + this.opts.offsetY; if (!d.arrow || this.opts.alignTo == "cursor") { d.arrow = "top" } if (this.opts.keepInViewport && d.t + this.tipOuterH > r.t + r.h) { d.t = t - this.tipOuterH - this.opts.offsetY; if (d.arrow == "top") { d.arrow = "bottom" } } break; case"center": d.t = a - Math.floor(this.tipOuterH / 2); if (this.opts.keepInViewport) { if (d.t + this.tipOuterH > r.t + r.h) { d.t = r.t + r.h - this.tipOuterH } else { if (d.t < r.t) { d.t = r.t } } } break; default: d.t = t - this.tipOuterH - this.opts.offsetY; if (!d.arrow || this.opts.alignTo == "cursor") { d.arrow = "bottom" } if (this.opts.keepInViewport && d.t < r.t) { d.t = v + this.opts.offsetY; if (d.arrow == "bottom") { d.arrow = "top" } } } this.pos = d } }; j.fn.poshytip = function (e) { if (typeof e == "string") { var f = arguments, a = e; Array.prototype.shift.call(f); if (a == "destroy") { this.die ? this.die("mouseenter.poshytip").die("focus.poshytip") : j(document).undelegate(this.selector, "mouseenter.poshytip").undelegate(this.selector, "focus.poshytip") } return this.each(function () { var n = j(this).data("poshytip"); if (n && n[a]) { n[a].apply(n, f) } }) } var c = j.extend({}, j.fn.poshytip.defaults, e); if (!j("#poshytip-css-" + c.className)[0]) { j(['"].join("")).appendTo("head") } if (c.liveEvents && c.showOn != "none") { var d, b = j.extend({}, c, {liveEvents: false}); switch (c.showOn) { case"hover": d = function () { var n = j(this); if (!n.data("poshytip")) { n.poshytip(b).poshytip("mouseenter") } }; this.live ? this.live("mouseenter.poshytip", d) : j(document).delegate(this.selector, "mouseenter.poshytip", d); break; case"focus": d = function () { var n = j(this); if (!n.data("poshytip")) { n.poshytip(b).poshytip("showDelayed") } }; this.live ? this.live("focus.poshytip", d) : j(document).delegate(this.selector, "focus.poshytip", d); break } return this } return this.each(function () { new j.Poshytip(this, c) }) }; j.fn.poshytip.defaults = { content: "[title]", className: "tip-yellow", bgImageFrameSize: 10, showTimeout: 500, hideTimeout: 100, timeOnScreen: 0, showOn: "hover", liveEvents: false, alignTo: "cursor", alignX: "right", alignY: "top", offsetX: -22, offsetY: 18, keepInViewport: true, allowTipHover: true, followCursor: false, fade: true, slide: true, slideOffset: 8, showAniDuration: 300, hideAniDuration: 300, refreshAniDuration: 200 } })(jQuery); /* layer-v2.0 */ ;!function (a, b) { "use strict"; var c, d, e = { getPath: function () { var a = document.scripts, b = a[a.length - 1], c = b.src; if (!b.getAttribute("merge")) return c.substring(0, c.lastIndexOf("/") + 1) }(), enter: function (a) { 13 === a.keyCode && a.preventDefault() }, config: {}, end: {}, btn: ["确定", "取消"], type: ["dialog", "page", "iframe", "loading", "tips"] }, f = { v: "2.0", ie6: !!a.ActiveXObject && !a.XMLHttpRequest, index: 0, path: e.getPath, config: function (a, b) { var d = 0; return a = a || {}, f.cache = e.config = c.extend(e.config, a), f.path = e.config.path || f.path, "string" == typeof a.extend && (a.extend = [a.extend]), f.use("skin/layer.css", a.extend && a.extend.length > 0 ? function g() { var c = a.extend; f.use(c[c[d] ? d : d - 1], d < c.length ? function () { return ++d, g }() : b) }() : b), this }, use: function (a, b, d) { var e = c("head")[0], a = a.replace(/\s/g, ""), g = /\.css$/.test(a), h = document.createElement(g ? "link" : "script"), i = "layui_layer_" + a.replace(/\.|\//g, ""); return f.path ? (g && (h.rel = "stylesheet"), h[g ? "href" : "src"] = /^http:\/\//.test(a) ? a : f.path + a, h.id = i, c("#" + i)[0] || e.appendChild(h), function j() { (g ? 1989 === parseInt(c("#" + i).css("width")) : f[d || i]) ? function () { b && b(); try { g || e.removeChild(h) } catch (a) { } }() : setTimeout(j, 100) }(), this) : void 0 }, ready: function (a, b) { var d = "function" == typeof a; return d && (b = a), f.config(c.extend(e.config, function () { return d ? {} : {path: a} }()), b), this }, alert: function (a, b, d) { var e = "function" == typeof b; return e && (d = b), f.open(c.extend({content: a, yes: d}, e ? {} : b)) }, confirm: function (a, b, d, g) { var h = "function" == typeof b; return h && (g = d, d = b), f.open(c.extend({ content: a, btn: e.btn, yes: d, cancel: g }, h ? {} : b)) }, msg: function (a, d, g) { var i = "function" == typeof d, j = e.config.skin, k = (j ? j + " " + j + "-msg" : "") || "layui-layer-msg", l = h.anim.length - 1; return i && (g = d), f.open(c.extend({ content: a, time: 3e3, shade: !1, skin: k, title: !1, closeBtn: !1, btn: !1, end: g }, i && !e.config.skin ? {skin: k + " layui-layer-hui", shift: l} : function () { return d = d || {}, (-1 === d.icon || d.icon === b && !e.config.skin) && (d.skin = k + " " + (d.skin || "layui-layer-hui")), d }())) }, load: function (a, b) { return f.open(c.extend({type: 3, icon: a || 0, shade: .01}, b)) }, tips: function (a, b, d) { return f.open(c.extend({type: 4, content: [a, b], closeBtn: !1, time: 3e3, maxWidth: 210}, d)) } }, g = function (a) { var b = this; b.index = ++f.index, b.config = c.extend({}, b.config, e.config, a), b.creat() }; g.pt = g.prototype; var h = ["layui-layer", ".layui-layer-title", ".layui-layer-main", ".layui-layer-dialog", "layui-layer-iframe", "layui-layer-content", "layui-layer-btn", "layui-layer-close"]; h.anim = ["layui-anim", "layui-anim-01", "layui-anim-02", "layui-anim-03", "layui-anim-04", "layui-anim-05", "layui-anim-06"], g.pt.config = { type: 0, shade: .3, fix: !0, move: h[1], title: "信息", offset: "auto", area: "auto", closeBtn: 1, time: 0, zIndex: 19891014, maxWidth: 360, shift: 0, icon: -1, scrollbar: !0, tips: 2 }, g.pt.vessel = function (a, b) { var c = this, d = c.index, f = c.config, g = f.zIndex + d, i = "object" == typeof f.title, j = f.maxmin && (1 === f.type || 2 === f.type), k = f.title ? '
    ' + (i ? f.title[0] : f.title) + "
    " : ""; return f.zIndex = g, b([f.shade ? '
    ' : "", '
    ' + (a && 2 != f.type ? "" : k) + '
    ' + (0 == f.type && -1 !== f.icon ? '' : "") + (1 == f.type && a ? "" : f.content || "") + '
    ' + function () { var a = j ? '' : ""; return f.closeBtn && (a += ''), a }() + "" + (f.btn ? function () { var a = ""; "string" == typeof f.btn && (f.btn = [f.btn]); for (var b = 0, c = f.btn.length; c > b; b++) a += '' + f.btn[b] + ""; return '
    ' + a + "
    " }() : "") + "
    "], k), c }, g.pt.creat = function () { var a = this, b = a.config, g = a.index, i = b.content, j = "object" == typeof i; switch ("string" == typeof b.area && (b.area = "auto" === b.area ? ["", ""] : [b.area, ""]), b.type) { case 0: b.btn = "btn" in b ? b.btn : e.btn[0], f.closeAll("dialog"); break; case 2: var i = b.content = j ? b.content : [b.content || "http://", "auto"]; b.content = ''; break; case 3: b.title = !1, b.closeBtn = !1, -1 === b.icon && 0 === b.icon, f.closeAll("loading"); break; case 4: j || (b.content = [b.content, "body"]), b.follow = b.content[1], b.content = b.content[0] + '', b.title = !1, b.shade = !1, b.fix = !1, b.tips = "object" == typeof b.tips ? b.tips : [b.tips, !0], b.tipsMore || f.closeAll("tips") } a.vessel(j, function (d, e) { c("body").append(d[0]), j ? function () { 2 == b.type || 4 == b.type ? function () { c("body").append(d[1]) }() : function () { i.parents("." + h[0])[0] || (i.show().addClass("layui-layer-wrap").wrap(d[1]), c("#" + h[0] + g).find("." + h[5]).before(e)) }() }() : c("body").append(d[1]), a.layero = c("#" + h[0] + g), b.scrollbar || h.html.css("overflow", "hidden").attr("layer-full", g) }).auto(g), 2 == b.type && f.ie6 && a.layero.find("iframe").attr("src", i[0]), c(document).off("keydown", e.enter).on("keydown", e.enter), 4 == b.type ? a.tips() : a.offset(), b.fix && d.on("resize", function () { a.offset(), (/^\d+%$/.test(b.area[0]) || /^\d+%$/.test(b.area[1])) && a.auto(g), 4 == b.type && a.tips() }), b.time <= 0 || setTimeout(function () { f.close(a.index) }, b.time), a.move().callback() }, g.pt.auto = function (a) { function b(a) { a = g.find(a), a.height(i[1] - j - k - 2 * (0 | parseFloat(a.css("padding")))) } var e = this, f = e.config, g = c("#" + h[0] + a); "" === f.area[0] && f.maxWidth > 0 && (/MSIE 7/.test(navigator.userAgent) && f.btn && g.width(g.innerWidth()), g.outerWidth() > f.maxWidth && g.width(f.maxWidth)); var i = [g.innerWidth(), g.innerHeight()], j = g.find(h[1]).outerHeight() || 0, k = g.find("." + h[6]).outerHeight() || 0; switch (f.type) { case 2: b("iframe"); break; default: "" === f.area[1] ? f.fix && i[1] >= d.height() && (i[1] = d.height(), b("." + h[5])) : b("." + h[5]) } return e }, g.pt.offset = function () { var a = this, b = a.config, c = a.layero, e = [c.outerWidth(), c.outerHeight()], f = "object" == typeof b.offset; a.offsetTop = (d.height() - e[1]) / 2, a.offsetLeft = (d.width() - e[0]) / 2, f ? (a.offsetTop = b.offset[0], a.offsetLeft = b.offset[1] || a.offsetLeft) : "auto" !== b.offset && (a.offsetTop = b.offset, "rb" === b.offset && (a.offsetTop = d.height() - e[1], a.offsetLeft = d.width() - e[0])), b.fix || (a.offsetTop = /%$/.test(a.offsetTop) ? d.height() * parseFloat(a.offsetTop) / 100 : parseFloat(a.offsetTop), a.offsetLeft = /%$/.test(a.offsetLeft) ? d.width() * parseFloat(a.offsetLeft) / 100 : parseFloat(a.offsetLeft), a.offsetTop += d.scrollTop(), a.offsetLeft += d.scrollLeft()), c.css({ top: a.offsetTop, left: a.offsetLeft }) }, g.pt.tips = function () { var a = this, b = a.config, e = a.layero, f = [e.outerWidth(), e.outerHeight()], g = c(b.follow); g[0] || (g = c("body")); var i = {width: g.outerWidth(), height: g.outerHeight(), top: g.offset().top, left: g.offset().left}, j = e.find(".layui-layer-TipsG"), k = b.tips[0]; b.tips[1] || j.remove(), i.autoLeft = function () { i.left + f[0] - d.width() > 0 ? (i.tipLeft = i.left + i.width - f[0], j.css({ right: 12, left: "auto" })) : i.tipLeft = i.left }, i.where = [function () { i.autoLeft(), i.tipTop = i.top - f[1] - 10, j.removeClass("layui-layer-TipsB").addClass("layui-layer-TipsT").css("border-right-color", b.tips[1]) }, function () { i.tipLeft = i.left + i.width + 10, i.tipTop = i.top, j.removeClass("layui-layer-TipsL").addClass("layui-layer-TipsR").css("border-bottom-color", b.tips[1]) }, function () { i.autoLeft(), i.tipTop = i.top + i.height + 10, j.removeClass("layui-layer-TipsT").addClass("layui-layer-TipsB").css("border-right-color", b.tips[1]) }, function () { i.tipLeft = i.left - f[0] - 10, i.tipTop = i.top, j.removeClass("layui-layer-TipsR").addClass("layui-layer-TipsL").css("border-bottom-color", b.tips[1]) }], i.where[k - 1](), 1 === k ? i.top - (d.scrollTop() + f[1] + 16) < 0 && i.where[2]() : 2 === k ? d.width() - (i.left + i.width + f[0] + 16) > 0 || i.where[3]() : 3 === k ? i.top - d.scrollTop() + i.height + f[1] + 16 - d.height() > 0 && i.where[0]() : 4 === k && f[0] + 16 - i.left > 0 && i.where[1](), e.find("." + h[5]).css({ "background-color": b.tips[1], "padding-right": b.closeBtn ? "30px" : "" }), e.css({left: i.tipLeft, top: i.tipTop}) }, g.pt.move = function () { var a = this, b = a.config, e = { setY: 0, moveLayer: function () { var a = e.layero, b = parseInt(a.css("margin-left")), c = parseInt(e.move.css("left")); 0 === b || (c -= b), "fixed" !== a.css("position") && (c -= a.parent().offset().left, e.setY = 0), a.css({ left: c, top: parseInt(e.move.css("top")) - e.setY }) } }, f = a.layero.find(b.move); return b.move && f.attr("move", "ok"), f.css({cursor: b.move ? "move" : "auto"}), c(b.move).on("mousedown", function (a) { if (a.preventDefault(), "ok" === c(this).attr("move")) { e.ismove = !0, e.layero = c(this).parents("." + h[0]); var f = e.layero.offset().left, g = e.layero.offset().top, i = e.layero.outerWidth() - 6, j = e.layero.outerHeight() - 6; c("#layui-layer-moves")[0] || c("body").append('
    '), e.move = c("#layui-layer-moves"), b.moveType && e.move.css({visibility: "hidden"}), e.moveX = a.pageX - e.move.position().left, e.moveY = a.pageY - e.move.position().top, "fixed" !== e.layero.css("position") || (e.setY = d.scrollTop()) } }), c(document).mousemove(function (a) { if (e.ismove) { var c = a.pageX - e.moveX, f = a.pageY - e.moveY; if (a.preventDefault(), !b.moveOut) { e.setY = d.scrollTop(); var g = d.width() - e.move.outerWidth(), h = e.setY; 0 > c && (c = 0), c > g && (c = g), h > f && (f = h), f > d.height() - e.move.outerHeight() + e.setY && (f = d.height() - e.move.outerHeight() + e.setY) } e.move.css({left: c, top: f}), b.moveType && e.moveLayer(), c = f = g = h = null } }).mouseup(function () { try { e.ismove && (e.moveLayer(), e.move.remove(), b.moveEnd && b.moveEnd()), e.ismove = !1 } catch (a) { e.ismove = !1 } }), a }, g.pt.callback = function () { function a() { var a = g.cancel && g.cancel(b.index); a === !1 || f.close(b.index) } var b = this, d = b.layero, g = b.config; b.openLayer(), g.success && (2 == g.type ? d.find("iframe")[0].onload = function () { this.className = "", g.success(d, b.index) } : g.success(d, b.index)), f.ie6 && b.IE6(d), d.find("." + h[6]).children("a").on("click", function () { var e = c(this).index(); g["btn" + (e + 1)] && g["btn" + (e + 1)](b.index, d), 0 === e ? g.yes ? g.yes(b.index, d) : f.close(b.index) : 1 === e ? a() : g["btn" + (e + 1)] || f.close(b.index) }), d.find("." + h[7]).on("click", a), g.shadeClose && c("#layui-layer-shade" + b.index).on("click", function () { f.close(b.index) }), d.find(".layui-layer-min").on("click", function () { f.min(b.index, g), g.min && g.min(d) }), d.find(".layui-layer-max").on("click", function () { c(this).hasClass("layui-layer-maxmin") ? (f.restore(b.index), g.restore && g.restore(d)) : (f.full(b.index, g), g.full && g.full(d)) }), g.end && (e.end[b.index] = g.end) }, e.reselect = function () { c.each(c("select"), function (a, b) { var d = c(this); d.parents("." + h[0])[0] || 1 == d.attr("layer") && c("." + h[0]).length < 1 && d.removeAttr("layer").show(), d = null }) }, g.pt.IE6 = function (a) { function b() { a.css({top: f + (e.config.fix ? d.scrollTop() : 0)}) } var e = this, f = a.offset().top; b(), d.scroll(b), c("select").each(function (a, b) { var d = c(this); d.parents("." + h[0])[0] || "none" === d.css("display") || d.attr({layer: "1"}).hide(), d = null }) }, g.pt.openLayer = function () { var a = this; f.zIndex = a.config.zIndex, f.setTop = function (a) { var b = function () { f.zIndex++, a.css("z-index", f.zIndex + 1) }; return f.zIndex = parseInt(a[0].style.zIndex), a.on("mousedown", b), f.zIndex } }, e.record = function (a) { var b = [a.outerWidth(), a.outerHeight(), a.position().top, a.position().left + parseFloat(a.css("margin-left"))]; a.find(".layui-layer-max").addClass("layui-layer-maxmin"), a.attr({area: b}) }, e.rescollbar = function (a) { h.html.attr("layer-full") == a && (h.html[0].style.removeProperty ? h.html[0].style.removeProperty("overflow") : h.html[0].style.removeAttribute("overflow"), h.html.removeAttr("layer-full")) }, f.getChildFrame = function (a, b) { return b = b || c("." + h[4]).attr("times"), c("#" + h[0] + b).find("iframe").contents().find(a) }, f.getFrameIndex = function (a) { return c("#" + a).parents("." + h[4]).attr("times") }, f.iframeAuto = function (a) { if (a) { var b = f.getChildFrame("body", a).outerHeight(), d = c("#" + h[0] + a), e = d.find(h[1]).outerHeight() || 0, g = d.find("." + h[6]).outerHeight() || 0; d.css({height: b + e + g}), d.find("iframe").css({height: b}) } }, f.iframeSrc = function (a, b) { c("#" + h[0] + a).find("iframe").attr("src", b) }, f.style = function (a, b) { var d = c("#" + h[0] + a), f = d.attr("type"), g = d.find(h[1]).outerHeight() || 0, i = d.find("." + h[6]).outerHeight() || 0; (f === e.type[1] || f === e.type[2]) && (d.css(b), f === e.type[2] && d.find("iframe").css({height: parseFloat(b.height) - g - i})) }, f.min = function (a, b) { var d = c("#" + h[0] + a), g = d.find(h[1]).outerHeight() || 0; e.record(d), f.style(a, { width: 180, height: g, overflow: "hidden" }), d.find(".layui-layer-min").hide(), "page" === d.attr("type") && d.find(h[4]).hide(), e.rescollbar(a) }, f.restore = function (a) { var b = c("#" + h[0] + a), d = b.attr("area").split(","); b.attr("type"); f.style(a, { width: parseFloat(d[0]), height: parseFloat(d[1]), top: parseFloat(d[2]), left: parseFloat(d[3]), overflow: "visible" }), b.find(".layui-layer-max").removeClass("layui-layer-maxmin"), b.find(".layui-layer-min").show(), "page" === b.attr("type") && b.find(h[4]).show(), e.rescollbar(a) }, f.full = function (a) { var b, g = c("#" + h[0] + a); e.record(g), h.html.attr("layer-full") || h.html.css("overflow", "hidden").attr("layer-full", a), clearTimeout(b), b = setTimeout(function () { var b = "fixed" === g.css("position"); f.style(a, { top: b ? 0 : d.scrollTop(), left: b ? 0 : d.scrollLeft(), width: d.width(), height: d.height() }), g.find(".layui-layer-min").hide() }, 100) }, f.title = function (a, b) { var d = c("#" + h[0] + (b || f.index)).find(h[1]); d.html(a) }, f.close = function (a) { var b = c("#" + h[0] + a), d = b.attr("type"); if (b[0]) { if (d === e.type[1] && "object" === b.attr("conType")) { b.children(":not(." + h[5] + ")").remove(); for (var g = 0; 2 > g; g++) b.find(".layui-layer-wrap").unwrap().hide() } else { if (d === e.type[2]) try { var i = c("#" + h[4] + a)[0]; i.contentWindow.document.write(""), i.contentWindow.close(), b.find("." + h[5])[0].removeChild(i) } catch (j) { } b[0].innerHTML = "", b.remove() } c("#layui-layer-moves, #layui-layer-shade" + a).remove(), f.ie6 && e.reselect(), e.rescollbar(a), c(document).off("keydown", e.enter), "function" == typeof e.end[a] && e.end[a](), delete e.end[a] } }, f.closeAll = function (a) { c.each(c("." + h[0]), function () { var b = c(this), d = a ? b.attr("type") === a : 1; d && f.close(b.attr("times")), d = null }) }, e.run = function () { c = jQuery, d = c(a), h.html = c("html"), f.open = function (a) { var b = new g(a); return b.index } }, "function" == typeof define ? define(function () { return e.run(), f }) : function () { a.layer = f, e.run(), f.use("skin/layer.css") }() }(window); /* ! jQuery UI Core 1.10.3 */ (function (f, d) { var e = 0, c = /^ui-id-\d+$/; f.ui = f.ui || {}; f.extend(f.ui, { version: "1.10.3", keyCode: { BACKSPACE: 8, COMMA: 188, DELETE: 46, DOWN: 40, END: 35, ENTER: 13, ESCAPE: 27, HOME: 36, LEFT: 37, NUMPAD_ADD: 107, NUMPAD_DECIMAL: 110, NUMPAD_DIVIDE: 111, NUMPAD_ENTER: 108, NUMPAD_MULTIPLY: 106, NUMPAD_SUBTRACT: 109, PAGE_DOWN: 34, PAGE_UP: 33, PERIOD: 190, RIGHT: 39, SPACE: 32, TAB: 9, UP: 38 } }); f.fn.extend({ focus: (function (g) { return function (i, h) { return typeof i === "number" ? this.each(function () { var j = this; setTimeout(function () { f(j).focus(); if (h) { h.call(j) } }, i) }) : g.apply(this, arguments) } })(f.fn.focus), scrollParent: function () { var g; if ((f.ui.ie && (/(static|relative)/).test(this.css("position"))) || (/absolute/).test(this.css("position"))) { g = this.parents().filter(function () { return (/(relative|absolute|fixed)/).test(f.css(this, "position")) && (/(auto|scroll)/).test(f.css(this, "overflow") + f.css(this, "overflow-y") + f.css(this, "overflow-x")) }).eq(0) } else { g = this.parents().filter(function () { return (/(auto|scroll)/).test(f.css(this, "overflow") + f.css(this, "overflow-y") + f.css(this, "overflow-x")) }).eq(0) } return (/fixed/).test(this.css("position")) || !g.length ? f(document) : g }, zIndex: function (h) { if (h !== d) { return this.css("zIndex", h) } if (this.length) { var j = f(this[0]), i, g; while (j.length && j[0] !== document) { i = j.css("position"); if (i === "absolute" || i === "relative" || i === "fixed") { g = parseInt(j.css("zIndex"), 10); if (!isNaN(g) && g !== 0) { return g } } j = j.parent() } } return 0 }, uniqueId: function () { return this.each(function () { if (!this.id) { this.id = "ui-id-" + (++e) } }) }, removeUniqueId: function () { return this.each(function () { if (c.test(this.id)) { f(this).removeAttr("id") } }) } }); function b(k, i) { var g, l, j, h = k.nodeName.toLowerCase(); if ("area" === h) { g = k.parentNode; l = g.name; if (!k.href || !l || g.nodeName.toLowerCase() !== "map") { return false } j = f("img[usemap=#" + l + "]")[0]; return !!j && a(j) } return (/input|select|textarea|button|object/.test(h) ? !k.disabled : "a" === h ? k.href || i : i) && a(k) } function a(g) { return f.expr.filters.visible(g) && !f(g).parents().addBack().filter(function () { return f.css(this, "visibility") === "hidden" }).length } f.extend(f.expr[":"], { data: f.expr.createPseudo ? f.expr.createPseudo(function (g) { return function (h) { return !!f.data(h, g) } }) : function (h, g, i) { return !!f.data(h, i[3]) }, focusable: function (g) { return b(g, !isNaN(f.attr(g, "tabindex"))) }, tabbable: function (h) { var i = f.attr(h, "tabindex"), g = isNaN(i); return (g || i >= 0) && b(h, !g) } }); if (!f("").outerWidth(1).jquery) { f.each(["Width", "Height"], function (k, i) { var j = i === "Width" ? ["Left", "Right"] : ["Top", "Bottom"], l = i.toLowerCase(), h = { innerWidth: f.fn.innerWidth, innerHeight: f.fn.innerHeight, outerWidth: f.fn.outerWidth, outerHeight: f.fn.outerHeight }; function g(p, o, n, t) { f.each(j, function () { o -= parseFloat(f.css(p, "padding" + this)) || 0; if (n) { o -= parseFloat(f.css(p, "border" + this + "Width")) || 0 } if (t) { o -= parseFloat(f.css(p, "margin" + this)) || 0 } }); return o } f.fn["inner" + i] = function (n) { if (n === d) { return h["inner" + i].call(this) } return this.each(function () { f(this).css(l, g(this, n) + "px") }) }; f.fn["outer" + i] = function (n, p) { if (typeof n !== "number") { return h["outer" + i].call(this, n) } return this.each(function () { f(this).css(l, g(this, n, true, p) + "px") }) } }) } if (!f.fn.addBack) { f.fn.addBack = function (g) { return this.add(g == null ? this.prevObject : this.prevObject.filter(g)) } } if (f("").data("a-b", "a").removeData("a-b").data("a-b")) { f.fn.removeData = (function (g) { return function (h) { if (arguments.length) { return g.call(this, f.camelCase(h)) } else { return g.call(this) } } })(f.fn.removeData) } f.ui.ie = !!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()); f.support.selectstart = "onselectstart" in document.createElement("div"); f.fn.extend({ disableSelection: function () { return this.bind((f.support.selectstart ? "selectstart" : "mousedown") + ".ui-disableSelection", function (g) { g.preventDefault() }) }, enableSelection: function () { return this.unbind(".ui-disableSelection") } }); f.extend(f.ui, { plugin: { add: function (j, k, h) { var i, g = f.ui[j].prototype; for (i in h) { g.plugins[i] = g.plugins[i] || []; g.plugins[i].push([k, h[i]]) } }, call: function (i, k, j) { var g, h = i.plugins[k]; if (!h || !i.element[0].parentNode || i.element[0].parentNode.nodeType === 11) { return } for (g = 0; g < h.length; g++) { if (i.options[h[g][0]]) { h[g][1].apply(i.element, j) } } } }, hasScroll: function (h, j) { if (f(h).css("overflow") === "hidden") { return false } var i = (j && j === "left") ? "scrollLeft" : "scrollTop", g = false; if (h[i] > 0) { return true } h[i] = 1; g = (h[i] > 0); h[i] = 0; return g } }) })(jQuery); (function (e, c) { var d = 0, b = Array.prototype.slice, a = e.cleanData; e.cleanData = function (h) { for (var i = 0, f; (f = h[i]) != null; i++) { try { e(f).triggerHandler("remove") } catch (g) { } } a(h) }; e.widget = function (f, g, n) { var k, l, i, m, h = {}, j = f.split(".")[0]; f = f.split(".")[1]; k = j + "-" + f; if (!n) { n = g; g = e.Widget } e.expr[":"][k.toLowerCase()] = function (o) { return !!e.data(o, k) }; e[j] = e[j] || {}; l = e[j][f]; i = e[j][f] = function (o, p) { if (!this._createWidget) { return new i(o, p) } if (arguments.length) { this._createWidget(o, p) } }; e.extend(i, l, {version: n.version, _proto: e.extend({}, n), _childConstructors: []}); m = new g(); m.options = e.widget.extend({}, m.options); e.each(n, function (p, o) { if (!e.isFunction(o)) { h[p] = o; return } h[p] = (function () { var r = function () { return g.prototype[p].apply(this, arguments) }, q = function (s) { return g.prototype[p].apply(this, s) }; return function () { var u = this._super, s = this._superApply, t; this._super = r; this._superApply = q; t = o.apply(this, arguments); this._super = u; this._superApply = s; return t } })() }); i.prototype = e.widget.extend(m, {widgetEventPrefix: l ? m.widgetEventPrefix : f}, h, { constructor: i, namespace: j, widgetName: f, widgetFullName: k }); if (l) { e.each(l._childConstructors, function (p, q) { var o = q.prototype; e.widget(o.namespace + "." + o.widgetName, i, q._proto) }); delete l._childConstructors } else { g._childConstructors.push(i) } e.widget.bridge(f, i) }; e.widget.extend = function (h) { var i = b.call(arguments, 1), f = 0, g = i.length, j, k; for (; f < g; f++) { for (j in i[f]) { k = i[f][j]; if (i[f].hasOwnProperty(j) && k !== c) { if (e.isPlainObject(k)) { h[j] = e.isPlainObject(h[j]) ? e.widget.extend({}, h[j], k) : e.widget.extend({}, k) } else { h[j] = k } } } } return h }; e.widget.bridge = function (f, h) { var g = h.prototype.widgetFullName || f; e.fn[f] = function (j) { var l = typeof j === "string", i = b.call(arguments, 1), k = this; j = !l && i.length ? e.widget.extend.apply(null, [j].concat(i)) : j; if (l) { this.each(function () { var m, n = e.data(this, g); if (!n) { return e.error("cannot call methods on " + f + " prior to initialization; attempted to call method '" + j + "'") } if (!e.isFunction(n[j]) || j.charAt(0) === "_") { return e.error("no such method '" + j + "' for " + f + " widget instance") } m = n[j].apply(n, i); if (m !== n && m !== c) { k = m && m.jquery ? k.pushStack(m.get()) : m; return false } }) } else { this.each(function () { var m = e.data(this, g); if (m) { m.option(j || {})._init() } else { e.data(this, g, new h(j, this)) } }) } return k } }; e.Widget = function () { }; e.Widget._childConstructors = []; e.Widget.prototype = { widgetName: "widget", widgetEventPrefix: "", defaultElement: "
    ", options: {disabled: false, create: null}, _createWidget: function (f, g) { g = e(g || this.defaultElement || this)[0]; this.element = e(g); this.uuid = d++; this.eventNamespace = "." + this.widgetName + this.uuid; this.options = e.widget.extend({}, this.options, this._getCreateOptions(), f); this.bindings = e(); this.hoverable = e(); this.focusable = e(); if (g !== this) { e.data(g, this.widgetFullName, this); this._on(true, this.element, { remove: function (h) { if (h.target === g) { this.destroy() } } }); this.document = e(g.style ? g.ownerDocument : g.document || g); this.window = e(this.document[0].defaultView || this.document[0].parentWindow) } this._create(); this._trigger("create", null, this._getCreateEventData()); this._init() }, _getCreateOptions: e.noop, _getCreateEventData: e.noop, _create: e.noop, _init: e.noop, destroy: function () { this._destroy(); this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)); this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName + "-disabled ui-state-disabled"); this.bindings.unbind(this.eventNamespace); this.hoverable.removeClass("ui-state-hover"); this.focusable.removeClass("ui-state-focus") }, _destroy: e.noop, widget: function () { return this.element }, option: function (k, g) { var f = k, h, j, i; if (arguments.length === 0) { return e.widget.extend({}, this.options) } if (typeof k === "string") { f = {}; h = k.split("."); k = h.shift(); if (h.length) { j = f[k] = e.widget.extend({}, this.options[k]); for (i = 0; i < h.length - 1; i++) { j[h[i]] = j[h[i]] || {}; j = j[h[i]] } k = h.pop(); if (g === c) { return j[k] === c ? null : j[k] } j[k] = g } else { if (g === c) { return this.options[k] === c ? null : this.options[k] } f[k] = g } } this._setOptions(f); return this }, _setOptions: function (f) { var g; for (g in f) { this._setOption(g, f[g]) } return this }, _setOption: function (f, g) { this.options[f] = g; if (f === "disabled") { this.widget().toggleClass(this.widgetFullName + "-disabled ui-state-disabled", !!g).attr("aria-disabled", g); this.hoverable.removeClass("ui-state-hover"); this.focusable.removeClass("ui-state-focus") } return this }, enable: function () { return this._setOption("disabled", false) }, disable: function () { return this._setOption("disabled", true) }, _on: function (f, j, i) { var g, h = this; if (typeof f !== "boolean") { i = j; j = f; f = false } if (!i) { i = j; j = this.element; g = this.widget() } else { j = g = e(j); this.bindings = this.bindings.add(j) } e.each(i, function (m, l) { function p() { if (!f && (h.options.disabled === true || e(this).hasClass("ui-state-disabled"))) { return } return (typeof l === "string" ? h[l] : l).apply(h, arguments) } if (typeof l !== "string") { p.guid = l.guid = l.guid || p.guid || e.guid++ } var k = m.match(/^(\w+)\s*(.*)$/), o = k[1] + h.eventNamespace, n = k[2]; if (n) { g.delegate(n, o, p) } else { j.bind(o, p) } }) }, _off: function (g, f) { f = (f || "").split(" ").join(this.eventNamespace + " ") + this.eventNamespace; g.unbind(f).undelegate(f) }, _delay: function (g, f) { function i() { return (typeof g === "string" ? h[g] : g).apply(h, arguments) } var h = this; return setTimeout(i, f || 0) }, _hoverable: function (f) { this.hoverable = this.hoverable.add(f); this._on(f, { mouseenter: function (g) { e(g.currentTarget).addClass("ui-state-hover") }, mouseleave: function (g) { e(g.currentTarget).removeClass("ui-state-hover") } }) }, _focusable: function (f) { this.focusable = this.focusable.add(f); this._on(f, { focusin: function (g) { e(g.currentTarget).addClass("ui-state-focus") }, focusout: function (g) { e(g.currentTarget).removeClass("ui-state-focus") } }) }, _trigger: function (h, i, j) { var g, f, k = this.options[h]; j = j || {}; i = e.Event(i); i.type = (h === this.widgetEventPrefix ? h : this.widgetEventPrefix + h).toLowerCase(); i.target = this.element[0]; f = i.originalEvent; if (f) { for (g in f) { if (!(g in i)) { i[g] = f[g] } } } this.element.trigger(i, j); return !(e.isFunction(k) && k.apply(this.element[0], [i].concat(j)) === false || i.isDefaultPrevented()) } }; e.each({show: "fadeIn", hide: "fadeOut"}, function (g, f) { e.Widget.prototype["_" + g] = function (i, h, l) { if (typeof h === "string") { h = {effect: h} } var j, k = !h ? g : h === true || typeof h === "number" ? f : h.effect || f; h = h || {}; if (typeof h === "number") { h = {duration: h} } j = !e.isEmptyObject(h); h.complete = l; if (h.delay) { i.delay(h.delay) } if (j && e.effects && e.effects.effect[k]) { i[g](h) } else { if (k !== g && i[k]) { i[k](h.duration, h.easing, l) } else { i.queue(function (m) { e(this)[g](); if (l) { l.call(i[0]) } m() }) } } } }) })(jQuery); (function (h, e) { h.ui = h.ui || {}; var m, n = Math.max, f = Math.abs, b = Math.round, g = /left|center|right/, k = /top|center|bottom/, a = /[\+\-]\d+(\.[\d]+)?%?/, o = /^\w+/, d = /%$/, j = h.fn.position; function c(q, p, r) { return [parseFloat(q[0]) * (d.test(q[0]) ? p / 100 : 1), parseFloat(q[1]) * (d.test(q[1]) ? r / 100 : 1)] } function l(p, q) { return parseInt(h.css(p, q), 10) || 0 } function i(q) { var p = q[0]; if (p.nodeType === 9) { return {width: q.width(), height: q.height(), offset: {top: 0, left: 0}} } if (h.isWindow(p)) { return {width: q.width(), height: q.height(), offset: {top: q.scrollTop(), left: q.scrollLeft()}} } if (p.preventDefault) { return {width: 0, height: 0, offset: {top: p.pageY, left: p.pageX}} } return {width: q.outerWidth(), height: q.outerHeight(), offset: q.offset()} } h.position = { scrollbarWidth: function () { if (m !== e) { return m } var s, r, q = h("
    "), p = q.children()[0]; h("body").append(q); s = p.offsetWidth; q.css("overflow", "scroll"); r = p.offsetWidth; if (s === r) { r = q[0].clientWidth } q.remove(); return (m = s - r) }, getScrollInfo: function (q) { var p = q.isWindow ? "" : q.element.css("overflow-x"), t = q.isWindow ? "" : q.element.css("overflow-y"), s = p === "scroll" || (p === "auto" && q.width < q.element[0].scrollWidth), r = t === "scroll" || (t === "auto" && q.height < q.element[0].scrollHeight); return {width: r ? h.position.scrollbarWidth() : 0, height: s ? h.position.scrollbarWidth() : 0} }, getWithinInfo: function (p) { var q = h(p || window), r = h.isWindow(q[0]); return { element: q, isWindow: r, offset: q.offset() || {left: 0, top: 0}, scrollLeft: q.scrollLeft(), scrollTop: q.scrollTop(), width: r ? q.width() : q.outerWidth(), height: r ? q.height() : q.outerHeight() } } }; h.fn.position = function (w) { if (!w || !w.of) { return j.apply(this, arguments) } w = h.extend({}, w); var x, t, r, v, q, y, s = h(w.of), p = h.position.getWithinInfo(w.within), z = h.position.getScrollInfo(p), u = (w.collision || "flip").split(" "), A = {}; y = i(s); if (s[0].preventDefault) { w.at = "left top" } t = y.width; r = y.height; v = y.offset; q = h.extend({}, v); h.each(["my", "at"], function () { var B = (w[this] || "").split(" "), D, C; if (B.length === 1) { B = g.test(B[0]) ? B.concat(["center"]) : k.test(B[0]) ? ["center"].concat(B) : ["center", "center"] } B[0] = g.test(B[0]) ? B[0] : "center"; B[1] = k.test(B[1]) ? B[1] : "center"; D = a.exec(B[0]); C = a.exec(B[1]); A[this] = [D ? D[0] : 0, C ? C[0] : 0]; w[this] = [o.exec(B[0])[0], o.exec(B[1])[0]] }); if (u.length === 1) { u[1] = u[0] } if (w.at[0] === "right") { q.left += t } else { if (w.at[0] === "center") { q.left += t / 2 } } if (w.at[1] === "bottom") { q.top += r } else { if (w.at[1] === "center") { q.top += r / 2 } } x = c(A.at, t, r); q.left += x[0]; q.top += x[1]; return this.each(function () { var C, L, E = h(this), G = E.outerWidth(), D = E.outerHeight(), F = l(this, "marginLeft"), B = l(this, "marginTop"), K = G + F + l(this, "marginRight") + z.width, J = D + B + l(this, "marginBottom") + z.height, H = h.extend({}, q), I = c(A.my, E.outerWidth(), E.outerHeight()); if (w.my[0] === "right") { H.left -= G } else { if (w.my[0] === "center") { H.left -= G / 2 } } if (w.my[1] === "bottom") { H.top -= D } else { if (w.my[1] === "center") { H.top -= D / 2 } } H.left += I[0]; H.top += I[1]; if (!h.support.offsetFractions) { H.left = b(H.left); H.top = b(H.top) } C = {marginLeft: F, marginTop: B}; h.each(["left", "top"], function (N, M) { if (h.ui.position[u[N]]) { h.ui.position[u[N]][M](H, { targetWidth: t, targetHeight: r, elemWidth: G, elemHeight: D, collisionPosition: C, collisionWidth: K, collisionHeight: J, offset: [x[0] + I[0], x[1] + I[1]], my: w.my, at: w.at, within: p, elem: E }) } }); if (w.using) { L = function (P) { var R = v.left - H.left, O = R + t - G, Q = v.top - H.top, N = Q + r - D, M = { target: {element: s, left: v.left, top: v.top, width: t, height: r}, element: {element: E, left: H.left, top: H.top, width: G, height: D}, horizontal: O < 0 ? "left" : R > 0 ? "right" : "center", vertical: N < 0 ? "top" : Q > 0 ? "bottom" : "middle" }; if (t < G && f(R + O) < t) { M.horizontal = "center" } if (r < D && f(Q + N) < r) { M.vertical = "middle" } if (n(f(R), f(O)) > n(f(Q), f(N))) { M.important = "horizontal" } else { M.important = "vertical" } w.using.call(this, P, M) } } E.offset(h.extend(H, {using: L})) }) }; h.ui.position = { fit: { left: function (q, p) { var x = p.within, s = x.isWindow ? x.scrollLeft : x.offset.left, u = x.width, r = q.left - p.collisionPosition.marginLeft, t = s - r, w = r + p.collisionWidth - u - s, v; if (p.collisionWidth > u) { if (t > 0 && w <= 0) { v = q.left + t + p.collisionWidth - u - s; q.left += t - v } else { if (w > 0 && t <= 0) { q.left = s } else { if (t > w) { q.left = s + u - p.collisionWidth } else { q.left = s } } } } else { if (t > 0) { q.left += t } else { if (w > 0) { q.left -= w } else { q.left = n(q.left - r, q.left) } } } }, top: function (p, x) { var w = x.within, t = w.isWindow ? w.scrollTop : w.offset.top, u = x.within.height, r = p.top - x.collisionPosition.marginTop, s = t - r, q = r + x.collisionHeight - u - t, v; if (x.collisionHeight > u) { if (s > 0 && q <= 0) { v = p.top + s + x.collisionHeight - u - t; p.top += s - v } else { if (q > 0 && s <= 0) { p.top = t } else { if (s > q) { p.top = t + u - x.collisionHeight } else { p.top = t } } } } else { if (s > 0) { p.top += s } else { if (q > 0) { p.top -= q } else { p.top = n(p.top - r, p.top) } } } } }, flip: { left: function (s, r) { var q = r.within, w = q.offset.left + q.scrollLeft, A = q.width, C = q.isWindow ? q.scrollLeft : q.offset.left, t = s.left - r.collisionPosition.marginLeft, x = t - C, B = t + r.collisionWidth - A - C, v = r.my[0] === "left" ? -r.elemWidth : r.my[0] === "right" ? r.elemWidth : 0, y = r.at[0] === "left" ? r.targetWidth : r.at[0] === "right" ? -r.targetWidth : 0, p = -2 * r.offset[0], z, u; if (x < 0) { z = s.left + v + y + p + r.collisionWidth - A - w; if (z < 0 || z < f(x)) { s.left += v + y + p } } else { if (B > 0) { u = s.left - r.collisionPosition.marginLeft + v + y + p - C; if (u > 0 || f(u) < B) { s.left += v + y + p } } } }, top: function (r, q) { var p = q.within, z = p.offset.top + p.scrollTop, A = p.height, y = p.isWindow ? p.scrollTop : p.offset.top, t = r.top - q.collisionPosition.marginTop, v = t - y, s = t + q.collisionHeight - A - y, w = q.my[1] === "top", u = w ? -q.elemHeight : q.my[1] === "bottom" ? q.elemHeight : 0, C = q.at[1] === "top" ? q.targetHeight : q.at[1] === "bottom" ? -q.targetHeight : 0, D = -2 * q.offset[1], x, B; if (v < 0) { B = r.top + u + C + D + q.collisionHeight - A - z; if ((r.top + u + C + D) > v && (B < 0 || B < f(v))) { r.top += u + C + D } } else { if (s > 0) { x = r.top - q.collisionPosition.marginTop + u + C + D - y; if ((r.top + u + C + D) > s && (x > 0 || f(x) < s)) { r.top += u + C + D } } } } }, flipfit: { left: function () { h.ui.position.flip.left.apply(this, arguments); h.ui.position.fit.left.apply(this, arguments) }, top: function () { h.ui.position.flip.top.apply(this, arguments); h.ui.position.fit.top.apply(this, arguments) } } }; (function () { var v, q, s, u, t, r = document.getElementsByTagName("body")[0], p = document.createElement("div"); v = document.createElement(r ? "div" : "body"); s = {visibility: "hidden", width: 0, height: 0, border: 0, margin: 0, background: "none"}; if (r) { h.extend(s, {position: "absolute", left: "-1000px", top: "-1000px"}) } for (t in s) { v.style[t] = s[t] } v.appendChild(p); q = r || document.documentElement; q.insertBefore(v, q.firstChild); p.style.cssText = "position: absolute; left: 10.7432222px;"; u = h(p).offset().left; h.support.offsetFractions = u > 10 && u < 11; v.innerHTML = ""; q.removeChild(v) })() }(jQuery)); (function (a, b) { a.widget("ui.menu", { version: "1.10.3", defaultElement: "