merge from 1.5.2

git-svn-id: http://xe-core.googlecode.com/svn/trunk@10446 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
devjin 2012-03-20 08:03:02 +00:00
parent 6c23751ef8
commit c727926d9e
382 changed files with 6855 additions and 3603 deletions

View file

@ -1,6 +1,7 @@
@charset "utf-8";
/* Element Reset */
body,table,input,textarea,select,button{font-family:Tahoma,Geneva,sans-serif;font-size:12px}
body{word-break:break-all;word-wrap:break-word}
img{border:0}
/* Button */
.btn{position:relative;display:inline-block;vertical-align:middle}
@ -8,8 +9,9 @@ img{border:0}
.btn *[type=submit][disabled=disabled],
.btn *[type=button][disabled=disabled]{opacity:.5;*filter:alpha(opacity=50)}
.btn a,
.btn input[type=button],
.btn button[type=button]{border-color:#ccc;color:#333 !important;background:#eee -webkit-gradient(linear,0% 0%,0% 100%,from(#fff),to(#ddd));background:#eee -moz-linear-gradient(top,#fff,#ddd);background-color:#eee;text-shadow:1px 1px 0 #fff;filter:progid:DXImageTransform.Microsoft.gradient(startColorStr=#ffffff, endColorStr=#dddddd)}
.btn input,
.btn input[type=submit],
.btn button[type=submit]{border-color:#666;background:#333 -webkit-gradient(linear,0% 0%,0% 100%,from(#777),to(#777),color-stop(0.5,#333),color-stop(0.5,#000)) !important;background:#333 -moz-linear-gradient(top,#777,#000) !important;background-color:#333 !important;color:#ffc !important;filter:progid:DXImageTransform.Microsoft.gradient(startColorStr=#777777, endColorStr=#333333)}
.btn a{height:22px}
.btn.medium *{padding:0 12px;font-size:16px;height:30px;line-height:28px}

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,121 @@
Change Log
______________
1.1.6
Corrected bug preventing selections inside input values in some browsers - the onselectstart function no longer captures on input boxes.
Added support for up/down arrow adjustments of the currently focused input box making the picker more keyboard friendly.
Added ticks around the backgroundImage assignments to correct for paths with whitespace.
1.1.5
Corrected Color object constructor to allow setting of the "alpha" value as per the documentation which previously didn't work.
Added support for translucency for quickList colors with checkered background - Only available if "alphaSupport" is enabled.
Restricted default color to "alpha" of 255 if "alphaSupport" is disabled - It will now assign an explicit alpha of 255 when disabled.
Added new setting variable "alphaPrecision" which indicates the number of decimal points to allow in the alpha percentage display - Now defaults to 0.
1.1.4
Changed "alpha" range from 0-100 to 0-255 to correct truncating and rounding errors caused by attempting to get an integer percentage that matches a hex value.
"alpha" percentage display will now show up to 1 decimal point for more accurate representation of "alpha" value.
Color object now accepts "alpha" values in a range of 0-255 and also returns the same when getting the "alpha" value. You will need to run ((alpha * 100) / 255) to retrieve a percentage value.
Reworked the table layout and labels to remove the need for the label to reference the radio input box. This reduces injected code and removes the need to generate unique ids on the radio buttons.
Transparent/invisible caret on NULL color is now corrected - uses the same caret color as a white color.
Setting a binded input value of "" or no value attribute will now create a NULL color on initialization instead of the settings default color.
Added a dynamic, invisible "iframe" behind a dialog picker in all browsers that fail jQuery.support.boxModel (currently IE <= 7 Quirks Mode). This prevents "select" box from showing through the picker.
1.1.3
Now adding popup color pickers to document.body instead of inline with the popup control. This corrects issues with the picker not showing beyond a relative container scope.
No longer need to hide popup icon in Internet Explorer for picker elements lower in the DOM than the currently active one since the picker itself is attached to document.body (it is always higher in the DOM now).
Popup pickers are now bring-to-front selectable. Clicking on the picker will bring it above all other pickers on the page instead of having to drag one out from underneath another.
Corrected jPicker.List/setTimeout bug which allowed an instance to bind to the List in an order other than the order the initialization function was called.
Added a updateInputColor option (default true) to allow for a binded input field that does not automatically update its background/text color.
1.1.2
Reworked the find methods and contexts for element searches. Now using ":first" instead of ".eq(0)" to take advantage of early out searches. Much faster initialization of the picker, on the order of 6 times.
Now using setTimeout for calling visual updates. Dramatically improved marker dragging in all browsers. Reduces blocking as re-rendering is internal to the browser and independent of the other javascript still in progress.
Marker updates can now cancel a previous valueChanged event when a new mouseMove event comes in. IE8 marker dragging is still slower, much over 5 times faster than it was.
Reworked entire quickPick list creation. It now adds up source code and does a single "html" method instead of multiple "append" methods. This is a large part of the speed increase on initialization.
The vast majority of all running scripts on both initialization and dragging is now occupied altering the style rules and finding elements (init only) instead of jPicker code.
All methods previously called with global context now use the "call" method for using the context of the class running the method. "this" in a callback is now the DOM node (jQuery style) and jPicker instead of "window".
Added "effects" section of window settings to allow different show/hide effects and durations.
Removed change log and read me from the full source code to separate files (ChangeLog.txt and ReadMe.txt) and an HTML demonstration/documentation page (Example.txt).
1.1.1
Correct IE exception caused by attempting to set "#transparent" to CSS background-color.
1.1.0
Reworked nearly the entire plugin including the internal and external event model, bindings, DOM searches, classes, and overall presentation.
The Color object now supports a changed event that you can bind to (or just bind to the picker events still included).
Event order has been reversed, instead of a change event on the map/bar/text fields updating the display, they now update the Color object which then fires the events that update the display.
alphaSupport re-implemented by request - default behavior is off.
Hex code now only 6 characters again.
Color object can now have its value changed from code, using the "val" method, and it will fire all events necessary to update the display.
Removed all "get_*" methods from the color object, instead opting for a single "val" method for getting and setting, more in line with familiar jQuery methods.
Better rendering for all IE versions in Quirks mode.
1.0.13
Updated transparency algorithm for red/green/blue color modes. The algorithm from John Dyers' color picker was close but incorrect. Bar colors are now pixel perfect with the new algorithm.
Changed from using "background-position" on the color maps to an element of full height using the "top" attribute for image-map location using "overflow: hidden" to hide overdraw.
IE7/8 ignores opacity on elements taller than 4096px. Image maps therefore no longer include a blank first map so the Bar is just under 4096. Blank is now accomplished by setting the "top" setting to below the map display.
New colorBar picker image that does not draw outside of the element since the elements now hide overdraw.
Added IE5.5/6 support for the picker. This is why it now uses maps of full height and the "top" attribute for map locations.
Moved the images in the maps to 4 pixels apart from each other. IE7/8 change the first pixel of the bottom-border of 2px to partially transparent showing a portion of a different color map without this.
1.0.12
Added minified CSS file.
Added IE7/8 Quirks Mode support.
Added configurable string constants for all text and tooltips. You can now change the default values for different languages.
Privatized the RGBA values in the Color object for better NULL handling. YOU MUST USE THE NEW GET FUNCTIONS TO ACCESS THE COLOR PROPERTIES.
Better NULL color handling and an additional "No Color Selected" quick pick color.
More consistent behavior across multiple versions of browsers.
Added alpha response to the binded color picker icon.
Removed "alphaSupport" variable. It is now always supported.
1.0.11b
Corrected NULL behavior in IE. jQuery was getting an exception when attempting to assign a backgroundColor style of '#'. Now assigns 'transparent' if color is NULL.
Can now create new Color object WITH OR WITHOUT the '#' prefix.
1.0.11
Added ability for NULL colors (delete the hex value). Color will be returned as color.hex == ''. Can set the default color to an empty hex string as well.
cancelCallback now returns the original color for use in programming responses.
1.0.10
Corrected table layout and tweaked display for more consisent presentation. Nice catch from Jonathan Pasquier.
1.0.9
Added optional title variable for each jPicker window.
1.0.8
Moved all images into a few sprites - now using backgroundPosition to change color maps and bars instead of changing the image - this should be faster to download and run.
1.0.7
RENAMED CSS FILE TO INCLUDE VERSION NUMBER!!! YOU MUST USE THIS VERSIONED CSS FILE!!! There will be no need to do your own CSS version number increments from now on.
Added opacity feedback to color preview boxes.
Removed reliance on "id" value of containing object. Subobjects are now found by class and container instead of id's. This drastically reduces injected code.
Removed (jQuery).jPicker.getListElementById(id) function since "id" is no longer incorporated or required.
1.0.6
Corrected picker bugs introduced with 1.0.5.
Removed alpha slider bar until activated - default behavior for alpha is now OFF.
Corrected Color constructor bug not allowing values of 0 for initial value (it was evaluating false and missing the init code - Thanks Pavol).
Removed title tags (tooltips) from color maps and bars - They get in the way in some browsers (e.g. IE - dragging marker does NOT prevent or hide the tooltip).
THERE WERE CSS FILE CHANGES WITH THIS UPDATE!!! IF YOU USE NEVER-EXPIRE HEADERS, YOU WILL NEED TO INCREMENT YOUR CSS FILE VERSION NUMBER!!!
1.0.5
Added opacity support to picker and color/callback methods. New property "a" (alpha - range from 0-100) in all color objects now - defaults to 100% opaque. (Thank you Pavol)
Added title attributes to input elements - gives short tooltip directions on what button or field does.
Commit callback used to fire on control initialization (twice actually) - This has been corrected, it does not fire on initialization.
THERE WERE CSS FILE CHANGES WITH THIS UPDATE!!! IF YOU USE NEVER-EXPIRE HEADERS, YOU WILL NEED TO INCREMENT YOUR CSS FILE VERSION NUMBER!!!
1.0.4
Added ability for smaller picker icon with expandable window on any DOM element (not just input).
"draggable" property renamed to "expandable" and its scope increased to create small picker icon or large static picker.
1.0.3
Added cancelCallback function for registering an external function when user clicks cancel button. (Thank you Jeff and Pavol)
1.0.2
Random bug fixes - speed concerns.
1.0.1
Corrected closure based memeory leak - there may be others?
1.0.0
First Release.

View file

@ -0,0 +1,47 @@
jPicker 1.1.6
jQuery Plugin for Photoshop style color picker
Copyright (c) 2010 Christopher T. Tillman
Digital Magic Productions, Inc. (http://www.digitalmagicpro.com/)
MIT style license, FREE to use, alter, copy, sell, and especially ENHANCE
Painstakingly ported from John Dyers' excellent work on his own color picker based on the Prototype framework.
John Dyers' website: (http://johndyer.name)
Color Picker page: (http://johndyer.name/post/2007/09/PhotoShop-like-JavaScript-Color-Picker.aspx)
jPicker is a fast, lightweight jQuery plugin for including an advanced color picker in your web projects.
It has been painstakenly ported from John Dyers' awesome work on his picker using the Prototype framework.
jPicker supports all current browsers and has been extensively tested in Chrome, Firefox, IE5.5+, Safari,
and Opera.
If you are updating a current version, you MUST always use the CSS and image files from the download as
there may have been changes.
If you are moving from a V1.0.* version, you MUST read the docs below to implement some changes to the
Color object returned by the callback functions.
Known Issues
______________
Attaching multiple jPicker objects on a single page will slow performance.
jPicker creates a new instance of the picker for every element. Performance will suffer when binding dozens of instances.
Coming Soon
______________
Will consider supporting jQuery ThemeRoller CSS API for theming the UI if demand exists.
Planned For Future Release
______________
Move the jPicker object to a single instance that all selection instances point to.
- This will result in much faster operation and initialization for pages with multiple pickers.
Add activateCallback option for calling a callback function when the jPicker is activated or its binding is switched to a different picker element.
Add multiple window modes for picker operation, include modal, popup, windowed, and exclusive.

View file

@ -1,103 +0,0 @@
<public:component>
<public:attach event="onpropertychange" onevent="iePNGFix(0)" />
<script type="text/javascript">
// IE5.5+ PNG Alpha Fix v1.0
// (c) 2004-2008 Angus Turnbull http://www.twinhelix.com
// This is licensed under the GNU LGPL, version 2.1 or later.
// For details, see: http://creativecommons.org/licenses/LGPL/2.1/
// This must be a path to a blank image, relative to the HTML document(s).
// In production use I suggest '/images/blank.gif' or similar. That's all!
if (typeof blankImg == 'undefined') var blankImg = 'blank.gif';
function filt(s, b)
{
var f = 'DXImageTransform.Microsoft.AlphaImageLoader';
var sM = (currentStyle.backgroundRepeat == 'no-repeat') ? 'crop' : 'scale';
s = (s || '').replace(/\(/g, '%28').replace(/\)/g, '%29');
if (s && !(/IMG|INPUT/.test(nodeName) && !b) &&
currentStyle.width == 'auto' && currentStyle.height == 'auto')
{
style.width = offsetWidth + 'px';
style.height = clientHeight + 'px';
if (currentStyle.display == 'inline') style.display = 'inline-block';
}
if (filters[f])
{
filters[f].enabled = s ? true : false;
if (s) with (filters[f]) { src = s }
}
else if (s) style.filter = 'progid:'+f+'(src="'+s+'",sizingMethod="' + sM + '")';
}
function iePNGFix(init)
{
if (!/MSIE (5\.5|6)/.test(navigator.userAgent) || typeof filters == 'unknown') return;
var evt = init ? { propertyName: 'src,background' } : event;
var isSrc = /src/.test(evt.propertyName);
var isBg = /background/.test(evt.propertyName);
var isClass = !init &&
((this.className != this._png_class) && (this.className || this._png_class));
if (!(isSrc || isBg || isClass)) return;
this._png_class = this.className;
var blank = blankImg.match(/([^\/]+)$/)[1];
// Required for Whatever:hover support - erase any set BG if className changes.
if (isClass && ((style.backgroundImage.indexOf('url(') == -1) ||
(style.backgroundImage.indexOf(blank) > -1)))
{
setTimeout(function() { this.style.backgroundImage = '' }, 0);
return;
}
if (isSrc && this.src && /IMG|INPUT/.test(nodeName))
{
if ((/\.png/i).test(src))
{
filt(src, 1);
src = blankImg;
}
else if (src.indexOf(blank) == -1) filt();
}
var bgSrc = currentStyle.backgroundImage || style.backgroundImage;
if ((bgSrc + this.src).indexOf(blank) == -1)
{
var bgPNG = bgSrc.match(/^url[("']+(.*\.png[^\)"']*)[\)"']+[^\)]*$/i);
if (bgPNG)
{
style.backgroundImage = 'url("' + blankImg + '")';
filt(bgPNG[1], 0);
// Unclickable elements inside PNG backgrounds.
var tags = ['a', 'input', 'select', 'textarea', 'iframe', 'object'],
t = tags.length, tFix = [];
while (t--)
{
var elms = all.tags(tags[t]), e = elms.length;
while (e--) tFix.push(elms[e]);
}
var t = tFix.length;
if (t && (/relative|absolute/i).test(currentStyle.position))
alert('IEPNGFix: Children of positioned element are unclickable:\n\n<' +
nodeName + (id && ' id=' + id) + '>');
while (t--)
if (!(/relative|absolute/i).test(tFix[t].currentStyle.position))
tFix[t].style.position = 'relative';
}
else filt();
}
}
iePNGFix(1);
</script>
</public:component>

View file

@ -0,0 +1,232 @@
.jPicker .Icon {
display: inline-block;
height: 24px; /* change this value if using a different sized color picker icon */
position: relative; /* make this element an absolute positioning container */
text-align: left; /* make the zero width children position to the left of container */
width: 25px; /* change this value if using a different sized color picker icon */
}
.jPicker .Icon span.Color, .jPicker .Icon span.Alpha {
background-position: 2px 2px;
display: block;
height: 100%;
left: 0px;
position: absolute;
top: 0px;
width: 100%;
}
.jPicker .Icon span.Image {
background-repeat: no-repeat;
cursor: pointer;
display: block;
height: 100%;
left: 0px;
position: absolute;
top: 0px;
width: 100%;
}
.jPicker.Container {
color: #000;
z-index: 999;
}
table.jPicker {
background-color: #efefef;
border: 1px outset #666;
font-family: Arial, Helvetica, Sans-Serif;
font-size: 12px !important;
margin: 0px;
padding: 5px;
width: 545px;
z-index: 20;
}
.jPicker .Move {
background-color: #dddddd;
border-color: #fff #666 #666 #fff;
border-style: solid;
border-width: 1px;
cursor: move;
height: 12px;
padding: 0px;
}
.jPicker .Title {
font-size: 11px !important;
font-weight: bold;
margin: -2px 0px 0px 0px;
padding: 10px 0px 0px 0px;
text-align: center;
width: 100%;
}
.jPicker div.Map {
border-bottom: 2px solid #fff;
border-left: 2px solid #9a9a9a;
border-right: 2px solid #fff;
border-top: 2px solid #9a9a9a;
cursor: crosshair;
height: 260px; /* IE 6 incorrectly draws border inside the width and height instead of outside - We will fix this to 256px later */
margin: 0px 10px 10px 10px;
overflow: hidden; /* hide the overdraw of the Color Map icon when at edge of viewing box */
padding: 0px;
position: relative; /* make this element an absolute positioning container */
width: 260px; /* IE 6 incorrectly draws border inside the width and height instead of outside - We will fix this to 256px later */
}
.jPicker div[class="Map"] {
height: 256px; /* correct to 256px for browsers that support the "[class="xxx"]" selector (IE7+,Firefox,Safari,Chrome,Opera,etc.) */
width: 256px; /* correct to 256px for browsers that support the "[class="xxx"]" selector (IE7+,Firefox,Safari,Chrome,Opera,etc.) */
}
.jPicker div.Bar {
border-bottom: 2px solid #fff;
border-left: 2px solid #9a9a9a;
border-right: 2px solid #fff;
border-top: 2px solid #9a9a9a;
cursor: n-resize;
height: 260px; /* IE 6 incorrectly draws border inside the width and height instead of outside - We will fix this to 256px later */
margin: 12px 10px 0px 5px;
overflow: hidden;
padding: 0px;
position: relative;
width: 24px; /* IE 6 incorrectly draws border inside the width and height instead of outside - We will fix this to 20px later */
}
.jPicker div[class="Bar"] {
height: 256px; /* correct to 256px for browsers that support the "[class="xxx"]" selector (IE7+,Firefox,Safari,Chrome,Opera,etc.) */
width: 20px; /* correct to 20px for browsers that support the "[class="xxx"]" selector (IE7+,Firefox,Safari,Chrome,Opera,etc.) */
}
.jPicker .Map .Map1, .jPicker .Map .Map2, .jPicker .Map .Map3, .jPicker .Bar .Map1, .jPicker .Bar .Map2, .jPicker .Bar .Map3, .jPicker .Bar .Map4, .jPicker .Bar .Map5, .jPicker .Bar .Map6 {
background-color: transparent;
background-image: none;
display: block;
left: 0px;
position: absolute;
top: 0px;
}
.jPicker .Map .Map1, .jPicker .Map .Map2, .jPicker .Map .Map3 {
height: 2596px;
width: 256px; /* must specify pixel width. IE7/8 Quirks mode ignores opacity for an absolutely positioned item in a relative container with "overflow: visible". The marker in the colorBar
would not be drawn if its overflow is set to hidden. */
}
.jPicker .Bar .Map1, .jPicker .Bar .Map2, .jPicker .Bar .Map3, .jPicker .Bar .Map4 {
height: 3896px;
width: 20px; /* must specify pixel width. IE7/8 Quirks mode ignores opacity for an absolutely positioned item in a relative container with "overflow: visible". The marker in the colorBar
would not be drawn if its overflow is set to hidden. */
}
.jPicker .Bar .Map5, .jPicker .Bar .Map6 {
height: 256px;
width: 20px; /* must specify pixel width. IE7/8 Quirks mode ignores opacity for an absolutely positioned item in a relative container with "overflow: visible". The marker in the colorBar
would not be drawn if its overflow is set to hidden. */
}
.jPicker .Map .Map1, .jPicker .Map .Map2, .jPicker .Bar .Map6 {
background-repeat: no-repeat;
}
.jPicker .Map .Map3, .jPicker .Bar .Map5 {
background-repeat: repeat;
}
.jPicker .Bar .Map1, .jPicker .Bar .Map2, .jPicker .Bar .Map3, .jPicker .Bar .Map4 {
background-repeat: repeat-x;
}
.jPicker .Map .Arrow {
display: block;
position: absolute;
}
.jPicker .Bar .Arrow {
display: block;
left: 0px; /* (arrow width / 2) - (element width / 2) - position arrows' center in elements' center */
position: absolute;
}
.jPicker .Preview {
font-size: 9px;
padding: 5px 0px 0px 0px;
text-align: center;
}
.jPicker .Preview div {
border: 2px inset #eee;
height: 62px;
margin: 0px auto;
padding: 0px;
width: 62px;
}
.jPicker .Preview div span {
border: 1px solid #000;
display: block;
height: 30px;
margin: 0px auto;
padding: 0px;
width: 60px;
}
.jPicker .Preview .Active {
border-bottom-width: 0px;
}
.jPicker .Preview .Current {
border-top-width: 0px;
cursor: pointer;
}
.jPicker input {
font-size: 13px;
}
.jPicker .Button {
text-align: center;
padding: 0px 4px;
width: 115px;
}
.jPicker .Button input {
padding: 2px 0px;
width: 100px;
}
.jPicker .Button .Ok {
margin: 12px 0px 5px 0px;
}
.jPicker td {
margin: 0px;
padding: 0px;
}
.jPicker td.Radio {
margin: 0px;
padding: 0px;
width: 31px;
}
.jPicker td.Radio input {
margin: 0px 5px 0px 0px;
padding: 0px;
}
.jPicker td.Text {
font-size: 12px !important;
height: 22px;
margin: 0px;
padding: 0px;
text-align: left;
width: 70px;
}
.jPicker tr.Hex td.Text {
width: 100px;
}
.jPicker td.Text input {
background-color: #fff;
border: 1px inset #aaa;
height: 19px;
margin: 0px 0px 0px 5px;
text-align: left;
width: 30px;
}
.jPicker td[class="Text"] input {
height: 15px;
}
.jPicker tr.Hex td.Text input.Hex {
width: 50px;
}
.jPicker tr.Hex td.Text input.AHex {
width: 20px;
}
.jPicker .Grid {
text-align: center;
width: 114px;
}
.jPicker .Grid span.QuickColor {
border: 1px inset #aaa;
cursor: pointer;
display: inline-block;
height: 15px;
line-height: 15px;
margin: 0px;
padding: 0px;
width: 19px;
}
.jPicker .Grid span[class="QuickColor"] {
width: 17px;
}

View file

@ -0,0 +1 @@
.jPicker .Icon{display:inline-block;height:24px;position:relative;text-align:left;width:25px}.jPicker .Icon span.Color,.jPicker .Icon span.Alpha{background-position:2px 2px;display:block;height:100%;left:0px;position:absolute;top:0px;width:100%}.jPicker .Icon span.Image{background-repeat:no-repeat;cursor:pointer;display:block;height:100%;left:0px;position:absolute;top:0px;width:100%}.jPicker.Container{color:#000;z-index:999}table.jPicker{background-color:#efefef;border:1px outset #666;font-family:Arial, Helvetica, Sans-Serif;font-size:12px !important;margin:0px;padding:5px;width:545px;z-index:20}.jPicker .Move{background-color:#dddddd;border-color:#fff #666 #666 #fff;border-style:solid;border-width:1px;cursor:move;height:12px;padding:0px}.jPicker .Title{font-size:11px !important;font-weight:bold;margin:-2px 0px 0px 0px;padding:10px 0px 0px 0px;text-align:center;width:100%}.jPicker div.Map{border-bottom:2px solid #fff;border-left:2px solid #9a9a9a;border-right:2px solid #fff;border-top:2px solid #9a9a9a;cursor:crosshair;height:260px;margin:0px 10px 10px 10px;overflow:hidden;padding:0px;position:relative;width:260px}.jPicker div[class="Map"]{height:256px;width:256px}.jPicker div.Bar{border-bottom:2px solid #fff;border-left:2px solid #9a9a9a;border-right:2px solid #fff;border-top:2px solid #9a9a9a;cursor:n-resize;height:260px;margin:12px 10px 0px 5px;overflow:hidden;padding:0px;position:relative;width:24px}.jPicker div[class="Bar"]{height:256px;width:20px}.jPicker .Map .Map1,.jPicker .Map .Map2,.jPicker .Map .Map3,.jPicker .Bar .Map1,.jPicker .Bar .Map2,.jPicker .Bar .Map3,.jPicker .Bar .Map4,.jPicker .Bar .Map5,.jPicker .Bar .Map6{background-color:transparent;background-image:none;display:block;left:0px;position:absolute;top:0px}.jPicker .Map .Map1,.jPicker .Map .Map2,.jPicker .Map .Map3{height:2596px;width:256px}.jPicker .Bar .Map1,.jPicker .Bar .Map2,.jPicker .Bar .Map3,.jPicker .Bar .Map4{height:3896px;width:20px}.jPicker .Bar .Map5,.jPicker .Bar .Map6{height:256px;width:20px}.jPicker .Map .Map1,.jPicker .Map .Map2,.jPicker .Bar .Map6{background-repeat:no-repeat}.jPicker .Map .Map3,.jPicker .Bar .Map5{background-repeat:repeat}.jPicker .Bar .Map1,.jPicker .Bar .Map2,.jPicker .Bar .Map3,.jPicker .Bar .Map4{background-repeat:repeat-x}.jPicker .Map .Arrow{display:block;position:absolute}.jPicker .Bar .Arrow{display:block;left:0px;position:absolute}.jPicker .Preview{font-size:9px;padding:5px 0px 0px 0px;text-align:center}.jPicker .Preview div{border:2px inset #eee;height:62px;margin:0px auto;padding:0px;width:62px}.jPicker .Preview div span{border:1px solid #000;display:block;height:30px;margin:0px auto;padding:0px;width:60px}.jPicker .Preview .Active{border-bottom-width:0px}.jPicker .Preview .Current{border-top-width:0px;cursor:pointer}.jPicker input{font-size:13px}.jPicker .Button{text-align:center;padding:0px 4px;width:115px}.jPicker .Button input{padding:2px 0px;width:100px}.jPicker .Button .Ok{margin:12px 0px 5px 0px}.jPicker td{margin:0px;padding:0px}.jPicker td.Radio{margin:0px;padding:0px;width:31px}.jPicker td.Radio input{margin:0px 5px 0px 0px;padding:0px}.jPicker td.Text{font-size:12px !important;height:22px;margin:0px;padding:0px;text-align:left;width:70px}.jPicker tr.Hex td.Text{width:100px}.jPicker td.Text input{background-color:#fff;border:1px inset #aaa;height:19px;margin:0px 0px 0px 5px;text-align:left;width:30px}.jPicker td[class="Text"] input{height:15px}.jPicker tr.Hex td.Text input.Hex{width:50px}.jPicker tr.Hex td.Text input.AHex{width:20px}.jPicker .Grid{text-align:center;width:114px}.jPicker .Grid span.QuickColor{border:1px inset #aaa;cursor:pointer;display:inline-block;height:15px;line-height:15px;margin:0px;padding:0px;width:19px}.jPicker .Grid span[class="QuickColor"]{width:17px}

View file

@ -1 +0,0 @@
.xe_colorpicker{position:absolute;width:194px;height:183px;overflow:hidden;z-index:100}.xe_colorpicker .colorpicker{position:relative;width:192px;height:160px;background-color:white;border:1px solid silver}.xe_colorpicker .colortable{position:absolute;left :4px;top :4px;border:1px solid #909090}.xe_colorpicker .colortable .background{position:relative;width:150px;height:150px;background:url(../images/colorpicker_overlay.png) no-repeat;overflow:hidden}.xe_colorpicker .colortable .indicator{position:absolute;width:11px;height:11px;background:url(../images/colorpicker_select.gif) no-repeat}.xe_colorpicker .huebar{position:absolute;right :4px;top:4px;border:1px solid #909090}.xe_colorpicker .huebar .background{width:20px;height:150px;background:url(../images/colorpicker_huebg.png) repeat-x}.xe_colorpicker .huebar .indicator{position:absolute;width:35px;height:9px;left:-3px;background:transparent url(../images/colorpicker_indic.gif) no-repeat}.xe_colorpicker .buttons{position:absolute;width:194px;background-color:black}.xe_colorpicker .buttons button{width:33%;color:white;height:22px;border:0;background-color:transparent;padding:0;margin:0}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 382 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 552 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 230 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 86 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 139 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 B

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,71 @@
(function(j){Math.precision=function(a,d){void 0===d&&(d=0);return Math.round(a*Math.pow(10,d))/Math.pow(10,d)};var W=function(a,d){var c,h,b=this,f=a.find("img:first"),m=0,p=100,n=100,l=0,s=100,q=100,t=0,e=0,C,A=[],u=function(c){for(var a=0;a<A.length;a++)A[a].call(b,b,c)},g=function(e){var d=a.offset();c=d.left|0;h=d.top|0;clearTimeout(C);C=setTimeout(function(){H.call(b,e)},0);j(document).bind("mousemove",k).bind("mouseup",B);e.preventDefault()},k=function(c){clearTimeout(C);C=setTimeout(function(){H.call(b,
c)},0);c.stopPropagation();c.preventDefault();return!1},B=function(c){j(document).unbind("mouseup",B).unbind("mousemove",k);c.stopPropagation();c.preventDefault();return!1},H=function(e){var d=e.pageX-c,e=e.pageY-h,f=a.w,g=a.h;0>d?d=0:d>f&&(d=f);0>e?e=0:e>g&&(e=g);F.call(b,"xy",{x:d/f*n+m,y:e/g*q+l})},F=function(c,a,d){if(void 0===a){if(void 0===c||null==c)c="xy";switch(c.toLowerCase()){case "x":return t;case "y":return e;default:return{x:t,y:e}}}if(!(null!=d&&d==b)){var h=!1,f,g;null==c&&(c="xy");
switch(c.toLowerCase()){case "x":f=a&&(a.x&&a.x|0||a|0)||0;break;case "y":g=a&&(a.y&&a.y|0||a|0)||0;break;default:f=a&&a.x&&a.x|0||0,g=a&&a.y&&a.y|0||0}null!=f&&(f<m?f=m:f>p&&(f=p),t!=f&&(t=f,h=!0));null!=g&&(g<l?g=l:g>s&&(g=s),e!=g&&(e=g,h=!0));h&&u.call(b,d||b)}},I=function(c){j.isFunction(c)&&A.push(c)};j.extend(!0,b,{val:F,range:function(c,a){if(a===void 0){if(c===void 0||c==null)c="all";switch(c.toLowerCase()){case "minx":return m;case "maxx":return p;case "rangex":return{minX:m,maxX:p,rangeX:n};
case "miny":return l;case "maxy":return s;case "rangey":return{minY:l,maxY:s,rangeY:q};default:return{minX:m,maxX:p,rangeX:n,minY:l,maxY:s,rangeY:q}}}var d,e,h,f;c==null&&(c="all");switch(c.toLowerCase()){case "minx":d=a&&(a.minX&&a.minX|0||a|0)||0;break;case "maxx":e=a&&(a.maxX&&a.maxX|0||a|0)||0;break;case "rangex":d=a&&a.minX&&a.minX|0||0;e=a&&a.maxX&&a.maxX|0||0;break;case "miny":h=a&&(a.minY&&a.minY|0||a|0)||0;break;case "maxy":f=a&&(a.maxY&&a.maxY|0||a|0)||0;break;case "rangey":h=a&&a.minY&&
a.minY|0||0;f=a&&a.maxY&&a.maxY|0||0;break;default:d=a&&a.minX&&a.minX|0||0;e=a&&a.maxX&&a.maxX|0||0;h=a&&a.minY&&a.minY|0||0;f=a&&a.maxY&&a.maxY|0||0}if(d!=null&&m!=d){m=d;n=p-m}if(e!=null&&p!=e){p=e;n=p-m}if(h!=null&&l!=h){l=h;q=s-l}if(f!=null&&s!=f){s=f;q=s-l}},bind:I,unbind:function(c){if(j.isFunction(c))for(var a;(a=j.inArray(c,A))!=-1;)A.splice(a,1)},destroy:function(){j(document).unbind("mouseup",B).unbind("mousemove",k);a.unbind("mousedown",g);A=f=a=null}});f.src=d.arrow&&d.arrow.image;f.w=
d.arrow&&d.arrow.width||f.width();f.h=d.arrow&&d.arrow.height||f.height();a.w=d.map&&d.map.width||a.width();a.h=d.map&&d.map.height||a.height();a.bind("mousedown",g);I.call(b,function(){var c=0,d=0,h=a.w,g=a.h,b=f.w,k=f.h;setTimeout(function(){0<n&&(c=t==p?h:t/n*h|0);0<q&&(d=e==s?g:e/q*g|0);c=b>=h?(h>>1)-(b>>1):c-(b>>1);d=k>=g?(g>>1)-(k>>1):d-(k>>1);f.css({left:c+"px",top:d+"px"})},0)})},la=function(a,d,c,h){var b=this,a=a.find("td.Text input"),f=a.eq(3),m=a.eq(4),p=a.eq(5),n=7<a.length?a.eq(6):null,
l=a.eq(0),s=a.eq(1),q=a.eq(2),t=a.eq(7<a.length?7:6),e=7<a.length?a.eq(8):null,C=function(a){if(!(""==a.target.value&&a.target!=t.get(0)&&(null!=c&&a.target!=c.get(0)||null==c))){if(!g(a))return a;switch(a.target){case f.get(0):switch(a.keyCode){case 38:return f.val(k.call(b,(f.val()<<0)+1,0,255)),d.val("r",f.val(),a.target),!1;case 40:return f.val(k.call(b,(f.val()<<0)-1,0,255)),d.val("r",f.val(),a.target),!1}break;case m.get(0):switch(a.keyCode){case 38:return m.val(k.call(b,(m.val()<<0)+1,0,255)),
d.val("g",m.val(),a.target),!1;case 40:return m.val(k.call(b,(m.val()<<0)-1,0,255)),d.val("g",m.val(),a.target),!1}break;case p.get(0):switch(a.keyCode){case 38:return p.val(k.call(b,(p.val()<<0)+1,0,255)),d.val("b",p.val(),a.target),!1;case 40:return p.val(k.call(b,(p.val()<<0)-1,0,255)),d.val("b",p.val(),a.target),!1}break;case n&&n.get(0):switch(a.keyCode){case 38:return n.val(k.call(b,parseFloat(n.val())+1,0,100)),d.val("a",Math.precision(255*n.val()/100,h),a.target),!1;case 40:return n.val(k.call(b,
parseFloat(n.val())-1,0,100)),d.val("a",Math.precision(255*n.val()/100,h),a.target),!1}break;case l.get(0):switch(a.keyCode){case 38:return l.val(k.call(b,(l.val()<<0)+1,0,360)),d.val("h",l.val(),a.target),!1;case 40:return l.val(k.call(b,(l.val()<<0)-1,0,360)),d.val("h",l.val(),a.target),!1}break;case s.get(0):switch(a.keyCode){case 38:return s.val(k.call(b,(s.val()<<0)+1,0,100)),d.val("s",s.val(),a.target),!1;case 40:return s.val(k.call(b,(s.val()<<0)-1,0,100)),d.val("s",s.val(),a.target),!1}break;
case q.get(0):switch(a.keyCode){case 38:return q.val(k.call(b,(q.val()<<0)+1,0,100)),d.val("v",q.val(),a.target),!1;case 40:return q.val(k.call(b,(q.val()<<0)-1,0,100)),d.val("v",q.val(),a.target),!1}}}},A=function(a){if(!(""==a.target.value&&a.target!=t.get(0)&&(null!=c&&a.target!=c.get(0)||null==c))){if(!g(a))return a;switch(a.target){case f.get(0):f.val(k.call(b,f.val(),0,255));d.val("r",f.val(),a.target);break;case m.get(0):m.val(k.call(b,m.val(),0,255));d.val("g",m.val(),a.target);break;case p.get(0):p.val(k.call(b,
p.val(),0,255));d.val("b",p.val(),a.target);break;case n&&n.get(0):n.val(k.call(b,n.val(),0,100));d.val("a",Math.precision(255*n.val()/100,h),a.target);break;case l.get(0):l.val(k.call(b,l.val(),0,360));d.val("h",l.val(),a.target);break;case s.get(0):s.val(k.call(b,s.val(),0,100));d.val("s",s.val(),a.target);break;case q.get(0):q.val(k.call(b,q.val(),0,100));d.val("v",q.val(),a.target);break;case t.get(0):t.val(t.val().replace(/[^a-fA-F0-9]/g,"").toLowerCase().substring(0,6));c&&c.val(t.val());d.val("hex",
""!=t.val()?t.val():null,a.target);break;case c&&c.get(0):G.isHex(c.val())?(t.val(c.val()),d.val("hex",""!=c.val()?c.val():null,a.target)):d.val("hex",null,a.target);break;case e&&e.get(0):e.val(e.val().replace(/[^a-fA-F0-9]/g,"").toLowerCase().substring(0,2)),d.val("a",null!=e.val()?parseInt(e.val(),16):null,a.target)}}},u=function(a){if(null!=d.val())switch(a.target){case f.get(0):f.val(d.val("r"));break;case m.get(0):m.val(d.val("g"));break;case p.get(0):p.val(d.val("b"));break;case n&&n.get(0):n.val(Math.precision(100*
d.val("a")/255,h));break;case l.get(0):l.val(d.val("h"));break;case s.get(0):s.val(d.val("s"));break;case q.get(0):q.val(d.val("v"));break;case t.get(0):case c&&c.get(0):t.val(d.val("hex"));c&&c.val("#"+d.val("hex"));break;case e&&e.get(0):e.val(d.val("ahex").substring(6))}},g=function(a){switch(a.keyCode){case 9:case 16:case 29:case 37:case 39:return!1;case "c".charCodeAt():case "v".charCodeAt():if(a.ctrlKey)return!1}return!0},k=function(a,c,d){return""==a||isNaN(a)?c:a>d?d:a<c?c:a},B=function(a,
d){var b=a.val("all");d!=f.get(0)&&f.val(null!=b?b.r:"");d!=m.get(0)&&m.val(null!=b?b.g:"");d!=p.get(0)&&p.val(null!=b?b.b:"");n&&d!=n.get(0)&&n.val(null!=b?Math.precision(100*b.a/255,h):"");d!=l.get(0)&&l.val(null!=b?b.h:"");d!=s.get(0)&&s.val(null!=b?b.s:"");d!=q.get(0)&&q.val(null!=b?b.v:"");if(d!=t.get(0)&&(c&&d!=c.get(0)||!c))t.val(null!=b?b.hex:"");c&&d!=c.get(0)&&d!=t.get(0)&&c.val(null!=b?"#"+b.hex:"transparent");e&&d!=e.get(0)&&e.val(null!=b?b.ahex.substring(6):"")};j.extend(!0,b,{destroy:function(){f.add(m).add(p).add(n).add(l).add(s).add(q).add(t).add(c).add(e).unbind("keyup",
A).unbind("blur",u);f.add(m).add(p).add(n).add(l).add(s).add(q).unbind("keydown",C);d.unbind(B);e=t=q=s=l=n=p=m=f=null}});f.add(m).add(p).add(n).add(l).add(s).add(q).add(t).add(c).add(e).bind("keyup",A).bind("blur",u);f.add(m).add(p).add(n).add(l).add(s).add(q).bind("keydown",C);d.bind(B)};j.jPicker={List:[],Color:function(a){var d=this,c,b,x,f,m,p,n,l=[],s=function(a){for(var c=0;c<l.length;c++)l[c].call(d,d,a)},q=function(a,e,j){if(void 0===e){if(void 0===a||null==a||""==a)a="all";if(null==c)return null;
switch(a.toLowerCase()){case "ahex":return G.rgbaToHex({r:c,g:b,b:x,a:f});case "hex":return q("ahex").substring(0,6);case "all":return{r:c,g:b,b:x,a:f,h:m,s:p,v:n,hex:q.call(d,"hex"),ahex:q.call(d,"ahex")};default:for(var e={},l=0;l<a.length;l++)switch(a.charAt(l)){case "r":1==a.length?e=c:e.r=c;break;case "g":1==a.length?e=b:e.g=b;break;case "b":1==a.length?e=x:e.b=x;break;case "a":1==a.length?e=f:e.a=f;break;case "h":1==a.length?e=m:e.h=m;break;case "s":1==a.length?e=p:e.s=p;break;case "v":1==a.length?
e=n:e.v=n}return e=={}?q.call(d,"all"):e}}if(!(null!=j&&j==d)){var u=!1;null==a&&(a="");if(null==e)null!=c&&(c=null,u=!0),null!=b&&(b=null,u=!0),null!=x&&(x=null,u=!0),null!=f&&(f=null,u=!0),null!=m&&(m=null,u=!0),null!=p&&(p=null,u=!0),null!=n&&(n=null,u=!0),u&&s.call(d,j||d);else switch(a.toLowerCase()){case "ahex":case "hex":e=G.hexToRgba(e&&(e.ahex||e.hex)||e||"00000000");q.call(d,"rgba",{r:e.r,g:e.g,b:e.b,a:"ahex"==a?e.a:null!=f?f:255},j);break;default:if(e&&(null!=e.ahex||null!=e.hex)){q.call(d,
"ahex",e.ahex||e.hex||"00000000",j);break}var g,k=!1,B=!1;void 0!==e.r&&-1==!a.indexOf("r")&&(a+="r");void 0!==e.g&&-1==!a.indexOf("g")&&(a+="g");void 0!==e.b&&-1==!a.indexOf("b")&&(a+="b");void 0!==e.a&&-1==!a.indexOf("a")&&(a+="a");void 0!==e.h&&-1==!a.indexOf("h")&&(a+="h");void 0!==e.s&&-1==!a.indexOf("s")&&(a+="s");void 0!==e.v&&-1==!a.indexOf("v")&&(a+="v");for(l=0;l<a.length;l++)switch(a.charAt(l)){case "r":if(B)continue;k=!0;g=e&&e.r&&e.r|0||e&&e|0||0;0>g?g=0:255<g&&(g=255);c!=g&&(c=g,u=!0);
break;case "g":if(B)continue;k=!0;g=e&&e.g&&e.g|0||e&&e|0||0;0>g?g=0:255<g&&(g=255);b!=g&&(b=g,u=!0);break;case "b":if(B)continue;k=!0;g=e&&e.b&&e.b|0||e&&e|0||0;0>g?g=0:255<g&&(g=255);x!=g&&(x=g,u=!0);break;case "a":g=e&&null!=e.a?e.a|0:null!=e?e|0:255;0>g?g=0:255<g&&(g=255);f!=g&&(f=g,u=!0);break;case "h":if(k)continue;B=!0;g=e&&e.h&&e.h|0||e&&e|0||0;0>g?g=0:360<g&&(g=360);m!=g&&(m=g,u=!0);break;case "s":if(k)continue;B=!0;g=e&&null!=e.s?e.s|0:null!=e?e|0:100;0>g?g=0:100<g&&(g=100);p!=g&&(p=g,u=
!0);break;case "v":if(k)continue;B=!0;g=e&&null!=e.v?e.v|0:null!=e?e|0:100;0>g?g=0:100<g&&(g=100);n!=g&&(n=g,u=!0)}u&&(k?(c=c||0,b=b||0,x=x||0,e=G.rgbToHsv({r:c,g:b,b:x}),m=e.h,p=e.s,n=e.v):B&&(m=m||0,p=null!=p?p:100,n=null!=n?n:100,e=G.hsvToRgb({h:m,s:p,v:n}),c=e.r,b=e.g,x=e.b),f=null!=f?f:255,s.call(d,j||d))}}};j.extend(!0,d,{val:q,bind:function(a){j.isFunction(a)&&l.push(a)},unbind:function(a){if(j.isFunction(a))for(var c;(c=j.inArray(a,l))!=-1;)l.splice(c,1)},destroy:function(){l=null}});a&&(null!=
a.ahex?q("ahex",a):null!=a.hex?q((null!=a.a?"a":"")+"hex",null!=a.a?{ahex:a.hex+G.intToHex(a.a)}:a):null!=a.r&&null!=a.g&&null!=a.b?q("rgb"+(null!=a.a?"a":""),a):null!=a.h&&null!=a.s&&null!=a.v&&q("hsv"+(null!=a.a?"a":""),a))},ColorMethods:{hexToRgba:function(a){a=this.validateHex(a);if(""==a)return{r:null,g:null,b:null,a:null};var d="00",c="00",b="00",j="255";6==a.length&&(a+="ff");6<a.length?(d=a.substring(0,2),c=a.substring(2,4),b=a.substring(4,6),j=a.substring(6,a.length)):(4<a.length&&(d=a.substring(4,
a.length),a=a.substring(0,4)),2<a.length&&(c=a.substring(2,a.length),a=a.substring(0,2)),0<a.length&&(b=a.substring(0,a.length)));return{r:this.hexToInt(d),g:this.hexToInt(c),b:this.hexToInt(b),a:this.hexToInt(j)}},isHex:function(a){return/^#[a-fA-F0-9]{6}$/g.test(a)},validateHex:function(a){a=a.toLowerCase().replace(/[^a-f0-9]/g,"");8<a.length&&(a=a.substring(0,8));return a},rgbaToHex:function(a){return this.intToHex(a.r)+this.intToHex(a.g)+this.intToHex(a.b)+this.intToHex(a.a)},intToHex:function(a){a=
(a|0).toString(16);1==a.length&&(a="0"+a);return a.toLowerCase()},hexToInt:function(a){return parseInt(a,16)},rgbToHsv:function(a){var d=a.r/255,c=a.g/255,a=a.b/255,b={h:0,s:0,v:0},j=0,f=0;d>=c&&d>=a?(f=d,j=c>a?a:c):c>=a&&c>=d?(f=c,j=d>a?a:d):(f=a,j=c>d?d:c);b.v=f;b.s=f?(f-j)/f:0;b.s?(j=f-j,b.h=d==f?(c-a)/j:c==f?2+(a-d)/j:4+(d-c)/j,b.h=parseInt(60*b.h),0>b.h&&(b.h+=360)):b.h=0;b.s=100*b.s|0;b.v=100*b.v|0;return b},hsvToRgb:function(a){var b={r:0,g:0,b:0,a:100},c=a.h,h=a.s,a=a.v;if(0==h)b.r=0==a?b.g=
b.b=0:b.g=b.b=255*a/100|0;else{360==c&&(c=0);var c=c/60,h=h/100,a=a/100,j=c|0,f=c-j,c=a*(1-h),m=a*(1-h*f),h=a*(1-h*(1-f));switch(j){case 0:b.r=a;b.g=h;b.b=c;break;case 1:b.r=m;b.g=a;b.b=c;break;case 2:b.r=c;b.g=a;b.b=h;break;case 3:b.r=c;b.g=m;b.b=a;break;case 4:b.r=h;b.g=c;b.b=a;break;case 5:b.r=a,b.g=c,b.b=m}b.r=255*b.r|0;b.g=255*b.g|0;b.b=255*b.b|0}return b}}};var b=j.jPicker.Color,O=j.jPicker.List,G=j.jPicker.ColorMethods;j.fn.jPicker=function(a){var d=arguments;return this.each(function(){var c=
this,h=j.extend(!0,{},j.fn.jPicker.defaults,a);"input"==j(c).get(0).nodeName.toLowerCase()&&(j.extend(!0,h,{window:{bindToInput:!0,expandable:!0,input:j(c)}}),""==j(c).val()||"transparent"==j(c).val()?(h.color.active=new b({hex:null}),h.color.current=new b({hex:null})):G.validateHex(j(c).val())&&(h.color.active=new b({hex:j(c).val(),a:h.color.active.val("a")}),h.color.current=new b({hex:j(c).val(),a:h.color.active.val("a")})));h.window.expandable?j(c).after('<span class="jPicker"><span class="Icon"><span class="Color">&nbsp;</span><span class="Alpha">&nbsp;</span><span class="Image" title="Click To Open Color Picker">&nbsp;</span><span class="Container">&nbsp;</span></span></span>'):
h.window.liveUpdate=!1;var x=7>parseFloat(navigator.appVersion.split("MSIE")[1])&&document.body.filters,f=null,m=null,p=null,n=null,l=null,s=null,q=null,t=null,e=null,C=null,A=null,u=null,g=null,k=null,B=null,H=null,F=null,I=null,V=null,L=null,J=null,M=null,N=null,K=null,X=null,P=null,Y=null,Z=null,aa=function(a){var b=w.active,d=b.val("hex"),f,j;h.color.mode=a;switch(a){case "h":setTimeout(function(){y.call(c,m,"transparent");o.call(c,n,0);r.call(c,n,100);o.call(c,l,260);r.call(c,l,100);y.call(c,
p,"transparent");o.call(c,q,0);r.call(c,q,100);o.call(c,t,260);r.call(c,t,100);o.call(c,e,260);r.call(c,e,100);o.call(c,C,260);r.call(c,C,100);o.call(c,u,260);r.call(c,u,100)},0);g.range("all",{minX:0,maxX:100,minY:0,maxY:100});k.range("rangeY",{minY:0,maxY:360});if(b.val("ahex")==null)break;g.val("xy",{x:b.val("s"),y:100-b.val("v")},g);k.val("y",360-b.val("h"),k);break;case "s":setTimeout(function(){y.call(c,m,"transparent");o.call(c,n,-260);o.call(c,l,-520);o.call(c,q,-260);o.call(c,t,-520);o.call(c,
u,260);r.call(c,u,100)},0);g.range("all",{minX:0,maxX:360,minY:0,maxY:100});k.range("rangeY",{minY:0,maxY:100});if(b.val("ahex")==null)break;g.val("xy",{x:b.val("h"),y:100-b.val("v")},g);k.val("y",100-b.val("s"),k);break;case "v":setTimeout(function(){y.call(c,m,"000000");o.call(c,n,-780);o.call(c,l,260);y.call(c,p,d);o.call(c,q,-520);o.call(c,t,260);r.call(c,t,100);o.call(c,u,260);r.call(c,u,100)},0);g.range("all",{minX:0,maxX:360,minY:0,maxY:100});k.range("rangeY",{minY:0,maxY:100});if(b.val("ahex")==
null)break;g.val("xy",{x:b.val("h"),y:100-b.val("s")},g);k.val("y",100-b.val("v"),k);break;case "r":f=-1040;j=-780;g.range("all",{minX:0,maxX:255,minY:0,maxY:255});k.range("rangeY",{minY:0,maxY:255});if(b.val("ahex")==null)break;g.val("xy",{x:b.val("b"),y:255-b.val("g")},g);k.val("y",255-b.val("r"),k);break;case "g":f=-1560;j=-1820;g.range("all",{minX:0,maxX:255,minY:0,maxY:255});k.range("rangeY",{minY:0,maxY:255});if(b.val("ahex")==null)break;g.val("xy",{x:b.val("b"),y:255-b.val("r")},g);k.val("y",
255-b.val("g"),k);break;case "b":f=-2080;j=-2860;g.range("all",{minX:0,maxX:255,minY:0,maxY:255});k.range("rangeY",{minY:0,maxY:255});if(b.val("ahex")==null)break;g.val("xy",{x:b.val("r"),y:255-b.val("g")},g);k.val("y",255-b.val("b"),k);break;case "a":setTimeout(function(){y.call(c,m,"transparent");o.call(c,n,-260);o.call(c,l,-520);o.call(c,q,260);o.call(c,t,260);r.call(c,t,100);o.call(c,u,0);r.call(c,u,100)},0);g.range("all",{minX:0,maxX:360,minY:0,maxY:100});k.range("rangeY",{minY:0,maxY:255});
if(b.val("ahex")==null)break;g.val("xy",{x:b.val("h"),y:100-b.val("v")},g);k.val("y",255-b.val("a"),k);break;default:throw"Invalid Mode";}switch(a){case "s":case "v":case "a":setTimeout(function(){r.call(c,n,100);r.call(c,q,100);o.call(c,e,260);r.call(c,e,100);o.call(c,C,260);r.call(c,C,100)},0);break;case "r":case "g":case "b":setTimeout(function(){y.call(c,m,"transparent");y.call(c,p,"transparent");r.call(c,q,100);r.call(c,n,100);o.call(c,n,f);o.call(c,l,f-260);o.call(c,q,j-780);o.call(c,t,j-520);
o.call(c,e,j);o.call(c,C,j-260);o.call(c,u,260);r.call(c,u,100)},0)}b.val("ahex")!=null&&$.call(c,b)},$=function(a,b){(b==null||b!=k&&b!=g)&&ma.call(c,a,b);setTimeout(function(){na.call(c,a);oa.call(c,a);pa.call(c,a)},0)},qa=function(a,c){var b=w.active;if(!(c!=g&&b.val()==null)){var e=a.val("all");switch(h.color.mode){case "h":b.val("sv",{s:e.x,v:100-e.y},c);break;case "s":case "a":b.val("hv",{h:e.x,v:100-e.y},c);break;case "v":b.val("hs",{h:e.x,s:100-e.y},c);break;case "r":b.val("gb",{g:255-e.y,
b:e.x},c);break;case "g":b.val("rb",{r:255-e.y,b:e.x},c);break;case "b":b.val("rg",{r:e.x,g:255-e.y},c)}}},ra=function(a,c){var b=w.active;if(!(c!=k&&b.val()==null))switch(h.color.mode){case "h":b.val("h",{h:360-a.val("y")},c);break;case "s":b.val("s",{s:100-a.val("y")},c);break;case "v":b.val("v",{v:100-a.val("y")},c);break;case "r":b.val("r",{r:255-a.val("y")},c);break;case "g":b.val("g",{g:255-a.val("y")},c);break;case "b":b.val("b",{b:255-a.val("y")},c);break;case "a":b.val("a",255-a.val("y"),
c)}},ma=function(a,c){if(c!=g)switch(h.color.mode){case "h":var b=a.val("sv");g.val("xy",{x:b!=null?b.s:100,y:100-(b!=null?b.v:100)},c);break;case "s":case "a":b=a.val("hv");g.val("xy",{x:b&&b.h||0,y:100-(b!=null?b.v:100)},c);break;case "v":b=a.val("hs");g.val("xy",{x:b&&b.h||0,y:100-(b!=null?b.s:100)},c);break;case "r":b=a.val("bg");g.val("xy",{x:b&&b.b||0,y:255-(b&&b.g||0)},c);break;case "g":b=a.val("br");g.val("xy",{x:b&&b.b||0,y:255-(b&&b.r||0)},c);break;case "b":b=a.val("rg");g.val("xy",{x:b&&
b.r||0,y:255-(b&&b.g||0)},c)}if(c!=k)switch(h.color.mode){case "h":k.val("y",360-(a.val("h")||0),c);break;case "s":b=a.val("s");k.val("y",100-(b!=null?b:100),c);break;case "v":b=a.val("v");k.val("y",100-(b!=null?b:100),c);break;case "r":k.val("y",255-(a.val("r")||0),c);break;case "g":k.val("y",255-(a.val("g")||0),c);break;case "b":k.val("y",255-(a.val("b")||0),c);break;case "a":b=a.val("a");k.val("y",255-(b!=null?b:255),c)}},na=function(a){try{var b=a.val("all");L.css({backgroundColor:b&&"#"+b.hex||
"transparent"});r.call(c,L,b&&Math.precision(b.a*100/255,4)||0)}catch(e){}},oa=function(a){switch(h.color.mode){case "h":y.call(c,m,(new b({h:a.val("h")||0,s:100,v:100})).val("hex"));break;case "s":case "a":var e=a.val("s");r.call(c,l,100-(e!=null?e:100));break;case "v":e=a.val("v");r.call(c,n,e!=null?e:100);break;case "r":r.call(c,l,Math.precision((a.val("r")||0)/255*100,4));break;case "g":r.call(c,l,Math.precision((a.val("g")||0)/255*100,4));break;case "b":r.call(c,l,Math.precision((a.val("b")||
0)/255*100))}a=a.val("a");r.call(c,s,Math.precision((255-(a||0))*100/255,4))},pa=function(a){switch(h.color.mode){case "h":var d=a.val("a");r.call(c,A,Math.precision((255-(d||0))*100/255,4));break;case "s":var d=a.val("hva"),f=new b({h:d&&d.h||0,s:100,v:d!=null?d.v:100});y.call(c,p,f.val("hex"));r.call(c,t,100-(d!=null?d.v:100));r.call(c,A,Math.precision((255-(d&&d.a||0))*100/255,4));break;case "v":d=a.val("hsa");f=new b({h:d&&d.h||0,s:d!=null?d.s:100,v:100});y.call(c,p,f.val("hex"));r.call(c,A,Math.precision((255-
(d&&d.a||0))*100/255,4));break;case "r":case "g":case "b":f=d=0;a=a.val("rgba");if(h.color.mode=="r"){d=a&&a.b||0;f=a&&a.g||0}else if(h.color.mode=="g"){d=a&&a.b||0;f=a&&a.r||0}else if(h.color.mode=="b"){d=a&&a.r||0;f=a&&a.g||0}var g=f>d?d:f;r.call(c,t,d>f?Math.precision((d-f)/(255-f)*100,4):0);r.call(c,e,f>d?Math.precision((f-d)/(255-d)*100,4):0);r.call(c,C,Math.precision(g/255*100,4));r.call(c,A,Math.precision((255-(a&&a.a||0))*100/255,4));break;case "a":d=a.val("a");y.call(c,p,a.val("hex")||"000000");
r.call(c,A,d!=null?0:100);r.call(c,u,d!=null?100:0)}},y=function(a,b){a.css({backgroundColor:b&&b.length==6&&"#"+b||"transparent"})},E=function(a,b){if(x&&(b.indexOf("AlphaBar.png")!=-1||b.indexOf("Bars.png")!=-1||b.indexOf("Maps.png")!=-1)){a.attr("pngSrc",b);a.css({backgroundImage:"none",filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+b+"', sizingMethod='scale')"})}else a.css({backgroundImage:"url('"+b+"')"})},o=function(a,b){a.css({top:b+"px"})},r=function(a,b){a.css({visibility:b>
0?"visible":"hidden"});if(b>0&&b<100)if(x){var c=a.attr("pngSrc");c!=null&&(c.indexOf("AlphaBar.png")!=-1||c.indexOf("Bars.png")!=-1||c.indexOf("Maps.png")!=-1)?a.css({filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+c+"', sizingMethod='scale') progid:DXImageTransform.Microsoft.Alpha(opacity="+b+")"}):a.css({opacity:Math.precision(b/100,4)})}else a.css({opacity:Math.precision(b/100,4)});else if(b==0||b==100)if(x){c=a.attr("pngSrc");c!=null&&(c.indexOf("AlphaBar.png")!=-1||c.indexOf("Bars.png")!=
-1||c.indexOf("Maps.png")!=-1)?a.css({filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+c+"', sizingMethod='scale')"}):a.css({opacity:""})}else a.css({opacity:""})},ba=function(){w.active.val("ahex",w.current.val("ahex"))},sa=function(){w.current.val("ahex",w.active.val("ahex"))},ca=function(a){j(this).parents("tbody:first").find('input:radio[value!="'+a.target.value+'"]').removeAttr("checked");aa.call(c,a.target.value)},da=function(){ba.call(c)},ea=function(){ba.call(c);h.window.expandable&&
T.call(c);j.isFunction(Q)&&Q.call(c,w.active,N)},fa=function(){sa.call(c);h.window.expandable&&T.call(c);j.isFunction(R)&&R.call(c,w.active,M)},ga=function(){U.call(c)},ta=function(a){var b=a.val("hex");J.css({backgroundColor:b&&"#"+b||"transparent"});r.call(c,J,Math.precision((a.val("a")||0)*100/255,4))},ua=function(a){var b=a.val("hex"),a=a.val("va");X.css({backgroundColor:b&&"#"+b||"transparent"});r.call(c,P,Math.precision((255-(a&&a.a||0))*100/255,4));h.window.bindToInput&&h.window.updateInputColor&&
h.window.input.css({backgroundColor:b&&"#"+b||"transparent",color:a==null||a.v>75?"#000000":"#ffffff"})},ja=function(a){H=parseInt(f.css("left"));F=parseInt(f.css("top"));I=a.pageX;V=a.pageY;j(document).bind("mousemove",ha).bind("mouseup",ia);a.preventDefault()},ha=function(a){f.css({left:H-(I-a.pageX)+"px",top:F-(V-a.pageY)+"px"});h.window.expandable&&!j.support.boxModel&&f.prev().css({left:f.css("left"),top:f.css("top")});a.stopPropagation();a.preventDefault();return false},ia=function(a){j(document).unbind("mousemove",
ha).unbind("mouseup",ia);a.stopPropagation();a.preventDefault();return false},ka=function(a){a.preventDefault();a.stopPropagation();w.active.val("ahex",j(this).attr("title")||null,a.target);return false},R=j.isFunction(d[1])&&d[1]||null,S=j.isFunction(d[2])&&d[2]||null,Q=j.isFunction(d[3])&&d[3]||null,U=function(){w.current.val("ahex",w.active.val("ahex"));var a=function(){if(h.window.expandable&&!j.support.boxModel){var a=f.find("table:first");f.before("<iframe/>");f.prev().css({width:a.width(),
height:f.height(),opacity:0,position:"absolute",left:f.css("left"),top:f.css("top")})}};if(h.window.expandable){j(document.body).children("div.jPicker.Container").css({zIndex:10});f.css({zIndex:20})}switch(h.window.effects.type){case "fade":f.fadeIn(h.window.effects.speed.show,a);break;case "slide":f.slideDown(h.window.effects.speed.show,a);break;default:f.show(h.window.effects.speed.show,a)}},T=function(){var a=function(){h.window.expandable&&f.css({zIndex:10});h.window.expandable&&!j.support.boxModel&&
f.prev().remove()};switch(h.window.effects.type){case "fade":f.fadeOut(h.window.effects.speed.hide,a);break;case "slide":f.slideUp(h.window.effects.speed.hide,a);break;default:f.hide(h.window.effects.speed.hide,a)}},va=function(){var a=h.window,d=a.expandable?j(c).next().find(".Container:first"):null;f=a.expandable?j("<div/>"):j(c);f.addClass("jPicker Container");a.expandable&&f.hide();f.get(0).onselectstart=function(a){if(a.target.nodeName.toLowerCase()!=="input")return false};var o=w.active.val("all");
if(a.alphaPrecision<0)a.alphaPrecision=0;else if(a.alphaPrecision>2)a.alphaPrecision=2;var x='<table class="jPicker" cellpadding="0" cellspacing="0"><tbody>'+(a.expandable?'<tr><td class="Move" colspan="5">&nbsp;</td></tr>':"")+'<tr><td rowspan="9"><h2 class="Title">'+(a.title||z.text.title)+'</h2><div class="Map"><span class="Map1">&nbsp;</span><span class="Map2">&nbsp;</span><span class="Map3">&nbsp;</span><img src="'+v.clientPath+v.colorMap.arrow.file+'" class="Arrow"/></div></td><td rowspan="9"><div class="Bar"><span class="Map1">&nbsp;</span><span class="Map2">&nbsp;</span><span class="Map3">&nbsp;</span><span class="Map4">&nbsp;</span><span class="Map5">&nbsp;</span><span class="Map6">&nbsp;</span><img src="'+
v.clientPath+v.colorBar.arrow.file+'" class="Arrow"/></div></td><td colspan="2" class="Preview">'+z.text.newColor+'<div><span class="Active" title="'+z.tooltips.colors.newColor+'">&nbsp;</span><span class="Current" title="'+z.tooltips.colors.currentColor+'">&nbsp;</span></div>'+z.text.currentColor+'</td><td rowspan="9" class="Button"><input type="button" class="Ok" value="'+z.text.ok+'" title="'+z.tooltips.buttons.ok+'"/><input type="button" class="Cancel" value="'+z.text.cancel+'" title="'+z.tooltips.buttons.cancel+
'"/><hr/><div class="Grid">&nbsp;</div></td></tr><tr class="Hue"><td class="Radio"><label title="'+z.tooltips.hue.radio+'"><input type="radio" value="h"'+(h.color.mode=="h"?' checked="checked"':"")+'/>H:</label></td><td class="Text"><input type="text" maxlength="3" value="'+(o!=null?o.h:"")+'" title="'+z.tooltips.hue.textbox+'"/>&nbsp;&deg;</td></tr><tr class="Saturation"><td class="Radio"><label title="'+z.tooltips.saturation.radio+'"><input type="radio" value="s"'+(h.color.mode=="s"?' checked="checked"':
"")+'/>S:</label></td><td class="Text"><input type="text" maxlength="3" value="'+(o!=null?o.s:"")+'" title="'+z.tooltips.saturation.textbox+'"/>&nbsp;%</td></tr><tr class="Value"><td class="Radio"><label title="'+z.tooltips.value.radio+'"><input type="radio" value="v"'+(h.color.mode=="v"?' checked="checked"':"")+'/>V:</label><br/><br/></td><td class="Text"><input type="text" maxlength="3" value="'+(o!=null?o.v:"")+'" title="'+z.tooltips.value.textbox+'"/>&nbsp;%<br/><br/></td></tr><tr class="Red"><td class="Radio"><label title="'+
z.tooltips.red.radio+'"><input type="radio" value="r"'+(h.color.mode=="r"?' checked="checked"':"")+'/>R:</label></td><td class="Text"><input type="text" maxlength="3" value="'+(o!=null?o.r:"")+'" title="'+z.tooltips.red.textbox+'"/></td></tr><tr class="Green"><td class="Radio"><label title="'+z.tooltips.green.radio+'"><input type="radio" value="g"'+(h.color.mode=="g"?' checked="checked"':"")+'/>G:</label></td><td class="Text"><input type="text" maxlength="3" value="'+(o!=null?o.g:"")+'" title="'+
z.tooltips.green.textbox+'"/></td></tr><tr class="Blue"><td class="Radio"><label title="'+z.tooltips.blue.radio+'"><input type="radio" value="b"'+(h.color.mode=="b"?' checked="checked"':"")+'/>B:</label></td><td class="Text"><input type="text" maxlength="3" value="'+(o!=null?o.b:"")+'" title="'+z.tooltips.blue.textbox+'"/></td></tr><tr class="Alpha"><td class="Radio">'+(a.alphaSupport?'<label title="'+z.tooltips.alpha.radio+'"><input type="radio" value="a"'+(h.color.mode=="a"?' checked="checked"':
"")+"/>A:</label>":"&nbsp;")+'</td><td class="Text">'+(a.alphaSupport?'<input type="text" maxlength="'+(3+a.alphaPrecision)+'" value="'+(o!=null?Math.precision(o.a*100/255,a.alphaPrecision):"")+'" title="'+z.tooltips.alpha.textbox+'"/>&nbsp;%':"&nbsp;")+'</td></tr><tr class="Hex"><td colspan="2" class="Text"><label title="'+z.tooltips.hex.textbox+'">#:<input type="text" maxlength="6" class="Hex" value="'+(o!=null?o.hex:"")+'"/></label>'+(a.alphaSupport?'<input type="text" maxlength="2" class="AHex" value="'+
(o!=null?o.ahex.substring(6):"")+'" title="'+z.tooltips.hex.alpha+'"/></td>':"&nbsp;")+"</tr></tbody></table>";if(a.expandable){f.html(x);j(document.body).children("div.jPicker.Container").length==0?j(document.body).prepend(f):j(document.body).children("div.jPicker.Container:last").after(f);f.mousedown(function(){j(document.body).children("div.jPicker.Container").css({zIndex:999});f.css({zIndex:999})});f.css({left:a.position.x=="left"?d.offset().left-530-(a.position.y=="center"?25:0)+"px":a.position.x==
"center"?d.offset().left-260+"px":a.position.x=="right"?d.offset().left-10+(a.position.y=="center"?25:0)+"px":a.position.x=="screenCenter"?(j(document).width()>>1)-260+"px":d.offset().left+parseInt(a.position.x)+"px",position:"absolute",top:a.position.y=="top"?d.offset().top-312+"px":a.position.y=="center"?d.offset().top-156+"px":a.position.y=="bottom"?d.offset().top+25+"px":d.offset().top+parseInt(a.position.y)+"px"})}else{f=j(c);f.html(x)}x=f.find("tbody:first");m=x.find("div.Map:first");p=x.find("div.Bar:first");
var y=m.find("span"),D=p.find("span");n=y.filter(".Map1:first");l=y.filter(".Map2:first");s=y.filter(".Map3:first");q=D.filter(".Map1:first");t=D.filter(".Map2:first");e=D.filter(".Map3:first");C=D.filter(".Map4:first");A=D.filter(".Map5:first");u=D.filter(".Map6:first");g=new W(m,{map:{width:v.colorMap.width,height:v.colorMap.height},arrow:{image:v.clientPath+v.colorMap.arrow.file,width:v.colorMap.arrow.width,height:v.colorMap.arrow.height}});g.bind(qa);k=new W(p,{map:{width:v.colorBar.width,height:v.colorBar.height},
arrow:{image:v.clientPath+v.colorBar.arrow.file,width:v.colorBar.arrow.width,height:v.colorBar.arrow.height}});k.bind(ra);B=new la(x,w.active,a.expandable&&a.bindToInput?a.input:null,a.alphaPrecision);var y=o!=null?o.hex:null,G=x.find(".Preview"),D=x.find(".Button");L=G.find(".Active:first").css({backgroundColor:y&&"#"+y||"transparent"});J=G.find(".Current:first").css({backgroundColor:y&&"#"+y||"transparent"}).bind("click",da);r.call(c,J,Math.precision(w.current.val("a")*100)/255,4);M=D.find(".Ok:first").bind("click",
fa);N=D.find(".Cancel:first").bind("click",ea);K=D.find(".Grid:first");setTimeout(function(){E.call(c,n,v.clientPath+"Maps.png");E.call(c,l,v.clientPath+"Maps.png");E.call(c,s,v.clientPath+"map-opacity.png");E.call(c,q,v.clientPath+"Bars.png");E.call(c,t,v.clientPath+"Bars.png");E.call(c,e,v.clientPath+"Bars.png");E.call(c,C,v.clientPath+"Bars.png");E.call(c,A,v.clientPath+"bar-opacity.png");E.call(c,u,v.clientPath+"AlphaBar.png");E.call(c,G.find("div:first"),v.clientPath+"preview-opacity.png")},
0);x.find("td.Radio input").bind("click",ca);if(w.quickList&&w.quickList.length>0){D="";for(i=0;i<w.quickList.length;i++){(typeof w.quickList[i]).toString().toLowerCase()=="string"&&(w.quickList[i]=new b({hex:w.quickList[i]}));var H=w.quickList[i].val("a"),F=w.quickList[i].val("ahex");!a.alphaSupport&&F&&(F=F.substring(0,6)+"ff");var I=w.quickList[i].val("hex"),D=D+('<span class="QuickColor"'+(F&&' title="#'+F+'"'||"")+' style="background-color:'+(I&&"#"+I||"")+";"+(I?"":"background-image:url("+v.clientPath+
"NoColor.png)")+(a.alphaSupport&&H&&H<255?";opacity:"+Math.precision(H/255,4)+";filter:Alpha(opacity="+Math.precision(H/2.55,4)+")":"")+'">&nbsp;</span>')}E.call(c,K,v.clientPath+"bar-opacity.png");K.html(D);K.find(".QuickColor").click(ka)}aa.call(c,h.color.mode);w.active.bind($);j.isFunction(S)&&w.active.bind(S);w.current.bind(ta);if(a.expandable){c.icon=d.parents(".Icon:first");X=c.icon.find(".Color:first").css({backgroundColor:y&&"#"+y||"transparent"});P=c.icon.find(".Alpha:first");E.call(c,P,
v.clientPath+"bar-opacity.png");r.call(c,P,Math.precision((255-(o!=null?o.a:0))*100/255,4));Y=c.icon.find(".Image:first").css({backgroundImage:"url('"+v.clientPath+v.picker.file+"')"}).bind("click",ga);a.bindToInput&&a.updateInputColor&&a.input.css({backgroundColor:y&&"#"+y||"transparent",color:o==null||o.v>75?"#000000":"#ffffff"});Z=x.find(".Move:first").bind("mousedown",ja);w.active.bind(ua)}else U.call(c)},v=h.images,z=h.localization,w={active:"string"==(typeof h.color.active).toString().toLowerCase()?
new b({ahex:!h.window.alphaSupport&&h.color.active?h.color.active.substring(0,6)+"ff":h.color.active}):new b({ahex:!h.window.alphaSupport&&h.color.active.val("ahex")?h.color.active.val("ahex").substring(0,6)+"ff":h.color.active.val("ahex")}),current:"string"==(typeof h.color.active).toString().toLowerCase()?new b({ahex:!h.window.alphaSupport&&h.color.active?h.color.active.substring(0,6)+"ff":h.color.active}):new b({ahex:!h.window.alphaSupport&&h.color.active.val("ahex")?h.color.active.val("ahex").substring(0,
6)+"ff":h.color.active.val("ahex")}),quickList:h.color.quickList};j.extend(!0,c,{commitCallback:R,liveCallback:S,cancelCallback:Q,color:w,show:U,hide:T,destroy:function(){f.find("td.Radio input").unbind("click",ca);J.unbind("click",da);N.unbind("click",ea);M.unbind("click",fa);if(h.window.expandable){Y.unbind("click",ga);Z.unbind("mousedown",ja);c.icon=null}f.find(".QuickColor").unbind("click",ka);u=A=C=e=t=q=s=l=n=p=m=null;g.destroy();g=null;k.destroy();k=null;B.destroy();S=Q=R=K=N=M=J=L=B=null;
f.html("");for(i=0;i<O.length;i++)O[i]==c&&O.splice(i,1)}});O.push(c);setTimeout(function(){va.call(c)},0)})};j.fn.jPicker.defaults={window:{title:null,effects:{type:"show",speed:{show:0,hide:0}},position:{x:"screenCenter",y:"top"},expandable:!1,liveUpdate:!0,alphaSupport:!1,alphaPrecision:0,updateInputColor:!0},color:{mode:"h",active:new b({ahex:"#ffcc00ff"}),quickList:[new b({h:360,s:33,v:100}),new b({h:360,s:66,v:100}),new b({h:360,s:100,v:100}),new b({h:360,s:100,v:75}),new b({h:360,s:100,v:50}),
new b({h:180,s:0,v:100}),new b({h:30,s:33,v:100}),new b({h:30,s:66,v:100}),new b({h:30,s:100,v:100}),new b({h:30,s:100,v:75}),new b({h:30,s:100,v:50}),new b({h:180,s:0,v:90}),new b({h:60,s:33,v:100}),new b({h:60,s:66,v:100}),new b({h:60,s:100,v:100}),new b({h:60,s:100,v:75}),new b({h:60,s:100,v:50}),new b({h:180,s:0,v:80}),new b({h:90,s:33,v:100}),new b({h:90,s:66,v:100}),new b({h:90,s:100,v:100}),new b({h:90,s:100,v:75}),new b({h:90,s:100,v:50}),new b({h:180,s:0,v:70}),new b({h:120,s:33,v:100}),
new b({h:120,s:66,v:100}),new b({h:120,s:100,v:100}),new b({h:120,s:100,v:75}),new b({h:120,s:100,v:50}),new b({h:180,s:0,v:60}),new b({h:150,s:33,v:100}),new b({h:150,s:66,v:100}),new b({h:150,s:100,v:100}),new b({h:150,s:100,v:75}),new b({h:150,s:100,v:50}),new b({h:180,s:0,v:50}),new b({h:180,s:33,v:100}),new b({h:180,s:66,v:100}),new b({h:180,s:100,v:100}),new b({h:180,s:100,v:75}),new b({h:180,s:100,v:50}),new b({h:180,s:0,v:40}),new b({h:210,s:33,v:100}),new b({h:210,s:66,v:100}),new b({h:210,
s:100,v:100}),new b({h:210,s:100,v:75}),new b({h:210,s:100,v:50}),new b({h:180,s:0,v:30}),new b({h:240,s:33,v:100}),new b({h:240,s:66,v:100}),new b({h:240,s:100,v:100}),new b({h:240,s:100,v:75}),new b({h:240,s:100,v:50}),new b({h:180,s:0,v:20}),new b({h:270,s:33,v:100}),new b({h:270,s:66,v:100}),new b({h:270,s:100,v:100}),new b({h:270,s:100,v:75}),new b({h:270,s:100,v:50}),new b({h:180,s:0,v:10}),new b({h:300,s:33,v:100}),new b({h:300,s:66,v:100}),new b({h:300,s:100,v:100}),new b({h:300,s:100,v:75}),
new b({h:300,s:100,v:50}),new b({h:180,s:0,v:0}),new b({h:330,s:33,v:100}),new b({h:330,s:66,v:100}),new b({h:330,s:100,v:100}),new b({h:330,s:100,v:75}),new b({h:330,s:100,v:50}),new b]},images:{clientPath:"./common/js/plugins/ui.colorpicker/images/",colorMap:{width:256,height:256,arrow:{file:"mappoint.gif",width:15,height:15}},colorBar:{width:20,height:256,arrow:{file:"rangearrows.gif",width:20,height:7}},picker:{file:"picker.gif",width:25,height:24}},localization:{text:{title:"Drag Markers To Pick A Color",
newColor:"new",currentColor:"current",ok:"OK",cancel:"Cancel"},tooltips:{colors:{newColor:"New Color - Press &ldquo;OK&rdquo; To Commit",currentColor:"Click To Revert To Original Color"},buttons:{ok:"Commit To This Color Selection",cancel:"Cancel And Revert To Original Color"},hue:{radio:"Set To &ldquo;Hue&rdquo; Color Mode",textbox:"Enter A &ldquo;Hue&rdquo; Value (0-360&deg;)"},saturation:{radio:"Set To &ldquo;Saturation&rdquo; Color Mode",textbox:"Enter A &ldquo;Saturation&rdquo; Value (0-100%)"},
value:{radio:"Set To &ldquo;Value&rdquo; Color Mode",textbox:"Enter A &ldquo;Value&rdquo; Value (0-100%)"},red:{radio:"Set To &ldquo;Red&rdquo; Color Mode",textbox:"Enter A &ldquo;Red&rdquo; Value (0-255)"},green:{radio:"Set To &ldquo;Green&rdquo; Color Mode",textbox:"Enter A &ldquo;Green&rdquo; Value (0-255)"},blue:{radio:"Set To &ldquo;Blue&rdquo; Color Mode",textbox:"Enter A &ldquo;Blue&rdquo; Value (0-255)"},alpha:{radio:"Set To &ldquo;Alpha&rdquo; Color Mode",textbox:"Enter A &ldquo;Alpha&rdquo; Value (0-100)"},
hex:{textbox:"Enter A &ldquo;Hex&rdquo; Color Value (#000000-#ffffff)",alpha:"Enter A &ldquo;Alpha&rdquo; Value (#00-#ff)"}}}}})(jQuery,"1.1.6");

View file

@ -0,0 +1,5 @@
[option]
use_closure_compiler=true
[skip]
xe_colorpicker.js

View file

@ -1,2 +1,3 @@
css/xe_colorpicker.css
css/jPicker-1.1.6.min.css
jpicker-1.1.6.min.js
xe_colorpicker.js

View file

@ -3,363 +3,9 @@
* @author NHN (developers@xpressengine.com)
**/
jQuery(function($){
var ready = false;
var tmp = $('<span>').hide();
// var panel = null;
$.fn.xe_colorpicker = function(settings){
var selection = this;
if (!ready) {
ColorPicker.init(settings);
ready = true;
}
this.each(function(){
var col = color($(this).val());
$(this).val( col ).css('background-color', col );
setTextColor( $(this) );
}).focus(function(event){
var t = this;
$(this).select();
// show color picker
ColorPicker.show(this);
}).keypress(function(event){
if (!ColorPicker.is(':visible')) return;
if (/^#?[0-9a-f]{6}$/i.test( event.target.value )) {
ColorPicker.color( event.target.value );
}
});
$(document).mousedown(function(event){
var target = event.target;
if (selection.index(target) > -1) return;
if ($(target).parents().add(target).index(ColorPicker.element) > -1) return;
if ($(target).parents().add(target).index(ColorPicker.buttons) > -1) return;
ColorPicker.hide();
});
return this;
};
var ColorPicker = {
element : null,
picker : null,
colpane: null,
buttons : null,
_target : null,
_backup : null,
_hsv : null,
_mode : 'none',
init : function() {
var cp = this;
this.element = $('<div class="xe_colorpicker"><div class="colorpicker"><div class="colortable"><div class="background"><div class="indicator"></div></div></div><div class="huebar"><div class="background"><div class="indicator"></div></div></div></div><div class="buttons"><button type="button" class="ok">OK</button><button type="button" class="cancel">Cancel</button><button type="button" class="none">None</button></div></div>');
this.picker = this.element.find('> div.colorpicker');
this.colpane = this.picker.find('div.colortable > div.background');
this.colpoint = this.colpane.find('> .indicator');
this.buttons = this.element.find('> div.buttons');
this.huepane = this.element.find('div.huebar > .background');
this.huepoint = this.huepane.find('> .indicator');
this._mousedown = method(this.onmousedown, this);
this._mousemove = method(this.onmousemove, this);
this._mouseup = method(this.onmouseup, this);
this.picker.find('.background').mousedown(this._mousedown);
this.buttons.find('button.ok').click(method(this.ok,this));
this.buttons.find('button.cancel').click(method(this.cancel,this));
this.buttons.find('button.none').click(method(this.none,this));
// only for IE6
if ($.browser.msie && parseInt($.browser.version) < 7) {
this.element.append( $('<iframe>').css({position:'absolute','z-index':-1,left:0,top:0,width:9999,height:9999}) );
}
},
show : function(input) {
var pos = (input=$(input)).offset(), pos_panel;
//var par = input.get(0).offsetParent;
var par = $("body").get(0);
var btn = this.buttons.hide();
var col = color(input.val());
this._target = input;
this._backup = col;
this.color(col);
this._target.val(col);
pos_panel = this.element.hide().css({'z-index':99999,left:0,top:0}).appendTo( par ).show(300,function(){btn.slideDown(150)}).offset();
this.element.css({left:pos.left-pos_panel.left,top:pos.top-pos_panel.top+input.get(0).offsetHeight});
},
hide : function() {
var e = this.element;
this._target = null;
this.buttons.slideUp(100, function(){e.hide(200)});
},
visible : function() {
return this.element.is(':visible');
},
color : function(sColor) {
if (typeof sColor == 'string') {
var col = color(sColor);
var hsv = _hsv(rgb2hsv(hex2rgb(col)));
this.hsv(hsv.h, hsv.s, hsv.v);
} else if (this._target) {
return color(this._target.val());
}
},
hsv : function(h, s, v) {
var col = rgb2hex(hsv2rgb(h, s, v));
this._hsv = _hsv(h, s, v);
// background color and text color
this._target.val(col).css('background-color', col);
setTextColor(this._target);
// hue bar indicator
if (this._hue_h) this.huepoint.css('top', limit(0, Math.round((360-this._hsv.h)/360*this._hue_h), this._hue_h-1) - 3 );
// color - background
this.colpane.css('background-color', rgb2hex(hsv2rgb(h, 100, 100)) );
// color - indicator
if (this._col_h && this._col_w) {
this.colpoint.css({
top : limit(0, Math.round((100-this._hsv.v)/100*this._col_h), this._col_h-1) - 5,
left : limit(0, Math.round(this._hsv.s/100*this._col_w), this._col_w-1 ) - 5
});
}
},
onmousedown : function(event) {
var cur = $(event.target);
var par = cur.parent();
var pos = cur.offset();
var hue, sat, val; // hue, saturation, value
this._height = cur.height();
this._width = cur.width();
this._top = pos.top;
this._left = pos.left;
this._col_w = this.colpane.width();
this._col_h = this.colpane.width();
this._hue_h = this.huepane.height();
if (par.is('.colortable')) {
this._mode = 'color';
hue = this._hsv.h;
sat = ( limit(0, (event.pageX - this._left), this._width ) / this._width * 100);
val = ( limit(0, (this._height - event.pageY + this._top), this._height ) / this._height * 100);
} else if (par.is('.huebar')) {
this._mode = 'hue';
hue = limit(0, (this._height - event.pageY + this._top), this._height) / this._height * 360;
sat = this._hsv.s;
val = this._hsv.v;
}
this.hsv( hue, sat, val );
$(document).bind('mousemove', this._mousemove).bind('mouseup', this._mouseup);
},
onmousemove : function(event) {
var hue, sat, val; // hue, saturation, value
switch(this._mode) {
case 'color':
hue = this._hsv.h;
sat = ( limit(0, (event.pageX - this._left), this._width ) / this._width * 100);
val = ( limit(0, (this._height - event.pageY + this._top), this._height ) / this._height * 100);
break;
case 'hue':
hue = limit(0, (this._height - event.pageY + this._top), this._height) / this._height * 360;
sat = this._hsv.s;
val = this._hsv.v;
break;
}
this.hsv( hue, sat, val );
},
onmouseup : function(event) {
this._mode = 'none';
$(document).unbind('mousemove', this._mousemove).unbind('mouseup', this._mouseup);
},
ok : function() {
this.hide();
},
cancel : function() {
this.color(this._backup);
this.hide();
},
none : function() {
this._target.attr('value','transparent').css('background','').css('color','#000000');
this.hide();
}
};
function setTextColor(input) {
var hex = input.css('color', '').val(), hsv, rgb;
if (hex == 'transparent' || hex == '') return;
rgb = hex2rgb(hex);
hsv = rgb2hsv(255-rgb.r, 255-rgb.g, 255-rgb.b); // 보색을 구한 뒤
hex = rgb2hex(hsv2rgb(0, 0, hsv.v>50?100:0)); // 보색에 해당하는 흑백으로 결정
input.css('color', hex);
}
function method(func, thisObj) {
return function() { return func.apply(thisObj, arguments) }
}
function color(str) {
var col = $.trim(str);
var regHex1 = /^#[0-9a-f]{6}$/i;
var regHex2 = /^#?([0-9a-f])([0-9a-f])([0-9a-f])$/i; // short hex
if (regHex1.test(col)) return col.toUpperCase();
if (regHex2.test(col)) return col.replace(regHex2, '#$1$1$2$2$3$3').toUpperCase();
try {
col = tmp.appendTo($('<body>')).css('background-color', col).css('background-color');
} catch(e) {
col = 'transparent';
} finally {
tmp.css('background-color','').remove();
}
if (/^rgb\(([0-9, ]+)\)$/i.test(col)) col = rgb2hex(RegExp.$1.split(/,\s*/));
if (!/#[0-9a-f]{6}/i.test(col)) col = 'transparent';
return col;
}
function _rgb(rgb, _g, _b) {
var r, g, b;
if (typeof arguments[2] == "number") {
r = rgb;
g = _g;
b = _b;
} else if (typeof rgb == "object") {
if (rgb.constructor == Array) {
r = rgb[0] || 0; g = rgb[1] || 0; b = rgb[2] || 0;
} else {
r = rgb.r || 0; g = rgb.g || 0; b = rgb.b || 0;
}
}
rgb = [];
rgb.r = rgb[0] = r = parseInt(r, 10);
rgb.g = rgb[1] = g = parseInt(g, 10);
rgb.b = rgb[2] = b = parseInt(b, 10);
return rgb;
}
function _hsv(hsv, _s, _v) {
var h, s, v;
if (typeof arguments[2] == "number") {
h = hsv; s = _s; v = _v;
} else if (typeof hsv == "object") {
if (hsv.constructor == Array) {
h = hsv[0] || 0; s = hsv[1] || 0; v = hsv[2] || 0;
} else {
h = hsv.h || 0; s = hsv.s || 0; v = hsv.v || 0;
}
}
hsv = [];
hsv.h = hsv[0] = h = parseInt(h, 10);
hsv.s = hsv[1] = s = parseInt(s, 10);
hsv.v = hsv[2] = v = parseInt(v, 10);
return hsv;
}
function rgb2hex(rgb, _g, _b) {
var rgb = _rgb(rgb, _g, _b);
for(var i=0; i < rgb.length; i++) {
(rgb[i] = Number(rgb[i]).toString(16)).length<2?rgb[i]='0'+rgb[i]:0;
}
return '#'+rgb.join('').toUpperCase();
}
function hex2rgb(hex) {
var r=0, g=0, b=0;
if (/^#?([0-9a-f]{1,2})([0-9a-f]{1,2})([0-9a-f]{1,2})$/i.test(hex)) {
r = parseInt(RegExp.$1, 16);
g = parseInt(RegExp.$2, 16);
b = parseInt(RegExp.$3, 16);
}
return _rgb(r, g, b);
}
function hsv2rgb(hsv, _s, _v) {
var r=0, g=0, b=0;
var h=0, s=0, v=0;
var i, f, p, q, t;
hsv = _hsv(hsv, _s, _v);
h = (hsv[0] % 360) / 60; s = hsv[1] / 100; v = hsv[2] / 100;
i = Math.floor(h);
f = h-i;
p = v*(1-s);
q = v*(1-s*f);
t = v*(1-s*(1-f));
switch (i) {
case 0: r=v; g=t; b=p; break;
case 1: r=q; g=v; b=p; break;
case 2: r=p; g=v; b=t; break;
case 3: r=p; g=q; b=v; break;
case 4: r=t; g=p; b=v; break;
case 5: r=v; g=p; b=q; break;
case 6: break;
}
return _rgb(Math.floor(r*255), Math.floor(g*255), Math.floor(b*255));
}
function rgb2hsv(rgb, _g, _b) {
var rgb = _rgb(rgb, _g, _b);
var r = rgb[0], g = rgb[1], b = rgb[2];
var h = 0, s = 0, v = Math.max(r,g,b), min = Math.min(r,g,b), delta = v - min;
if (s = v?delta/v:0) {
if (r == v) h = 60 * (g - b) / delta;
else if (g == v) h = 120 + 60 * (b - r) / delta;
else if (b == v) h = 240 + 60 * (r - g) / delta;
if (h < 0) h += 360;
}
return _hsv(Math.floor(h), Math.floor(s*100), Math.floor(v/255*100));
}
function limit(min, val, max){
return Math.min(Math.max(min, val), max);
return this.jPicker(settings);
}
$('input.color-indicator').xe_colorpicker();

60
common/js/x.min.js vendored
View file

@ -3,36 +3,36 @@
* Distributed by GNU LGPL. For copyrights, license, documentation and more visit Cross-Browser.com
* Copyright 2001-2005 Michael Foster (Cross-Browser.com)
**/
function xDeprecate(a){typeof console=="object"&&typeof console.log=="function"&&console.log("DEPRECATED : "+a+"() is deprecated function.")}var xOp7Up,xOp6Dn,xIE4Up,xIE4,xIE5,xIE6,xNN4,xUA=navigator.userAgent.toLowerCase();
if(window.opera){var i=xUA.indexOf("opera");if(i!=-1){var v=parseInt(xUA.charAt(i+6));xOp7Up=v>=7;xOp6Dn=v<7}}else navigator.vendor!="KDE"&&document.all&&xUA.indexOf("msie")!=-1?(xIE4Up=parseFloat(navigator.appVersion)>=4,xIE4=xUA.indexOf("msie 4")!=-1,xIE5=xUA.indexOf("msie 5")!=-1,xIE6=xUA.indexOf("msie 6")!=-1):document.layers&&(xNN4=true);var xMac=xUA.indexOf("mac")!=-1,xFF=xUA.indexOf("firefox")!=-1;
function xAddEventListener(a,b,d,e){xDeprecate("xAddEventListener");if(a=xGetElementById(a)){b=b.toLowerCase();if(!xIE4Up&&!xOp7Up&&a==window){if(b=="resize"){window.xPCW=xClientWidth();window.xPCH=xClientHeight();window.xREL=d;xResizeEvent();return}if(b=="scroll"){window.xPSL=xScrollLeft();window.xPST=xScrollTop();window.xSEL=d;xScrollEvent();return}}var f="e.on"+b+"=eL";a.addEventListener?a.addEventListener(b,d,e):a.attachEvent?a.attachEvent("on"+b,d):eval(f)}}
function xDeprecate(a){"object"==typeof console&&"function"==typeof console.log&&console.log("DEPRECATED : "+a+"() is deprecated function.")}var xOp7Up,xOp6Dn,xIE4Up,xIE4,xIE5,xIE6,xNN4,xUA=navigator.userAgent.toLowerCase();
if(window.opera){var i=xUA.indexOf("opera");if(-1!=i){var v=parseInt(xUA.charAt(i+6));xOp7Up=7<=v;xOp6Dn=7>v}}else"KDE"!=navigator.vendor&&document.all&&-1!=xUA.indexOf("msie")?(xIE4Up=4<=parseFloat(navigator.appVersion),xIE4=-1!=xUA.indexOf("msie 4"),xIE5=-1!=xUA.indexOf("msie 5"),xIE6=-1!=xUA.indexOf("msie 6")):document.layers&&(xNN4=!0);var xMac=-1!=xUA.indexOf("mac"),xFF=-1!=xUA.indexOf("firefox");
function xAddEventListener(a,b,d,e){xDeprecate("xAddEventListener");if(a=xGetElementById(a)){b=b.toLowerCase();if(!xIE4Up&&!xOp7Up&&a==window){if("resize"==b){window.xPCW=xClientWidth();window.xPCH=xClientHeight();window.xREL=d;xResizeEvent();return}if("scroll"==b){window.xPSL=xScrollLeft();window.xPST=xScrollTop();window.xSEL=d;xScrollEvent();return}}var f="e.on"+b+"=eL";a.addEventListener?a.addEventListener(b,d,e):a.attachEvent?a.attachEvent("on"+b,d):eval(f)}}
function xResizeEvent(){xDeprecate("xResizeEvent");window.xREL&&setTimeout("xResizeEvent()",250);var a=xClientWidth(),b=xClientHeight();if(window.xPCW!=a||window.xPCH!=b)window.xPCW=a,window.xPCH=b,window.xREL&&window.xREL()}function xScrollEvent(){xDeprecate("xScrollEvent");window.xSEL&&setTimeout("xScrollEvent()",250);var a=xScrollLeft(),b=xScrollTop();if(window.xPSL!=a||window.xPST!=b)window.xPSL=a,window.xPST=b,window.xSEL&&window.xSEL()}
function xAppendChild(a,b){xDeprecate("xAppendChild");return a.appendChild?a.appendChild(b):null}
function xClientHeight(){xDeprecate("xClientHeight");var a=0;if(xOp6Dn)a=window.innerHeight;else if(document.compatMode=="CSS1Compat"&&!window.opera&&document.documentElement&&document.documentElement.clientHeight)a=document.documentElement.clientHeight;else if(document.body&&document.body.clientHeight)a=document.body.clientHeight;else if(xDef(window.innerWidth,window.innerHeight,document.width))a=window.innerHeight,document.width>window.innerWidth&&(a-=16);return a}
function xClientWidth(){xDeprecate("xClientWidth");var a=0;if(xOp6Dn)a=window.innerWidth;else if(document.compatMode=="CSS1Compat"&&!window.opera&&document.documentElement&&document.documentElement.clientWidth)a=document.documentElement.clientWidth;else if(document.body&&document.body.clientWidth)a=document.body.clientWidth;else if(xDef(window.innerWidth,window.innerHeight,document.height))a=window.innerWidth,document.height>window.innerHeight&&(a-=16);return a}
function xCreateElement(a){xDeprecate("xCreateElement");return document.createElement?document.createElement(a):null}function xDef(){xDeprecate("xDef");for(var a=0;a<arguments.length;++a)if(typeof arguments[a]=="undefined")return false;return true}function xDeleteCookie(a,b){xDeprecate("xDeleteCookie");if(xGetCookie(a))document.cookie=a+"=; path="+(!b?"/":b)+"; expires="+(new Date(0)).toGMTString()}
function xDisplay(a,b){xDeprecate("xDisplay");if(!(a=xGetElementById(a)))return null;if(a.style&&xDef(a.style.display)){if(xStr(b))a.style.display=b;return a.style.display}return null}
function xEvent(a){xDeprecate("xEvent");if(a=a||window.event){if(a.type)this.type=a.type;if(a.target)this.target=a.target;else if(a.srcElement)this.target=a.srcElement;if(a.relatedTarget)this.relatedTarget=a.relatedTarget;else if(a.type=="mouseover"&&a.fromElement)this.relatedTarget=a.fromElement;else if(a.type=="mouseout")this.relatedTarget=a.toElement;if(xOp6Dn)this.pageX=a.clientX,this.pageY=a.clientY;else if(xDef(a.pageX,a.pageY))this.pageX=a.pageX,this.pageY=a.pageY;else if(xDef(a.clientX,a.clientY))this.pageX=
a.clientX+xScrollLeft(),this.pageY=a.clientY+xScrollTop();xDef(a.offsetX,a.offsetY)?(this.offsetX=a.offsetX,this.offsetY=a.offsetY):xDef(a.layerX,a.layerY)?(this.offsetX=a.layerX,this.offsetY=a.layerY):(this.offsetX=this.pageX-xPageX(this.target),this.offsetY=this.pageY-xPageY(this.target));if(a.keyCode)this.keyCode=a.keyCode;else if(xDef(a.which)&&a.type.indexOf("key")!=-1)this.keyCode=a.which;this.shiftKey=a.shiftKey;this.ctrlKey=a.ctrlKey;this.altKey=a.altKey}}
function xFirstChild(a,b){xDeprecate("xFirstChild");var d=a?a.firstChild:null;if(b)for(;d&&d.nodeName!=b;)d=d.nextSibling;else for(;d&&d.nodeType!=1;)d=d.nextSibling;return d}function xGetBodyWidth(){xDeprecate("xGetBodyWidth");var a=xClientWidth(),b=window.document.body.scrollWidth;return a>b?a:b}function xGetBodyHeight(){xDeprecate("xGetBodyHeight");var a=xClientHeight(),b=window.document.body.scrollHeight;return a>b?a:b}
function xClientHeight(){xDeprecate("xClientHeight");var a=0;xOp6Dn?a=window.innerHeight:"CSS1Compat"==document.compatMode&&!window.opera&&document.documentElement&&document.documentElement.clientHeight?a=document.documentElement.clientHeight:document.body&&document.body.clientHeight?a=document.body.clientHeight:xDef(window.innerWidth,window.innerHeight,document.width)&&(a=window.innerHeight,document.width>window.innerWidth&&(a-=16));return a}
function xClientWidth(){xDeprecate("xClientWidth");var a=0;xOp6Dn?a=window.innerWidth:"CSS1Compat"==document.compatMode&&!window.opera&&document.documentElement&&document.documentElement.clientWidth?a=document.documentElement.clientWidth:document.body&&document.body.clientWidth?a=document.body.clientWidth:xDef(window.innerWidth,window.innerHeight,document.height)&&(a=window.innerWidth,document.height>window.innerHeight&&(a-=16));return a}
function xCreateElement(a){xDeprecate("xCreateElement");return document.createElement?document.createElement(a):null}function xDef(){xDeprecate("xDef");for(var a=0;a<arguments.length;++a)if("undefined"==typeof arguments[a])return!1;return!0}function xDeleteCookie(a,b){xDeprecate("xDeleteCookie");xGetCookie(a)&&(document.cookie=a+"=; path="+(!b?"/":b)+"; expires="+(new Date(0)).toGMTString())}
function xDisplay(a,b){xDeprecate("xDisplay");return!(a=xGetElementById(a))?null:a.style&&xDef(a.style.display)?(xStr(b)&&(a.style.display=b),a.style.display):null}
function xEvent(a){xDeprecate("xEvent");if(a=a||window.event)a.type&&(this.type=a.type),a.target?this.target=a.target:a.srcElement&&(this.target=a.srcElement),a.relatedTarget?this.relatedTarget=a.relatedTarget:"mouseover"==a.type&&a.fromElement?this.relatedTarget=a.fromElement:"mouseout"==a.type&&(this.relatedTarget=a.toElement),xOp6Dn?(this.pageX=a.clientX,this.pageY=a.clientY):xDef(a.pageX,a.pageY)?(this.pageX=a.pageX,this.pageY=a.pageY):xDef(a.clientX,a.clientY)&&(this.pageX=a.clientX+xScrollLeft(),
this.pageY=a.clientY+xScrollTop()),xDef(a.offsetX,a.offsetY)?(this.offsetX=a.offsetX,this.offsetY=a.offsetY):xDef(a.layerX,a.layerY)?(this.offsetX=a.layerX,this.offsetY=a.layerY):(this.offsetX=this.pageX-xPageX(this.target),this.offsetY=this.pageY-xPageY(this.target)),a.keyCode?this.keyCode=a.keyCode:xDef(a.which)&&-1!=a.type.indexOf("key")&&(this.keyCode=a.which),this.shiftKey=a.shiftKey,this.ctrlKey=a.ctrlKey,this.altKey=a.altKey}
function xFirstChild(a,b){xDeprecate("xFirstChild");var d=a?a.firstChild:null;if(b)for(;d&&d.nodeName!=b;)d=d.nextSibling;else for(;d&&1!=d.nodeType;)d=d.nextSibling;return d}function xGetBodyWidth(){xDeprecate("xGetBodyWidth");var a=xClientWidth(),b=window.document.body.scrollWidth;return a>b?a:b}function xGetBodyHeight(){xDeprecate("xGetBodyHeight");var a=xClientHeight(),b=window.document.body.scrollHeight;return a>b?a:b}
function xGetComputedStyle(a,b,d){xDeprecate("xGetComputedStyle");var e="undefined",f=document.defaultView;if(f&&f.getComputedStyle)(a=f.getComputedStyle(a,""))&&(e=a.getPropertyValue(b));else if(a.currentStyle){e=b.split("-");b=e[0];for(f=1;f<e.length;++f)c=e[f].charAt(0),b+=e[f].replace(c,c.toUpperCase());e=a.currentStyle[b]}else return null;return d?parseInt(e)||0:e}
function xGetCookie(a){xDeprecate("xGetCookie");var b=null,d=a+"=";if(document.cookie.length>0&&(a=document.cookie.indexOf(d),a!=-1)){a+=d.length;b=document.cookie.indexOf(";",a);if(b==-1)b=document.cookie.length;b=unescape(document.cookie.substring(a,b))}return b}function xGetElementById(a){xDeprecate("xGetElementById");return typeof a!="string"?a:a=document.getElementById?document.getElementById(a):document.all?document.all[a]:null}
function xGetElementsByAttribute(a,b,d,e){xDeprecate("xGetElementsByAttribute");var f,h=[],d=RegExp(d,"i");f=xGetElementsByTagName(a);for(var g=0;g<f.length;++g)(a=f[g].getAttribute(b))||(a=f[g][b]),typeof a=="string"&&a.search(d)!=-1&&(h[h.length]=f[g],e&&e(f[g]));return h}
function xGetElementsByClassName(a,b,d,e){xDeprecate("xGetElementsByClassName");for(var f=[],a=RegExp("\\b"+a+"\\b","i"),b=xGetElementsByTagName(d,b),d=0;d<b.length;++d)b[d].className&&b[d].className.search(a)!=-1&&(f[f.length]=b[d],e&&e(b[d]));return f}function xGetElementsByTagName(a,b){xDeprecate("xGetElementsByTagName");var d=null,a=a||"*",b=b||document;xIE4||xIE5?d=a=="*"?b.all:b.all.tags(a):b.getElementsByTagName&&(d=b.getElementsByTagName(a));return d||[]}
function xGetURLArguments(){xDeprecate("xGetURLArguments");var a=location.href.indexOf("?"),b=[];if(a!=-1)for(var a=location.href.substring(a+1,location.href.length).split("&"),d=0;d<a.length;d++)nameVal=a[d].split("="),b[d]=nameVal[1],b[nameVal[0]]=nameVal[1];return b}
function xHeight(a,b){xDeprecate("xHeight");if(!(a=xGetElementById(a)))return 0;var b=xNum(b)?b<0?0:Math.round(b):-1,d=xDef(a.style);if(a==document||a.tagName.toLowerCase()=="html"||a.tagName.toLowerCase()=="body")b=xClientHeight();else if(d&&xDef(a.offsetHeight)&&xStr(a.style.height)){if(b>=0){var e=d=0,f=0,h=0;if(document.compatMode=="CSS1Compat"){var g=xGetComputedStyle,d=g(a,"padding-top",1);if(d!==null)e=g(a,"padding-bottom",1),f=g(a,"border-top-width",1),h=g(a,"border-bottom-width",1);else if(xDef(a.offsetHeight,
a.style.height))a.style.height=b+"px",d=a.offsetHeight-b}b-=d+e+f+h;if(isNaN(b)||b<0)return null;else a.style.height=b+"px"}b=a.offsetHeight}else if(d&&xDef(a.style.pixelHeight)){if(b>=0)a.style.pixelHeight=b;b=a.style.pixelHeight}return b}function xHex(a,b,d){xDeprecate("xHex");var e="",a=Math.ceil(a);d&&(e=d);a=a.toString(16);for(d=0;d<b-a.length;++d)e+="0";return e+a}function xHide(a){xDeprecate("xHide");return xVisibility(a,0)}
function xInnerHtml(a,b){xDeprecate("xInnerHtml");if(!(a=xGetElementById(a))||!xStr(a.innerHTML))return null;var d=a.innerHTML;if(xStr(b))a.innerHTML=b;return d}function xLeft(a,b){xDeprecate("xLeft");if(!(a=xGetElementById(a)))return 0;var d=xDef(a.style);if(d&&xStr(a.style.left))xNum(b)?a.style.left=b+"px":(b=parseInt(a.style.left),isNaN(b)&&(b=0));else if(d&&xDef(a.style.pixelLeft))xNum(b)?a.style.pixelLeft=b:b=a.style.pixelLeft;return b}
function xMoveTo(a,b,d){xDeprecate("xMoveTo");xLeft(a,b);xTop(a,d)}function xName(a){xDeprecate("xName");return a?a.id&&a.id!=""?a.id:a.name&&a.name!=""?a.name:a.nodeName&&a.nodeName!=""?a.nodeName:a.tagName&&a.tagName!=""?a.tagName:a:a}function xNextSib(a,b){xDeprecate("xNextSib");var d=a?a.nextSibling:null;if(b)for(;d&&d.nodeName!=b;)d=d.nextSibling;else for(;d&&d.nodeType!=1;)d=d.nextSibling;return d}
function xNum(){xDeprecate("xNum");for(var a=0;a<arguments.length;++a)if(isNaN(arguments[a])||typeof arguments[a]!="number")return false;return true}function xOffsetLeft(a){xDeprecate("xOffsetLeft");return!(a=xGetElementById(a))?0:xDef(a.offsetLeft)?a.offsetLeft:0}function xOffsetTop(a){xDeprecate("xOffsetTop");return!(a=xGetElementById(a))?0:xDef(a.offsetTop)?a.offsetTop:0}
function xPad(a,b,d,e){xDeprecate("xPad");typeof a!="string"&&(a+="");if(e)for(e=a.length;e<b;++e)a=d+a;else for(e=a.length;e<b;++e)a+=d;return a}function xPageX(a){xDeprecate("xPageX");if(!(a=xGetElementById(a)))return 0;for(var b=0;a;)xDef(a.offsetLeft)&&(b+=a.offsetLeft),a=xDef(a.offsetParent)?a.offsetParent:null;return b}
function xPageY(a){xDeprecate("xPageY");if(!(a=xGetElementById(a)))return 0;for(var b=0;a;)xDef(a.offsetTop)&&(b+=a.offsetTop),a=xDef(a.offsetParent)?a.offsetParent:null;return b}function xParent(a,b){xDeprecate("xParent");if(!(a=xGetElementById(a)))return null;var d=null;if(!b&&xDef(a.offsetParent))d=a.offsetParent;else if(xDef(a.parentNode))d=a.parentNode;else if(xDef(a.parentElement))d=a.parentElement;return d}
function xPreventDefault(a){xDeprecate("xPreventDefault");if(a&&a.preventDefault)a.preventDefault();else if(window.event)window.event.returnValue=false}function xPrevSib(a,b){xDeprecate("xPrevSib");var d=a?a.previousSibling:null;if(b)for(;d&&d.nodeName!=b;)d=d.previousSibling;else for(;d&&d.nodeType!=1;)d=d.previousSibling;return d}
function xRemoveEventListener(a,b,d,e){xDeprecate("xRemoveEventListener");if(a=xGetElementById(a)){b=b.toLowerCase();if(!xIE4Up&&!xOp7Up&&a==window){if(b=="resize"){window.xREL=null;return}if(b=="scroll"){window.xSEL=null;return}}var f="e.on"+b+"=null";a.removeEventListener?a.removeEventListener(b,d,e):a.detachEvent?a.detachEvent("on"+b,d):eval(f)}}function xResizeTo(a,b,d){xDeprecate("xResizeTo");xWidth(a,b);xHeight(a,d)}
function xScrollLeft(a,b){xDeprecate("xScrollLeft");var d=0;if(!xDef(a)||b||a==document||a.tagName.toLowerCase()=="html"||a.tagName.toLowerCase()=="body"){var e=window;b&&a&&(e=a);if(e.document.documentElement&&e.document.documentElement.scrollLeft)d=e.document.documentElement.scrollLeft;else if(e.document.body&&xDef(e.document.body.scrollLeft))d=e.document.body.scrollLeft}else if((a=xGetElementById(a))&&xNum(a.scrollLeft))d=a.scrollLeft;return d}
function xScrollTop(a,b){xDeprecate("xScrollTop");var d=0;if(!xDef(a)||b||a==document||a.tagName.toLowerCase()=="html"||a.tagName.toLowerCase()=="body"){var e=window;b&&a&&(e=a);if(e.document.documentElement&&e.document.documentElement.scrollTop)d=e.document.documentElement.scrollTop;else if(e.document.body&&xDef(e.document.body.scrollTop))d=e.document.body.scrollTop}else if((a=xGetElementById(a))&&xNum(a.scrollTop))d=a.scrollTop;return d}
function xSetCookie(a,b,d,e){xDeprecate("xSetCookie");document.cookie=a+"="+escape(b)+(!d?"":"; expires="+d.toGMTString())+"; path="+(!e?"/":e)}function xShow(a){xDeprecate("xShow");return xVisibility(a,1)}function xStr(a){xDeprecate("xStr");for(var b=0;b<arguments.length;++b)if(typeof arguments[b]!="string")return false;return true}
function xTop(a,b){xDeprecate("xTop");if(!(a=xGetElementById(a)))return 0;var d=xDef(a.style);if(d&&xStr(a.style.top))xNum(b)?a.style.top=b+"px":(b=parseInt(a.style.top),isNaN(b)&&(b=0));else if(d&&xDef(a.style.pixelTop))xNum(b)?a.style.pixelTop=b:b=a.style.pixelTop;return b}function xVisibility(a,b){xDeprecate("xVisibility");if(!(a=xGetElementById(a)))return null;if(a.style&&xDef(a.style.visibility)){if(xDef(b))a.style.visibility=b?"visible":"hidden";return a.style.visibility}return null}
function xWidth(a,b){xDeprecate("xWidth");if(!(a=xGetElementById(a)))return 0;var b=xNum(b)?b<0?0:Math.round(b):-1,d=xDef(a.style);if(a==document||a.tagName.toLowerCase()=="html"||a.tagName.toLowerCase()=="body")b=xClientWidth();else if(d&&xDef(a.offsetWidth)&&xStr(a.style.width)){if(b>=0){var e=d=0,f=0,h=0;if(document.compatMode=="CSS1Compat"){var g=xGetComputedStyle,d=g(a,"padding-left",1);if(d!==null)e=g(a,"padding-right",1),f=g(a,"border-left-width",1),h=g(a,"border-right-width",1);else if(xDef(a.offsetWidth,
a.style.width))a.style.width=b+"px",d=a.offsetWidth-b}b-=d+e+f+h;if(isNaN(b)||b<0)return null;else a.style.width=b+"px"}b=a.offsetWidth}else if(d&&xDef(a.style.pixelWidth)){if(b>=0)a.style.pixelWidth=b;b=a.style.pixelWidth}return b}function xZIndex(a,b){xDeprecate("xZIndex");if(!(a=xGetElementById(a)))return 0;if(a.style&&xDef(a.style.zIndex)){if(xNum(b))a.style.zIndex=b;b=parseInt(a.style.zIndex)}return b}
function xStopPropagation(a){xDeprecate("xStopPropagation");if(a&&a.stopPropagation)a.stopPropagation();else if(window.event)window.event.cancelBubble=true};
function xGetCookie(a){xDeprecate("xGetCookie");var b=null,d=a+"=";0<document.cookie.length&&(a=document.cookie.indexOf(d),-1!=a&&(a+=d.length,b=document.cookie.indexOf(";",a),-1==b&&(b=document.cookie.length),b=unescape(document.cookie.substring(a,b))));return b}function xGetElementById(a){xDeprecate("xGetElementById");return"string"!=typeof a?a:a=document.getElementById?document.getElementById(a):document.all?document.all[a]:null}
function xGetElementsByAttribute(a,b,d,e){xDeprecate("xGetElementsByAttribute");var f,h=[],d=RegExp(d,"i");f=xGetElementsByTagName(a);for(var g=0;g<f.length;++g)(a=f[g].getAttribute(b))||(a=f[g][b]),"string"==typeof a&&-1!=a.search(d)&&(h[h.length]=f[g],e&&e(f[g]));return h}
function xGetElementsByClassName(a,b,d,e){xDeprecate("xGetElementsByClassName");for(var f=[],a=RegExp("\\b"+a+"\\b","i"),b=xGetElementsByTagName(d,b),d=0;d<b.length;++d)b[d].className&&-1!=b[d].className.search(a)&&(f[f.length]=b[d],e&&e(b[d]));return f}function xGetElementsByTagName(a,b){xDeprecate("xGetElementsByTagName");var d=null,a=a||"*",b=b||document;xIE4||xIE5?d="*"==a?b.all:b.all.tags(a):b.getElementsByTagName&&(d=b.getElementsByTagName(a));return d||[]}
function xGetURLArguments(){xDeprecate("xGetURLArguments");var a=location.href.indexOf("?"),b=[];if(-1!=a)for(var a=location.href.substring(a+1,location.href.length).split("&"),d=0;d<a.length;d++)nameVal=a[d].split("="),b[d]=nameVal[1],b[nameVal[0]]=nameVal[1];return b}
function xHeight(a,b){xDeprecate("xHeight");if(!(a=xGetElementById(a)))return 0;var b=xNum(b)?0>b?0:Math.round(b):-1,d=xDef(a.style);if(a==document||"html"==a.tagName.toLowerCase()||"body"==a.tagName.toLowerCase())b=xClientHeight();else if(d&&xDef(a.offsetHeight)&&xStr(a.style.height)){if(0<=b){var e=d=0,f=0,h=0;if("CSS1Compat"==document.compatMode){var g=xGetComputedStyle,d=g(a,"padding-top",1);null!==d?(e=g(a,"padding-bottom",1),f=g(a,"border-top-width",1),h=g(a,"border-bottom-width",1)):xDef(a.offsetHeight,
a.style.height)&&(a.style.height=b+"px",d=a.offsetHeight-b)}b-=d+e+f+h;if(isNaN(b)||0>b)return null;a.style.height=b+"px"}b=a.offsetHeight}else d&&xDef(a.style.pixelHeight)&&(0<=b&&(a.style.pixelHeight=b),b=a.style.pixelHeight);return b}function xHex(a,b,d){xDeprecate("xHex");var e="",a=Math.ceil(a);d&&(e=d);a=a.toString(16);for(d=0;d<b-a.length;++d)e+="0";return e+a}function xHide(a){xDeprecate("xHide");return xVisibility(a,0)}
function xInnerHtml(a,b){xDeprecate("xInnerHtml");if(!(a=xGetElementById(a))||!xStr(a.innerHTML))return null;var d=a.innerHTML;xStr(b)&&(a.innerHTML=b);return d}function xLeft(a,b){xDeprecate("xLeft");if(!(a=xGetElementById(a)))return 0;var d=xDef(a.style);d&&xStr(a.style.left)?xNum(b)?a.style.left=b+"px":(b=parseInt(a.style.left),isNaN(b)&&(b=0)):d&&xDef(a.style.pixelLeft)&&(xNum(b)?a.style.pixelLeft=b:b=a.style.pixelLeft);return b}
function xMoveTo(a,b,d){xDeprecate("xMoveTo");xLeft(a,b);xTop(a,d)}function xName(a){xDeprecate("xName");return a?a.id&&""!=a.id?a.id:a.name&&""!=a.name?a.name:a.nodeName&&""!=a.nodeName?a.nodeName:a.tagName&&""!=a.tagName?a.tagName:a:a}function xNextSib(a,b){xDeprecate("xNextSib");var d=a?a.nextSibling:null;if(b)for(;d&&d.nodeName!=b;)d=d.nextSibling;else for(;d&&1!=d.nodeType;)d=d.nextSibling;return d}
function xNum(){xDeprecate("xNum");for(var a=0;a<arguments.length;++a)if(isNaN(arguments[a])||"number"!=typeof arguments[a])return!1;return!0}function xOffsetLeft(a){xDeprecate("xOffsetLeft");return!(a=xGetElementById(a))?0:xDef(a.offsetLeft)?a.offsetLeft:0}function xOffsetTop(a){xDeprecate("xOffsetTop");return!(a=xGetElementById(a))?0:xDef(a.offsetTop)?a.offsetTop:0}
function xPad(a,b,d,e){xDeprecate("xPad");"string"!=typeof a&&(a+="");if(e)for(e=a.length;e<b;++e)a=d+a;else for(e=a.length;e<b;++e)a+=d;return a}function xPageX(a){xDeprecate("xPageX");if(!(a=xGetElementById(a)))return 0;for(var b=0;a;)xDef(a.offsetLeft)&&(b+=a.offsetLeft),a=xDef(a.offsetParent)?a.offsetParent:null;return b}
function xPageY(a){xDeprecate("xPageY");if(!(a=xGetElementById(a)))return 0;for(var b=0;a;)xDef(a.offsetTop)&&(b+=a.offsetTop),a=xDef(a.offsetParent)?a.offsetParent:null;return b}function xParent(a,b){xDeprecate("xParent");if(!(a=xGetElementById(a)))return null;var d=null;!b&&xDef(a.offsetParent)?d=a.offsetParent:xDef(a.parentNode)?d=a.parentNode:xDef(a.parentElement)&&(d=a.parentElement);return d}
function xPreventDefault(a){xDeprecate("xPreventDefault");a&&a.preventDefault?a.preventDefault():window.event&&(window.event.returnValue=!1)}function xPrevSib(a,b){xDeprecate("xPrevSib");var d=a?a.previousSibling:null;if(b)for(;d&&d.nodeName!=b;)d=d.previousSibling;else for(;d&&1!=d.nodeType;)d=d.previousSibling;return d}
function xRemoveEventListener(a,b,d,e){xDeprecate("xRemoveEventListener");if(a=xGetElementById(a)){b=b.toLowerCase();if(!xIE4Up&&!xOp7Up&&a==window){if("resize"==b){window.xREL=null;return}if("scroll"==b){window.xSEL=null;return}}var f="e.on"+b+"=null";a.removeEventListener?a.removeEventListener(b,d,e):a.detachEvent?a.detachEvent("on"+b,d):eval(f)}}function xResizeTo(a,b,d){xDeprecate("xResizeTo");xWidth(a,b);xHeight(a,d)}
function xScrollLeft(a,b){xDeprecate("xScrollLeft");var d=0;if(!xDef(a)||b||a==document||"html"==a.tagName.toLowerCase()||"body"==a.tagName.toLowerCase()){var e=window;b&&a&&(e=a);e.document.documentElement&&e.document.documentElement.scrollLeft?d=e.document.documentElement.scrollLeft:e.document.body&&xDef(e.document.body.scrollLeft)&&(d=e.document.body.scrollLeft)}else if((a=xGetElementById(a))&&xNum(a.scrollLeft))d=a.scrollLeft;return d}
function xScrollTop(a,b){xDeprecate("xScrollTop");var d=0;if(!xDef(a)||b||a==document||"html"==a.tagName.toLowerCase()||"body"==a.tagName.toLowerCase()){var e=window;b&&a&&(e=a);e.document.documentElement&&e.document.documentElement.scrollTop?d=e.document.documentElement.scrollTop:e.document.body&&xDef(e.document.body.scrollTop)&&(d=e.document.body.scrollTop)}else if((a=xGetElementById(a))&&xNum(a.scrollTop))d=a.scrollTop;return d}
function xSetCookie(a,b,d,e){xDeprecate("xSetCookie");document.cookie=a+"="+escape(b)+(!d?"":"; expires="+d.toGMTString())+"; path="+(!e?"/":e)}function xShow(a){xDeprecate("xShow");return xVisibility(a,1)}function xStr(a){xDeprecate("xStr");for(var b=0;b<arguments.length;++b)if("string"!=typeof arguments[b])return!1;return!0}
function xTop(a,b){xDeprecate("xTop");if(!(a=xGetElementById(a)))return 0;var d=xDef(a.style);d&&xStr(a.style.top)?xNum(b)?a.style.top=b+"px":(b=parseInt(a.style.top),isNaN(b)&&(b=0)):d&&xDef(a.style.pixelTop)&&(xNum(b)?a.style.pixelTop=b:b=a.style.pixelTop);return b}function xVisibility(a,b){xDeprecate("xVisibility");return!(a=xGetElementById(a))?null:a.style&&xDef(a.style.visibility)?(xDef(b)&&(a.style.visibility=b?"visible":"hidden"),a.style.visibility):null}
function xWidth(a,b){xDeprecate("xWidth");if(!(a=xGetElementById(a)))return 0;var b=xNum(b)?0>b?0:Math.round(b):-1,d=xDef(a.style);if(a==document||"html"==a.tagName.toLowerCase()||"body"==a.tagName.toLowerCase())b=xClientWidth();else if(d&&xDef(a.offsetWidth)&&xStr(a.style.width)){if(0<=b){var e=d=0,f=0,h=0;if("CSS1Compat"==document.compatMode){var g=xGetComputedStyle,d=g(a,"padding-left",1);null!==d?(e=g(a,"padding-right",1),f=g(a,"border-left-width",1),h=g(a,"border-right-width",1)):xDef(a.offsetWidth,
a.style.width)&&(a.style.width=b+"px",d=a.offsetWidth-b)}b-=d+e+f+h;if(isNaN(b)||0>b)return null;a.style.width=b+"px"}b=a.offsetWidth}else d&&xDef(a.style.pixelWidth)&&(0<=b&&(a.style.pixelWidth=b),b=a.style.pixelWidth);return b}function xZIndex(a,b){xDeprecate("xZIndex");if(!(a=xGetElementById(a)))return 0;a.style&&xDef(a.style.zIndex)&&(xNum(b)&&(a.style.zIndex=b),b=parseInt(a.style.zIndex));return b}
function xStopPropagation(a){xDeprecate("xStopPropagation");a&&a.stopPropagation?a.stopPropagation():window.event&&(window.event.cancelBubble=!0)};

View file

@ -1764,11 +1764,15 @@ var Validator = xe.createApp('Validator', {
this.onsubmit = null;
}
})
.submit(function(){
.submit(function(e){
var legacyFn = this['xe:onsubmit'];
var hasLegacyFn = $.isFunction(legacyFn);
var bResult = hasLegacyFn?legacyFn.apply(this):self.run(this);
if(!bResult)
{
e.stopImmediatePropagation();
}
return bResult;
});
},
@ -1826,9 +1830,14 @@ var Validator = xe.createApp('Validator', {
f = filter[name];
el = elems[name];
if(!el)
{
el = elems[name + '[]'];
}
val = el?$.trim(get_value($(el))):'';
mod = (f.modifier||'')+',';
if(!el || el.disabled) continue;
if(f['if']) {

76
common/js/xe.min.js vendored
View file

@ -3,16 +3,16 @@
* @author NHN (developers@xpressengine.com)
* @brief XE Common JavaScript
**/
(function(a){function b(){return function(){var g=this;if(a.isArray(this._plugins))this._plugins=[];this._messages?this._messages={}:this._binded_fn={};a.each(this,function(c,b){if(!a.isFunction(b))return!0;if(!/^API_([A-Z0-9_]+)$/.test(c))return!0;var d=RegExp.$1,e=function(a,b){return g[c](a,b)};g._messages?g._messages[d]=[e]:g._binded_fn[d]=e});a.isFunction(this.init)&&this.init.apply(this,arguments)}}var d,c,e=[];d={_plugins:[],_messages:{},getPlugin:function(g){g=g.toLowerCase();return a.isArray(this._plugins[g])?
(function(a){function b(){return function(){var g=this;a.isArray(this._plugins)&&(this._plugins=[]);this._messages?this._messages={}:this._binded_fn={};a.each(this,function(c,b){if(!a.isFunction(b)||!/^API_([A-Z0-9_]+)$/.test(c))return true;var d=RegExp.$1,e=function(a,b){return g[c](a,b)};g._messages?g._messages[d]=[e]:g._binded_fn[d]=e});a.isFunction(this.init)&&this.init.apply(this,arguments)}}var d,c,e=[];d={_plugins:[],_messages:{},getPlugin:function(g){g=g.toLowerCase();return a.isArray(this._plugins[g])?
this._plugins[g]:[]},registerPlugin:function(g){var c=this,b=g.getName().toLowerCase();if(0<=a.inArray(g,this._plugins))return!1;this._plugins.push(g);a.isArray(this._plugins[b])||(this._plugins[b]=[]);this._plugins[b].push(g);a.each(g._binded_fn,function(a,g){c.registerHandler(a,g)});g.oApp=this;a.isFunction(g.activate)&&g.activate();return!0},registerHandler:function(g,c){var b=this._messages,g=g.toUpperCase();a.isArray(b[g])||(b[g]=[]);b[g].push(c)},cast:function(a,b){return this._cast(this,a,
b||[])},broadcast:function(a,b,c){this.parent&&this.parent._broadcast&&this.parent._broadcast(a,b,c)},_cast:function(g,b,c){var d,e=this._messages,b=b.toUpperCase();if(!e["BEFORE_"+b]&&!this["API_BEFORE_"+b]||this._cast(g,"BEFORE_"+b,c)){var h=[];if(a.isArray(e[b]))for(d=0;d<e[b].length;d++)h.push(e[b][d](g,c));2>h.length&&(h=h[0]);(e["AFTER_"+b]||this["API_AFTER_"+b])&&this._cast(g,"AFTER_"+b,c);return/^(?:AFTER|BEFORE)_/.test(b)?a.isArray(h)?0>a.inArray(!1,h):"undefined"==typeof h?!0:!!h:h}}};c=
{oApp:null,cast:function(a,b){if(this.oApp&&this.oApp._cast)return this.oApp._cast(this,a,b||[])},broadcast:function(a,b){this.oApp&&this.oApp.broadcast&&this.oApp.broadcast(this,mag,b||[])}};window.xe=a.extend(d,{getName:function(){return"Core"},createApp:function(g,c){var e=b();a.extend(e.prototype,d,c);e.prototype.getName=function(){return g};return e},createPlugin:function(g,d){var e=b();a.extend(e.prototype,c,d);e.prototype.getName=function(){return g};return e},getApps:function(){return a.makeArray(e)},
b||[])},broadcast:function(a,b,c){this.parent&&this.parent._broadcast&&this.parent._broadcast(a,b,c)},_cast:function(g,b,c){var d,e=this._messages,b=b.toUpperCase();if(!e["BEFORE_"+b]&&!this["API_BEFORE_"+b]||this._cast(g,"BEFORE_"+b,c)){var h=[];if(a.isArray(e[b]))for(d=0;d<e[b].length;d++)h.push(e[b][d](g,c));2>h.length&&(h=h[0]);(e["AFTER_"+b]||this["API_AFTER_"+b])&&this._cast(g,"AFTER_"+b,c);return!/^(?:AFTER|BEFORE)_/.test(b)?h:a.isArray(h)?0>a.inArray(!1,h):"undefined"==typeof h?!0:!!h}}};
c={oApp:null,cast:function(a,b){if(this.oApp&&this.oApp._cast)return this.oApp._cast(this,a,b||[])},broadcast:function(a,b){this.oApp&&this.oApp.broadcast&&this.oApp.broadcast(this,mag,b||[])}};window.xe=a.extend(d,{getName:function(){return"Core"},createApp:function(g,c){var e=b();a.extend(e.prototype,d,c);e.prototype.getName=function(){return g};return e},createPlugin:function(g,d){var e=b();a.extend(e.prototype,c,d);e.prototype.getName=function(){return g};return e},getApps:function(){return a.makeArray(e)},
getApp:function(a){a=(a||"").toLowerCase();return"undefined"!=typeof e[a]?e[a]:null},registerApp:function(b){var c=b.getName().toLowerCase();e.push(b);a.isArray(e[c])||(e[c]=[]);e[c].push(b);b.parent=this;a.isFunction(b.activate)&&b.activate()},unregisterApp:function(b){var c=b.getName().toLowerCase(),d=a.inArray(b,e);0<=d&&(e=e.splice(d,1));a.isArray(e[c])&&(d=a.inArray(b,e[c]),0<=d&&(e[c]=e[c].splice(d,1)));a.isFunction(b.deactivate)&&b.deactivate()},broadcast:function(a,b){this._broadcast(this,
a,b)},_broadcast:function(a,b,c){for(var d=0;d<e.length;d++)e[d]._cast(a,b,c);this._cast(a,b,c)}});window.xe.lang={};a(function(){xe.broadcast("ONREADY")});a(window).load(function(){xe.broadcast("ONLOAD")})})(jQuery);jQuery&&jQuery.noConflict();
(function(a){var b=navigator.userAgent.toLowerCase();a.os={Linux:/linux/.test(b),Unix:/x11/.test(b),Mac:/mac/.test(b),Windows:/win/.test(b)};a.os.name=a.os.Windows?"Windows":a.os.Linux?"Linux":a.os.Unix?"Unix":a.os.Mac?"Mac":"";window.XE={loaded_popup_menus:[],addedDocument:[],checkboxToggleAll:function(b){is_def(b)||(b="cart");var c={wrap:null,checked:"toggle",doClick:!1};switch(arguments.length){case 1:"string"==typeof arguments[0]?b=arguments[0]:(a.extend(c,arguments[0]||{}),b="cart");break;case 2:b=
arguments[0],a.extend(c,arguments[1]||{})}if(!0==c.doClick)c.checked=null;if("string"==typeof c.wrap)c.wrap="#"+c.wrap;var e=c.wrap?a(c.wrap).find("input[name="+b+"]:checkbox"):a("input[name="+b+"]:checkbox");"toggle"==c.checked?e.each(function(){a(this).attr("checked",a(this).attr("checked")?!1:!0)}):!0==c.doClick?e.click():e.attr("checked",c.checked)},displayPopupMenu:function(b,c,e){var c=e.menu_id,g=b.menus,b="";if(this.loaded_popup_menus[c])b=this.loaded_popup_menus[c];else{if(g){g=g.item;if("undefined"==
typeof g.length||1>g.length)g=Array(g);if(g.length)for(var j=0;j<g.length;j++){var k=g[j].url,l=g[j].str,m=g[j].icon,h=g[j].target,w="",o="";m&&(w=" style=\"background-image:url('"+m+"')\" ");switch(h){case "popup":o=" onclick=\"popopen(this.href,'"+h+"'); return false;\"";break;case "javascript":o=' onclick="'+k+'; return false; "';k="#";break;default:o=' onclick="window.open(this.href); return false;"'}b+="<li "+w+'><a href="'+k+'"'+o+">"+l+"</a></li> "}}this.loaded_popup_menus[c]=b}if(b)c=a("#popup_menu_area").html("<ul>"+
b+"</ul>"),b=e.page_y,e=e.page_x,c.outerHeight()+b>a(window).height()+a(window).scrollTop()&&(b=a(window).height()-c.outerHeight()+a(window).scrollTop()),c.outerWidth()+e>a(window).width()+a(window).scrollLeft()&&(e=a(window).width()-c.outerWidth()+a(window).scrollLeft()),c.css({top:b,left:e}).show()}}})(jQuery);
arguments[0],a.extend(c,arguments[1]||{})}!0==c.doClick&&(c.checked=null);"string"==typeof c.wrap&&(c.wrap="#"+c.wrap);var e=c.wrap?a(c.wrap).find("input[name="+b+"]:checkbox"):a("input[name="+b+"]:checkbox");"toggle"==c.checked?e.each(function(){a(this).attr("checked",a(this).attr("checked")?false:true)}):!0==c.doClick?e.click():e.attr("checked",c.checked)},displayPopupMenu:function(b,c,e){var c=e.menu_id,g=b.menus,b="";if(this.loaded_popup_menus[c])b=this.loaded_popup_menus[c];else{if(g){g=g.item;
if("undefined"==typeof g.length||1>g.length)g=Array(g);if(g.length)for(var j=0;j<g.length;j++){var k=g[j].url,m=g[j].str,l=g[j].icon,h=g[j].target,r="",s="";l&&(r=" style=\"background-image:url('"+l+"')\" ");switch(h){case "popup":s=" onclick=\"popopen(this.href,'"+h+"'); return false;\"";break;case "javascript":s=' onclick="'+k+'; return false; "';k="#";break;default:s=' onclick="window.open(this.href); return false;"'}b+="<li "+r+'><a href="'+k+'"'+s+">"+m+"</a></li> "}}this.loaded_popup_menus[c]=
b}b&&(c=a("#popup_menu_area").html("<ul>"+b+"</ul>"),b=e.page_y,e=e.page_x,c.outerHeight()+b>a(window).height()+a(window).scrollTop()&&(b=a(window).height()-c.outerHeight()+a(window).scrollTop()),c.outerWidth()+e>a(window).width()+a(window).scrollLeft()&&(e=a(window).width()-c.outerWidth()+a(window).scrollLeft()),c.css({top:b,left:e}).show())}}})(jQuery);
jQuery(function(a){a.browser.msie&&a("select").each(function(a,b){for(var g=!1,d=[],k=0;k<b.options.length;k++)b.options[k].disabled?(b.options[k].style.color="#CCCCCC",g=!0):d[a]=-1<d[a]?d[a]:k;if(g&&(b.oldonchange=b.onchange,b.onchange=function(){this.options[this.selectedIndex].disabled?this.selectedIndex=d[a]:this.oldonchange&&this.oldonchange()},0<=b.selectedIndex&&b.options[b.selectedIndex].disabled))b.onchange()});var b=a(".xe_content .fold_button");if(b.size()){var d=a("div.fold_container",
b);a("button.more",b).click(function(){a(this).hide().next("button").show().parent().next(d).show()});a("button.less",b).click(function(){a(this).hide().prev("button").show().parent().next(d).hide()})}});String.prototype.getQuery=function(a){var b=this.indexOf("?");if(-1==b)return null;var d={};this.substr(b+1,this.length).replace(/([^=]+)=([^&]*)(&|$)/g,function(a,b,g){d[b]=g});a=d[a];"undefined"==typeof a&&(a="");return a};
String.prototype.setQuery=function(a,b){var d=this.indexOf("?"),c=this.replace(/#$/,"");if(-1!=d){var e=c.substr(d+1,this.length),g={},j=[],c=this.substr(0,d);e.replace(/([^=]+)=([^&]*)(&|$)/g,function(a,b,c){g[b]=c});g[a]=b;jQuery.each(g,function(a,b){jQuery.trim(b)&&j.push(a+"="+decodeURI(b))});e=j.join("&");c+=e?"?"+e:""}else b.toString().trim()&&(c=c+"?"+a+"="+b);d=/https:\/\/([^:\/]+)(:\d+|)/i;if(e=d.exec(c))e="http://"+e[1],"undefined"!=typeof http_port&&80!=http_port&&(e+=":"+http_port),c=
@ -21,7 +21,7 @@ String.prototype.trim=function(){return this.replace(/(^\s*)|(\s*$)/g,"")};funct
function winopen(a,b,d){"undefined"!=typeof xeVid&&-1<a.indexOf(request_uri)&&!a.getQuery("vid")&&(a=a.setQuery("vid",xeVid));try{"_blank"!=b&&winopen_list[b]&&(winopen_list[b].close(),winopen_list[b]=null)}catch(c){}"undefined"==typeof b&&(b="_blank");"undefined"==typeof d&&(d="");a=window.open(a,b,d);a.focus();"_blank"!=b&&(winopen_list[b]=a)}
function popopen(a,b){"undefined"==typeof b&&(b="_blank");"undefined"!=typeof xeVid&&-1<a.indexOf(request_uri)&&!a.getQuery("vid")&&(a=a.setQuery("vid",xeVid));winopen(a,b,"width=650,height=500,scrollbars=yes,resizable=yes,toolbars=no")}function sendMailTo(a){location.href="mailto:"+a}function move_url(a,b){if(!a)return!1;"undefined"==typeof b&&(b="N");b="N"==b?!1:!0;/^\./.test(a)&&(a=request_uri+a);b?winopen(a):location.href=a;return!1}
function displayMultimedia(a,b,d,c){(a=_displayMultimedia(a,b,d,c))&&document.writeln(a)}
function _displayMultimedia(a,b,d,c){0==a.indexOf("files")&&(a=request_uri+a);var c=jQuery.extend({wmode:"transparent",allowScriptAccess:"sameDomain",quality:"high",flashvars:"",autostart:!1},c||{}),e=c.autostart&&"false"!=c.autostart?"true":"false";delete c.autostart;var g="",g=g="";if(/\.(gif|jpg|jpeg|bmp|png)$/i.test(a))g='<img src="'+a+'" width="'+b+'" height="'+d+'" />';else if(/\.flv$/i.test(a)||/\.mov$/i.test(a)||/\.moov$/i.test(a)||/\.m4v$/i.test(a))g='<embed src="'+request_uri+'common/img/flvplayer.swf" allowfullscreen="true" autostart="'+
function _displayMultimedia(a,b,d,c){0==a.indexOf("files")&&(a=request_uri+a);var c=jQuery.extend({wmode:"transparent",allowScriptAccess:"sameDomain",quality:"high",flashvars:"",autostart:!1},c||{}),e=c.autostart&&"false"!=c.autostart?"true":"false";delete c.autostart;var g="";if(/\.(gif|jpg|jpeg|bmp|png)$/i.test(a))g='<img src="'+a+'" width="'+b+'" height="'+d+'" />';else if(/\.flv$/i.test(a)||/\.mov$/i.test(a)||/\.moov$/i.test(a)||/\.m4v$/i.test(a))g='<embed src="'+request_uri+'common/img/flvplayer.swf" allowfullscreen="true" autostart="'+
e+'" width="'+b+'" height="'+d+'" flashvars="&file='+a+"&width="+b+"&height="+d+"&autostart="+e+'" wmode="'+c.wmode+'" />';else if(/\.swf/i.test(a)){var g='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="'+("undefined"!=typeof enforce_ssl&&enforce_ssl?"https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0":"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0")+'" width="'+b+'" height="'+d+'" flashvars="'+c.flashvars+
'">',g=g+('<param name="movie" value="'+a+'" />'),j;for(j in c)"undefined"!=c[j]&&""!=c[j]&&(g+='<param name="'+j+'" value="'+c[j]+'" />');g+='<embed src="'+a+'" autostart="'+e+'" width="'+b+'" height="'+d+'" flashvars="'+c.flashvars+'" wmode="'+c.wmode+'"></embed></object>'}else{if(jQuery.browser.mozilla||jQuery.browser.opera)e=c.autostart&&"false"!=c.autostart?"1":"0";g='<embed src="'+a+'" autostart="'+e+'" width="'+b+'" height="'+d+'"';"transparent"==c.wmode&&(g+=' windowlessvideo="1"');g+="></embed>"}return g}
function zbxe_folder_open(a){jQuery("#folder_open_"+a).hide();jQuery("#folder_close_"+a).show();jQuery("#folder_"+a).show()}function zbxe_folder_close(a){jQuery("#folder_open_"+a).show();jQuery("#folder_close_"+a).hide();jQuery("#folder_"+a).hide()}
@ -29,46 +29,46 @@ function setFixedPopupSize(){var a=jQuery,b=a(window),a=a("body>.popup"),d,c,e,g
function doCallModuleAction(a,b,d){exec_xml(a,b,{target_srl:d,cur_mid:current_mid,mid:current_mid},completeCallModuleAction)}function completeCallModuleAction(a){"success"!=a.message&&alert(a.message);location.reload()}function completeMessage(a){alert(a.message);location.reload()}function doChangeLangType(a){"string"==typeof a?setLangType(a):setLangType(a.options[a.selectedIndex].value);location.href=location.href.setQuery("l","")}
function setLangType(a){var b=new Date;b.setTime(b.getTime()+6048E8);setCookie("lang_type",a,b,"/")}
function doDocumentPreview(a){for(;"FORM"!=a.nodeName;)a=a.parentNode;if("FORM"==a.nodeName){a=a.getAttribute("editor_sequence");a=editorGetContent(a);window.open("","previewDocument","toolbars=no,width=700px;height=800px,scrollbars=yes,resizable=yes");var b=jQuery("#previewDocument");b.length?b=b[0]:(jQuery('<form id="previewDocument" target="previewDocument" method="post" action="'+request_uri+'"><input type="hidden" name="module" value="document" /><input type="hidden" name="act" value="dispDocumentPreview" /><input type="hidden" name="content" /></form>').appendTo(document.body),b=
jQuery("#previewDocument")[0]);if(b)b.content.value=a,b.submit()}}
function doDocumentSave(a){var b=a.form.getAttribute("editor_sequence"),d=editorRelKeys[b].content.value;if("undefined"!=typeof b&&b&&"undefined"!=typeof editorRelKeys&&"function"==typeof editorGetContent){var c=editorGetContent(b);editorRelKeys[b].content.value=c}var e={},c=jQuery(a.form).serializeArray();jQuery.each(c,function(a,b){var c=jQuery.trim(b.value);if(!c)return!0;if(/\[\]$/.test(b.name))b.name=b.name.replace(/\[\]$/,"");e[b.name]=e[b.name]?e[b.name]+("|@|"+c):b.value});exec_xml("document",
jQuery("#previewDocument")[0]);b&&(b.content.value=a,b.submit())}}
function doDocumentSave(a){var b=a.form.getAttribute("editor_sequence"),d=editorRelKeys[b].content.value;if("undefined"!=typeof b&&b&&"undefined"!=typeof editorRelKeys&&"function"==typeof editorGetContent){var c=editorGetContent(b);editorRelKeys[b].content.value=c}var e={},c=jQuery(a.form).serializeArray();jQuery.each(c,function(a,b){var c=jQuery.trim(b.value);if(!c)return!0;/\[\]$/.test(b.name)&&(b.name=b.name.replace(/\[\]$/,""));e[b.name]=e[b.name]?e[b.name]+("|@|"+c):b.value});exec_xml("document",
"procDocumentTempSave",e,completeDocumentSave,["error","message","document_srl"],e,a.form);editorRelKeys[b].content.value=d;return!1}function completeDocumentSave(a){jQuery("input[name=document_srl]").eq(0).val(a.document_srl);alert(a.message)}var objForSavedDoc=null;function doDocumentLoad(a){objForSavedDoc=a.form;popopen(request_uri.setQuery("module","document").setQuery("act","dispTempSavedList"))}
function doDocumentSelect(a){if(opener&&opener.objForSavedDoc)opener.location.href=opener.current_url.setQuery("document_srl",a).setQuery("act","dispBoardWrite");window.close()}function viewSkinInfo(a,b){popopen("./?module=module&act=dispModuleSkinInfo&selected_module="+a+"&skin="+b,"SkinInfo")}var addedDocument=[];function doAddDocumentCart(a){addedDocument[addedDocument.length]=a.value;setTimeout(function(){callAddDocumentCart(addedDocument.length)},100)}
function callAddDocumentCart(a){if(!(1>addedDocument.length||a!=addedDocument.length))a=[],a.srls=addedDocument.join(","),exec_xml("document","procDocumentAddCart",a,null),addedDocument=[]}
function doDocumentSelect(a){opener&&opener.objForSavedDoc&&(opener.location.href=opener.current_url.setQuery("document_srl",a).setQuery("act","dispBoardWrite"));window.close()}function viewSkinInfo(a,b){popopen("./?module=module&act=dispModuleSkinInfo&selected_module="+a+"&skin="+b,"SkinInfo")}var addedDocument=[];function doAddDocumentCart(a){addedDocument[addedDocument.length]=a.value;setTimeout(function(){callAddDocumentCart(addedDocument.length)},100)}
function callAddDocumentCart(a){1>addedDocument.length||a!=addedDocument.length||(a=[],a.srls=addedDocument.join(","),exec_xml("document","procDocumentAddCart",a,null),addedDocument=[])}
function transRGB2Hex(a){if(!a)return a;if(-1<a.indexOf("#"))return a.replace(/^#/,"");if(0>a.toLowerCase().indexOf("rgb"))return a;a=a.replace(/^rgb\(/i,"").replace(/\)$/,"");value_list=a.split(",");for(var a="",b=0;b<value_list.length;b++){var d=parseInt(value_list[b],10).toString(16);1==d.length&&(d="0"+d);a+=d}return a}function toggleSecuritySignIn(){var a=location.href;location.href=/https:\/\//i.test(a)?a.replace(/^https/i,"http"):a.replace(/^http/i,"https")}
function reloadDocument(){location.reload()}
var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(a){for(var b="",d,c,e,g,j,k,l=0,a=Base64._utf8_encode(a);l<a.length;)d=a.charCodeAt(l++),c=a.charCodeAt(l++),e=a.charCodeAt(l++),g=d>>2,d=(d&3)<<4|c>>4,j=(c&15)<<2|e>>6,k=e&63,isNaN(c)?j=k=64:isNaN(e)&&(k=64),b=b+this._keyStr.charAt(g)+this._keyStr.charAt(d)+this._keyStr.charAt(j)+this._keyStr.charAt(k);return b},decode:function(a){for(var b="",d,c,e,g,j,k=0,a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");k<
var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(a){for(var b="",d,c,e,g,j,k,m=0,a=Base64._utf8_encode(a);m<a.length;)d=a.charCodeAt(m++),c=a.charCodeAt(m++),e=a.charCodeAt(m++),g=d>>2,d=(d&3)<<4|c>>4,j=(c&15)<<2|e>>6,k=e&63,isNaN(c)?j=k=64:isNaN(e)&&(k=64),b=b+this._keyStr.charAt(g)+this._keyStr.charAt(d)+this._keyStr.charAt(j)+this._keyStr.charAt(k);return b},decode:function(a){for(var b="",d,c,e,g,j,k=0,a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");k<
a.length;)d=this._keyStr.indexOf(a.charAt(k++)),c=this._keyStr.indexOf(a.charAt(k++)),g=this._keyStr.indexOf(a.charAt(k++)),j=this._keyStr.indexOf(a.charAt(k++)),d=d<<2|c>>4,c=(c&15)<<4|g>>2,e=(g&3)<<6|j,b+=String.fromCharCode(d),64!=g&&(b+=String.fromCharCode(c)),64!=j&&(b+=String.fromCharCode(e));return b=Base64._utf8_decode(b)},_utf8_encode:function(a){for(var a=a.replace(/\r\n/g,"\n"),b="",d=0;d<a.length;d++){var c=a.charCodeAt(d);128>c?b+=String.fromCharCode(c):(127<c&&2048>c?b+=String.fromCharCode(c>>
6|192):(b+=String.fromCharCode(c>>12|224),b+=String.fromCharCode(c>>6&63|128)),b+=String.fromCharCode(c&63|128))}return b},_utf8_decode:function(a){for(var b="",d=0,c=c1=c2=0;d<a.length;)c=a.charCodeAt(d),128>c?(b+=String.fromCharCode(c),d++):191<c&&224>c?(c2=a.charCodeAt(d+1),b+=String.fromCharCode((c&31)<<6|c2&63),d+=2):(c2=a.charCodeAt(d+1),c3=a.charCodeAt(d+2),b+=String.fromCharCode((c&15)<<12|(c2&63)<<6|c3&63),d+=3);return b}};
if("undefined"==typeof resizeImageContents)var resizeImageContents=function(){};if("undefined"==typeof activateOptionDisabled)var activateOptionDisabled=function(){};objectExtend=jQuery.extend;function toggleDisplay(a){jQuery("#"+a).toggle()}function checkboxSelectAll(a,b,d){var c={};if("undefined"!=typeof a)c.wrap=a;if("undefined"!=typeof d)c.checked=d;XE.checkboxToggleAll(b,c)}function clickCheckBoxAll(a,b){var d={doClick:!0};if("undefined"!=typeof a)d.wrap=a;XE.checkboxToggleAll(b,d)}
if("undefined"==typeof resizeImageContents)var resizeImageContents=function(){};if("undefined"==typeof activateOptionDisabled)var activateOptionDisabled=function(){};objectExtend=jQuery.extend;function toggleDisplay(a){jQuery("#"+a).toggle()}function checkboxSelectAll(a,b,d){var c={};"undefined"!=typeof a&&(c.wrap=a);"undefined"!=typeof d&&(c.checked=d);XE.checkboxToggleAll(b,c)}function clickCheckBoxAll(a,b){var d={doClick:!0};"undefined"!=typeof a&&(d.wrap=a);XE.checkboxToggleAll(b,d)}
function svc_folder_open(a){jQuery("#_folder_open_"+a).hide();jQuery("#_folder_close_"+a).show();jQuery("#_folder_"+a).show()}function svc_folder_close(a){jQuery("#_folder_open_"+a).show();jQuery("#_folder_close_"+a).hide();jQuery("#_folder_"+a).hide()}function open_calendar(a,b,d){"undefined"==typeof b&&(b="");var c="./common/tpl/calendar.php?";a&&(c+="fo_id="+a);b&&(c+="&day_str="+b);d&&(c+="&callback_func="+d);popopen(c,"Calendar")}var loaded_popup_menus=XE.loaded_popup_menus;
function createPopupMenu(){}function chkPopupMenu(){}function displayPopupMenu(a,b,d){XE.displayPopupMenu(a,b,d)}function GetObjLeft(a){return jQuery(a).offset().left}function GetObjTop(a){return jQuery(a).offset().top}function replaceOuterHTML(a,b){jQuery(a).replaceWith(b)}function getOuterHTML(a){return jQuery(a).html().trim()}function setCookie(a,b,d,c){a=a+"="+escape(b)+(!d?"":"; expires="+d.toGMTString())+"; path="+(!c?"/":c);document.cookie=a}
function getCookie(a){if(a=document.cookie.match(RegExp(a+"=(.*?)(?:;|$)")))return unescape(a[1])}function is_def(a){return"undefined"!=typeof a}function ucfirst(a){return a.charAt(0).toUpperCase()+a.slice(1)}function get_by_id(a){return document.getElementById(a)}
jQuery(function(a){a(".lang_code").each(function(){var b=a(this),d=b.attr("id");"undefined"==typeof d&&(d=b.attr("name"));"undefined"!=typeof d&&b.after("<a href='"+request_uri.setQuery("module","module").setQuery("act","dispModuleAdminLangcode").setQuery("target",d)+"' class='buttonSet buttonSetting' onclick='popopen(this.href);return false;'><span>find_langcode</span></a>")});a(document).click(function(b){var d=a("#popup_menu_area");d.length||(d=a('<div id="popup_menu_area" style="display:none;z-index:9999" />').appendTo(document.body));
d.hide();d=a(b.target).filter("a,div,span");d.length||(d=a(b.target).closest("a,div,span"));if(d.length){var d=d.attr("class"),c;d&&(c=d.match(/(?:^| )((document|comment|member)_([1-9]\d*))(?: |$)/));if(c){d="get"+ucfirst(c[2])+"Menu";c={mid:current_mid,cur_mid:current_mid,menu_id:c[1],target_srl:c[3],cur_act:current_url.getQuery("act"),page_x:b.pageX,page_y:b.pageY};var e="error message menus".split(" ");b.preventDefault();b.stopPropagation();if(is_def(window.xeVid))c.vid=xeVid;if(is_def(XE.loaded_popup_menus[c.menu_id]))return XE.displayPopupMenu(c,
d.hide();d=a(b.target).filter("a,div,span");d.length||(d=a(b.target).closest("a,div,span"));if(d.length){var d=d.attr("class"),c;d&&(c=d.match(/(?:^| )((document|comment|member)_([1-9]\d*))(?: |$)/));if(c){d="get"+ucfirst(c[2])+"Menu";c={mid:current_mid,cur_mid:current_mid,menu_id:c[1],target_srl:c[3],cur_act:current_url.getQuery("act"),page_x:b.pageX,page_y:b.pageY};var e=["error","message","menus"];b.preventDefault();b.stopPropagation();is_def(window.xeVid)&&(c.vid=xeVid);if(is_def(XE.loaded_popup_menus[c.menu_id]))return XE.displayPopupMenu(c,
e,c);show_waiting_message=!1;exec_xml("member",d,c,XE.displayPopupMenu,e,c);show_waiting_message=!0}}});a("a._xe_popup").click(function(){var b=a(this),d=b.attr("name"),b=b.attr("href");d||(d="_xe_popup_"+Math.floor(1E3*Math.random()));(d=window.open(b,d,"left=10,top=10,width=10,height=10,resizable=no,scrollbars=no,toolbars=no"))&&d.focus();return!1});a.datepicker&&a.datepicker.setDefaults({dateFormat:"yy-mm-dd"})});var show_waiting_message=!0;
function xml2json(a,b,d){var c={toObj:function(a){var b={};if(1==a.nodeType){if(d&&a.attributes.length)for(var e=0;e<a.attributes.length;e++)b["@"+a.attributes[e].nodeName]=(a.attributes[e].nodeValue||"").toString();if(a.firstChild){for(var l=e=0,m=!1,h=a.firstChild;h;h=h.nextSibling)1==h.nodeType?m=!0:3==h.nodeType&&h.nodeValue.match(/[^ \f\n\r\t\v]/)?e++:4==h.nodeType&&l++;if(m)if(2>e&&2>l){c.removeWhite(a);for(h=a.firstChild;h;h=h.nextSibling)3==h.nodeType?b=c.escape(h.nodeValue):4==h.nodeType?
b=c.escape(h.nodeValue):b[h.nodeName]?b[h.nodeName]instanceof Array?b[h.nodeName][b[h.nodeName].length]=c.toObj(h):b[h.nodeName]=[b[h.nodeName],c.toObj(h)]:b[h.nodeName]=c.toObj(h)}else a.attributes.length?b["#text"]=c.escape(c.innerXml(a)):b=c.escape(c.innerXml(a));else if(e)a.attributes.length?b["#text"]=c.escape(c.innerXml(a)):b=c.escape(c.innerXml(a));else if(l)if(1<l)b=c.escape(c.innerXml(a));else for(h=a.firstChild;h;h=h.nextSibling)b=c.escape(h.nodeValue)}!a.attributes.length&&!a.firstChild&&
(b=null)}else 9==a.nodeType?b=c.toObj(a.documentElement):alert("unhandled node type: "+a.nodeType);return b},toJson:function(a,b,d){var e=b?'"'+b+'"':"";if(a instanceof Array){for(var m=0,h=a.length;m<h;m++)a[m]=c.toJson(a[m],"",d+"\t");e+=(b?":[":"[")+(1<a.length?"\n"+d+"\t"+a.join(",\n"+d+"\t")+"\n"+d:a.join(""))+"]"}else if(null==a)e+=(b&&":")+"null";else if("object"==typeof a){m=[];for(h in a)m[m.length]=c.toJson(a[h],h,d+"\t");e+=(b?":{":"{")+(1<m.length?"\n"+d+"\t"+m.join(",\n"+d+"\t")+"\n"+
d:m.join(""))+"}"}else e="string"==typeof a?e+((b&&":")+'"'+a.toString()+'"'):e+((b&&":")+a.toString());return e},innerXml:function(a){var b="";if("innerHTML"in a)b=a.innerHTML;else for(var c=function(a){var b="";if(1==a.nodeType){for(var b=b+("<"+a.nodeName),d=0;d<a.attributes.length;d++)b+=" "+a.attributes[d].nodeName+'="'+(a.attributes[d].nodeValue||"").toString()+'"';if(a.firstChild){b+=">";for(d=a.firstChild;d;d=d.nextSibling)b+=c(d);b+="</"+a.nodeName+">"}else b+="/>"}else 3==a.nodeType?b+=
a.nodeValue:4==a.nodeType&&(b+="<![CDATA["+a.nodeValue+"]]\>");return b},a=a.firstChild;a;a=a.nextSibling)b+=c(a);return b},escape:function(a){return a.replace(/[\\]/g,"\\\\").replace(/[\"]/g,'\\"').replace(/[\n]/g,"\\n").replace(/[\r]/g,"\\r")},removeWhite:function(a){a.normalize();for(var b=a.firstChild;b;)if(3==b.nodeType)if(b.nodeValue.match(/[^ \f\n\r\t\v]/))b=b.nextSibling;else{var d=b.nextSibling;a.removeChild(b);b=d}else 1==b.nodeType&&c.removeWhite(b),b=b.nextSibling;return a}};if(9==a.nodeType)a=
a.documentElement;var e=c.toObj(c.removeWhite(a));"object"==typeof JSON&&jQuery.isFunction(JSON.stringify);a=c.toJson(e,a.nodeName,"");return"{"+(b?a.replace(/\t/g,b):a.replace(/\t|\n/g,""))+"}"}
function xml2json(a,b,d){var c={toObj:function(a){var b={};if(1==a.nodeType){if(d&&a.attributes.length)for(var e=0;e<a.attributes.length;e++)b["@"+a.attributes[e].nodeName]=(a.attributes[e].nodeValue||"").toString();if(a.firstChild){for(var m=e=0,l=!1,h=a.firstChild;h;h=h.nextSibling)1==h.nodeType?l=!0:3==h.nodeType&&h.nodeValue.match(/[^ \f\n\r\t\v]/)?e++:4==h.nodeType&&m++;if(l)if(2>e&&2>m){c.removeWhite(a);for(h=a.firstChild;h;h=h.nextSibling)3==h.nodeType?b=c.escape(h.nodeValue):4==h.nodeType?
b=c.escape(h.nodeValue):b[h.nodeName]?b[h.nodeName]instanceof Array?b[h.nodeName][b[h.nodeName].length]=c.toObj(h):b[h.nodeName]=[b[h.nodeName],c.toObj(h)]:b[h.nodeName]=c.toObj(h)}else a.attributes.length?b["#text"]=c.escape(c.innerXml(a)):b=c.escape(c.innerXml(a));else if(e)a.attributes.length?b["#text"]=c.escape(c.innerXml(a)):b=c.escape(c.innerXml(a));else if(m)if(1<m)b=c.escape(c.innerXml(a));else for(h=a.firstChild;h;h=h.nextSibling)b=c.escape(h.nodeValue)}!a.attributes.length&&!a.firstChild&&
(b=null)}else 9==a.nodeType?b=c.toObj(a.documentElement):alert("unhandled node type: "+a.nodeType);return b},toJson:function(a,b,d){var e=b?'"'+b+'"':"";if(a instanceof Array){for(var l=0,h=a.length;l<h;l++)a[l]=c.toJson(a[l],"",d+"\t");e+=(b?":[":"[")+(1<a.length?"\n"+d+"\t"+a.join(",\n"+d+"\t")+"\n"+d:a.join(""))+"]"}else if(null==a)e+=(b&&":")+"null";else if("object"==typeof a){l=[];for(h in a)l[l.length]=c.toJson(a[h],h,d+"\t");e+=(b?":{":"{")+(1<l.length?"\n"+d+"\t"+l.join(",\n"+d+"\t")+"\n"+
d:l.join(""))+"}"}else e="string"==typeof a?e+((b&&":")+'"'+a.toString()+'"'):e+((b&&":")+a.toString());return e},innerXml:function(a){var b="";if("innerHTML"in a)b=a.innerHTML;else for(var c=function(a){var b="";if(1==a.nodeType){for(var b=b+("<"+a.nodeName),d=0;d<a.attributes.length;d++)b+=" "+a.attributes[d].nodeName+'="'+(a.attributes[d].nodeValue||"").toString()+'"';if(a.firstChild){b+=">";for(d=a.firstChild;d;d=d.nextSibling)b+=c(d);b+="</"+a.nodeName+">"}else b+="/>"}else 3==a.nodeType?b+=
a.nodeValue:4==a.nodeType&&(b+="<![CDATA["+a.nodeValue+"]]\>");return b},a=a.firstChild;a;a=a.nextSibling)b+=c(a);return b},escape:function(a){return a.replace(/[\\]/g,"\\\\").replace(/[\"]/g,'\\"').replace(/[\n]/g,"\\n").replace(/[\r]/g,"\\r")},removeWhite:function(a){a.normalize();for(var b=a.firstChild;b;)if(3==b.nodeType)if(b.nodeValue.match(/[^ \f\n\r\t\v]/))b=b.nextSibling;else{var d=b.nextSibling;a.removeChild(b);b=d}else 1==b.nodeType&&c.removeWhite(b),b=b.nextSibling;return a}};9==a.nodeType&&
(a=a.documentElement);var e=c.toObj(c.removeWhite(a));"object"==typeof JSON&&jQuery.isFunction(JSON.stringify);a=c.toJson(e,a.nodeName,"");return"{"+(b?a.replace(/\t/g,b):a.replace(/\t|\n/g,""))+"}"}
(function(a){function b(b,c){a("#xeTmpIframe").length||a('<iframe name="%id%" id="%id%" style="position:absolute;left:-1px;top:1px;width:1px;height:1px"></iframe>'.replace(/%id%/g,"xeTmpIframe")).appendTo(document.body);a("#xeVirtualForm").remove();var d=a('<form id="%id%"></form>'.replace(/%id%/g,"xeVirtualForm")).attr({id:"xeVirtualForm",method:"post",action:b,target:"xeTmpIframe"});c.xeVirtualRequestMethod="xml";c.xeRequestURI=location.href.replace(/#(.*)$/i,"");c.xeVirtualRequestUrl=request_uri;
a.each(c,function(b,c){a('<input type="hidden">').attr("name",b).attr("value",c).appendTo(d)});d.appendTo(document.body).submit()}function d(a){var b={},c;for(c in a)a.hasOwnProperty(c)&&(b[c]=a[c]);return b}function c(){return""}a.exec_xml=window.exec_xml=function(c,g,j,k,l,m,h){function w(b){var b=a(b).find("response")[0],d,w="",o=[],j={};d="";s.css("display","none").trigger("cancel_confirm");if(!b)return alert(u.responseText),null;d=xml2json(b,!1,!1);d="object"==typeof JSON&&a.isFunction(JSON.parse)?
JSON.parse(d):eval("("+d+")");d=d.response;if("undefined"==typeof d){o.error=-1;o.message="Unexpected error occured.";try{if("undefined"!=typeof(w=b.childNodes[0].firstChild.data))o.message+="\r\n"+w}catch(n){}return o}a.each(l,function(a,b){j[b]=!0});j.redirect_url=!0;j.act=!0;a.each(d,function(a,b){j[a]&&(o[a]=b)});if(0!=o.error){if(a.isFunction(a.exec_xml.onerror))return a.exec_xml.onerror(c,g,o,k,l,m,h);alert((o.message||"An unknown error occured while loading ["+c+"."+g+"]").replace(/\\n/g,"\n"));
return null}if(o.redirect_url)return location.href=o.redirect_url.replace(/&amp;/g,"&"),null;a.isFunction(k)&&k(o,l,m,h)}var o=request_uri+"index.php";j||(j={});a.isArray(j)&&(j=d(j));j.module=c;j.act=g;"undefined"!=typeof xeVid&&(j.vid=xeVid);"undefined"==typeof l||1>l.length?l=["error","message"]:l.push("error","message");if(a.isArray(ssl_actions)&&j.act&&0<=a.inArray(j.act,ssl_actions)){var o=window.https_port||443,n=a("<a>").attr("href",default_url||request_uri)[0],v="https://"+n.hostname.replace(/:\d+$/,
"");443!=o&&(v+=":"+o);"/"!=n.pathname[0]&&(v+="/");v+=n.pathname;o=v.replace(/\/$/,"")+"/index.php"}n=a("<a>").attr("href",location.href)[0];v=a("<a>").attr("href",o)[0];if(n.protocol!=v.protocol||n.port!=v.port)return b(o,j);var x=[],p=0;x[p++]='<?xml version="1.0" encoding="utf-8" ?>';x[p++]="<methodCall>";x[p++]="<params>";a.each(j,function(a,b){x[p++]="<"+a+"><![CDATA["+b+"]]\></"+a+">"});x[p++]="</params>";x[p++]="</methodCall>";var u=null;u&&0!=u.readyState&&u.abort();try{a.ajax({url:o,type:"POST",
dataType:"xml",data:x.join("\n"),contentType:"text/plain",beforeSend:function(a){u=a},success:w,error:function(a,b){s.css("display","none");var c="";if("parsererror"==b){if(""==a.responseText)return;c="The result is not valid XML :\n-------------------------------------\n"+a.responseText.replace(/<[^>]+>/g,"")}else c=b;try{console.log(c)}catch(d){}}})}catch(A){alert(A);return}var s=a(".wfsr");show_waiting_message&&s.length&&s.html(waiting_message).show()};a.exec_json=function(b,c,d){"undefined"==
typeof c&&(c={});b=b.split(".");2==b.length&&(show_waiting_message&&a(".wfsr").html(waiting_message).show(),a.extend(c,{module:b[0],act:b[1]}),"undefined"!=typeof xeVid&&a.extend(c,{vid:xeVid}),a.ajax({type:"POST",dataType:"json",url:request_uri,contentType:"application/json",data:a.param(c),success:function(b){a(".wfsr").hide().trigger("cancel_confirm");0<b.error&&alert(b.message);a.isFunction(d)&&d(b)}}))};a.fn.exec_html=function(b,c,d,k,l){"undefined"==typeof c&&(c={});a.inArray(d,["html","append",
"prepend"])||(d="html");var m=a(this),b=b.split(".");2==b.length&&(show_waiting_message&&a(".wfsr").html(waiting_message).show(),a.extend(c,{module:b[0],act:b[1]}),a.ajax({type:"POST",dataType:"html",url:request_uri,data:a.param(c),success:function(b){a(".wfsr").hide().trigger("cancel_confirm");m[d](b);a.isFunction(k)&&k(l)}}))};a(function(a){a(".wfsr").ajaxStart(function(){a(window).bind("beforeunload",c)}).bind("ajaxStop cancel_confirm",function(){a(window).unbind("beforeunload",c)})})})(jQuery);
(function(a){function b(a){var b=[];if(a.is(":radio"))return a.filter(":checked").val();return a.is(":checkbox")?(a.filter(":checked").each(function(){b.push(this.value)}),b.join("|@|")):a.val()}function d(a){a+="";if(!a.length)return 0;var a=encodeURI(a),b=a.split("%").length-1;return a.length-2*b}var c=[],e=[],g={},j=[],k={},l=new (xe.createApp("Validator",{init:function(){var a=/^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$/;this.cast("ADD_RULE",["email",a]);this.cast("ADD_RULE",["email_address",a]);a=
/^[a-z]+[\w-]*[a-z0-9_]+$/i;this.cast("ADD_RULE",["userid",a]);this.cast("ADD_RULE",["user_id",a]);a=/^(https?|ftp|mms):\/\/[0-9a-z-]+(\.[_0-9a-z-]+)+(:\d+)?/;this.cast("ADD_RULE",["url",a]);this.cast("ADD_RULE",["homepage",a]);this.cast("ADD_RULE",["korean",RegExp("^[\uac00-\ud7a3]*$")]);this.cast("ADD_RULE",["korean_number",RegExp("^[\uac00-\ud7a30-9]*$")]);this.cast("ADD_RULE",["alpha",/^[a-z]*$/i]);this.cast("ADD_RULE",["alpha_number",/^[a-z][a-z0-9_]*$/i]);this.cast("ADD_RULE",["number",/^[0-9]*$/])},
run:function(a){var b="";if(a._filter)b=a._filter.value;a=this.cast("VALIDATE",[a,b]);"undefined"==typeof a&&(a=!1);return a},API_ONREADY:function(){var b=this;a("form").each(function(){if(this.onsubmit)this["xe:onsubmit"]=this.onsubmit,this.onsubmit=null}).submit(function(){var c=this["xe:onsubmit"];return a.isFunction(c)?c.apply(this):b.run(this)})},API_VALIDATE:function(c,e){function o(a){return a.replace(/([\.\+\-\[\]\{\}\(\)\\])/g,"\\$1")}var n=!0,l=e[0],m=l.elements,p,u,A,s,r,q,B,t,y,z;if(m.ruleset)p=
l.elements.ruleset.value;else if(m._filter)p=l.elements._filter.value;if(!p)return!0;a.isFunction(j[p])&&(A=j[p]);p=a.extend({},g[p.toLowerCase()]||{},k);s=[];for(q=0,t=l.elements.length;q<t;q++)n=m[q],(r=n.name)&&m[r]&&(!m[r].length||m[r][0]===n)&&s.push(r);s=s.join("\n");u={};for(r in p)if(p.hasOwnProperty(r)&&(n=[],"^"==r.substr(0,1))){(n=s.match(RegExp("^"+o(r.substr(1))+".*$","gm")))||(n=[]);for(q=0,t=n.length;q<t;q++)u[n[q]]=p[r];p[r]=null;delete p[r]}p=a.extend(p,u);for(r in p)if(p.hasOwnProperty(r)&&
(f=p[r],s=(n=m[r])?a.trim(b(a(n))):"",u=(f.modifier||"")+",",n&&!n.disabled)){if(f["if"]){a.isArray(f["if"])||(f["if"]=[f["if"]]);for(q=0;q<f["if"].length;q++)if(t=f["if"][q],n=new Function("el","return !!("+t.test.replace(/\$(\w+)/g,'el["$1"].value')+")"),n(m))f[t.attr]=t.value}if(s){n=parseInt(f.minlength)||0;t=parseInt(f.maxlength)||0;z=/b$/.test(f.minlength||"");y=/b$/.test(f.maxlength||"");q=s.length;if(z||y)B=d(s);if(n&&n>(z?B:q)||t&&t<(y?B:q))return this.cast("ALERT",[l,r,"outofrange",n,t])&&
!1;if(f.equalto&&(t=(q=m[f.equalto])?a.trim(b(a(q))):"",q&&t!==s))return this.cast("ALERT",[l,r,"equalto"])&&!1;y=(f.rule||"").split(",");for(q=0,t=y.length;q<t;q++)if(z=y[q])if(n=this.cast("APPLY_RULE",[z,s]),-1<u.indexOf("not,")&&(n=!n),!n)return this.cast("ALERT",[l,r,"invalid_"+z])&&!1}else if(f["default"]&&(s=f["default"]),f.required)return this.cast("ALERT",[l,r,"isnull"])&&!1}return a.isFunction(A)?A(l):!0},API_ADD_RULE:function(a,b){var c=b[0].toLowerCase();e[c]=b[1]},API_DEL_RULE:function(a,
b){var c=b[0].toLowerCase();delete e[c]},API_GET_RULE:function(a,b){var c=b[0].toLowerCase();return e[c]?e[c]:null},API_ADD_FILTER:function(a,b){var c=b[0].toLowerCase();g[c]=b[1]},API_DEL_FILTER:function(a,b){var c=b[0].toLowerCase();delete g[c]},API_GET_FILTER:function(a,b){var c=b[0].toLowerCase();return g[c]?g[c]:null},API_ADD_EXTRA_FIELD:function(a,b){var c=b[0].toLowerCase();k[c]=b[1]},API_GET_EXTRA_FIELD:function(a,b){var c=b[0].toLowerCase();return k[c]},API_DEL_EXTRA_FIELD:function(a,b){var c=
b[0].toLowerCase();delete k[c]},API_APPLY_RULE:function(b,c){var d=c[0],g=c[1];return"undefined"==typeof e[d]?!0:a.isFunction(e[d])?e[d](g):e[d]instanceof RegExp?e[d].test(g):a.isArray(e[d])?-1<a.inArray(g,e[d]):!0},API_ALERT:function(b,c){var d=c[0],e=c[1],g=c[2],j=c[3],l=c[4],m=this.cast("GET_MESSAGE",[e]),k=this.cast("GET_MESSAGE",[g]);k!=g&&(k=0>k.indexOf("%s")?m+k:k.replace("%s",m));if(j||l)k+="("+(j||"")+"~"+(l||"")+")";this.cast("SHOW_ALERT",[k]);a(d.elements[e]).focus()},API_SHOW_ALERT:function(a,
b){alert(b[0])},API_ADD_MESSAGE:function(a,b){c[b[0]]=b[1]},API_GET_MESSAGE:function(a,b){var d=b[0];return c[d]||d},API_ADD_CALLBACK:function(a,b){j[b[0]]=b[1]},API_REMOVE_CALLBACK:function(a,b){delete j[b[0]]}}));xe.registerApp(l);var m=xe.createPlugin("editor_stub",{API_BEFORE_VALIDATE:function(a,b){var c=b[0].getAttribute("editor_sequence");if(c&&"object"==typeof c)c=c.value;if(c)try{editorRelKeys[c].content.value=editorRelKeys[c].func(c)||""}catch(d){}}});l.registerPlugin(new m)})(jQuery);
a.each(c,function(b,c){a('<input type="hidden">').attr("name",b).attr("value",c).appendTo(d)});d.appendTo(document.body).submit()}function d(a){var b={},c;for(c in a)a.hasOwnProperty(c)&&(b[c]=a[c]);return b}function c(){return""}a.exec_xml=window.exec_xml=function(c,g,j,k,m,l,h){function r(b){var b=a(b).find("response")[0],d,s="",r=[],j={};d="";t.css("display","none").trigger("cancel_confirm");if(!b)return alert(v.responseText),null;d=xml2json(b,!1,!1);d="object"==typeof JSON&&a.isFunction(JSON.parse)?
JSON.parse(d):eval("("+d+")");d=d.response;if("undefined"==typeof d){r.error=-1;r.message="Unexpected error occured.";try{if("undefined"!=typeof(s=b.childNodes[0].firstChild.data))r.message+="\r\n"+s}catch(n){}return r}a.each(m,function(a,b){j[b]=!0});j.redirect_url=!0;j.act=!0;a.each(d,function(a,b){j[a]&&(r[a]=b)});if(0!=r.error){if(a.isFunction(a.exec_xml.onerror))return a.exec_xml.onerror(c,g,r,k,m,l,h);alert((r.message||"An unknown error occured while loading ["+c+"."+g+"]").replace(/\\n/g,"\n"));
return null}if(r.redirect_url)return location.href=r.redirect_url.replace(/&amp;/g,"&"),null;a.isFunction(k)&&k(r,m,l,h)}var s=request_uri+"index.php";j||(j={});a.isArray(j)&&(j=d(j));j.module=c;j.act=g;"undefined"!=typeof xeVid&&(j.vid=xeVid);"undefined"==typeof m||1>m.length?m=["error","message"]:m.push("error","message");if(a.isArray(ssl_actions)&&j.act&&0<=a.inArray(j.act,ssl_actions)){var s=window.https_port||443,n=a("<a>").attr("href",default_url||request_uri)[0],w="https://"+n.hostname.replace(/:\d+$/,
"");443!=s&&(w+=":"+s);"/"!=n.pathname[0]&&(w+="/");w+=n.pathname;s=w.replace(/\/$/,"")+"/index.php"}n=a("<a>").attr("href",location.href)[0];w=a("<a>").attr("href",s)[0];if(n.protocol!=w.protocol||n.port!=w.port)return b(s,j);var x=[],o=0;x[o++]='<?xml version="1.0" encoding="utf-8" ?>';x[o++]="<methodCall>";x[o++]="<params>";a.each(j,function(a,b){x[o++]="<"+a+"><![CDATA["+b+"]]\></"+a+">"});x[o++]="</params>";x[o++]="</methodCall>";var v=null;v&&0!=v.readyState&&v.abort();try{a.ajax({url:s,type:"POST",
dataType:"xml",data:x.join("\n"),contentType:"text/plain",beforeSend:function(a){v=a},success:r,error:function(a,b){t.css("display","none");var c="";if("parsererror"==b){if(""==a.responseText)return;c="The result is not valid XML :\n-------------------------------------\n"+a.responseText.replace(/<[^>]+>/g,"")}else c=b;try{console.log(c)}catch(d){}}})}catch(A){alert(A);return}var t=a(".wfsr");show_waiting_message&&t.length&&t.html(waiting_message).show()};a.exec_json=function(b,c,d){"undefined"==
typeof c&&(c={});b=b.split(".");2==b.length&&(show_waiting_message&&a(".wfsr").html(waiting_message).show(),a.extend(c,{module:b[0],act:b[1]}),"undefined"!=typeof xeVid&&a.extend(c,{vid:xeVid}),a.ajax({type:"POST",dataType:"json",url:request_uri,contentType:"application/json",data:a.param(c),success:function(b){a(".wfsr").hide().trigger("cancel_confirm");0<b.error&&alert(b.message);a.isFunction(d)&&d(b)}}))};a.fn.exec_html=function(b,c,d,k,m){"undefined"==typeof c&&(c={});a.inArray(d,["html","append",
"prepend"])||(d="html");var l=a(this),b=b.split(".");2==b.length&&(show_waiting_message&&a(".wfsr").html(waiting_message).show(),a.extend(c,{module:b[0],act:b[1]}),a.ajax({type:"POST",dataType:"html",url:request_uri,data:a.param(c),success:function(b){a(".wfsr").hide().trigger("cancel_confirm");l[d](b);a.isFunction(k)&&k(m)}}))};a(function(a){a(".wfsr").ajaxStart(function(){a(window).bind("beforeunload",c)}).bind("ajaxStop cancel_confirm",function(){a(window).unbind("beforeunload",c)})})})(jQuery);
(function(a){function b(a){var b=[];return a.is(":radio")?a.filter(":checked").val():a.is(":checkbox")?(a.filter(":checked").each(function(){b.push(this.value)}),b.join("|@|")):a.val()}function d(a){a+="";if(!a.length)return 0;var a=encodeURI(a),b=a.split("%").length-1;return a.length-2*b}var c=[],e=[],g={},j=[],k={},m=new (xe.createApp("Validator",{init:function(){var a=/^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$/;this.cast("ADD_RULE",["email",a]);this.cast("ADD_RULE",["email_address",a]);a=/^[a-z]+[\w-]*[a-z0-9_]+$/i;
this.cast("ADD_RULE",["userid",a]);this.cast("ADD_RULE",["user_id",a]);a=/^(https?|ftp|mms):\/\/[0-9a-z-]+(\.[_0-9a-z-]+)+(:\d+)?/;this.cast("ADD_RULE",["url",a]);this.cast("ADD_RULE",["homepage",a]);this.cast("ADD_RULE",["korean",RegExp("^[\uac00-\ud7a3]*$")]);this.cast("ADD_RULE",["korean_number",RegExp("^[\uac00-\ud7a30-9]*$")]);this.cast("ADD_RULE",["alpha",/^[a-z]*$/i]);this.cast("ADD_RULE",["alpha_number",/^[a-z][a-z0-9_]*$/i]);this.cast("ADD_RULE",["number",/^[0-9]*$/])},run:function(a){var b=
"";a._filter&&(b=a._filter.value);a=this.cast("VALIDATE",[a,b]);"undefined"==typeof a&&(a=!1);return a},API_ONREADY:function(){var b=this;a("form").each(function(){this.onsubmit&&(this["xe:onsubmit"]=this.onsubmit,this.onsubmit=null)}).submit(function(c){var d=this["xe:onsubmit"];(d=a.isFunction(d)?d.apply(this):b.run(this))||c.stopImmediatePropagation();return d})},API_VALIDATE:function(c,e){function s(a){return a.replace(/([\.\+\-\[\]\{\}\(\)\\])/g,"\\$1")}var n=!0,m=e[0],l=m.elements,o,v,A,t,q,
p,B,u,y,z;l.ruleset?o=m.elements.ruleset.value:l._filter&&(o=m.elements._filter.value);if(!o)return!0;a.isFunction(j[o])&&(A=j[o]);o=a.extend({},g[o.toLowerCase()]||{},k);t=[];p=0;for(u=m.elements.length;p<u;p++)n=l[p],(q=n.name)&&l[q]&&(!l[q].length||l[q][0]===n)&&t.push(q);t=t.join("\n");v={};for(q in o)if(o.hasOwnProperty(q)&&(n=[],"^"==q.substr(0,1))){(n=t.match(RegExp("^"+s(q.substr(1))+".*$","gm")))||(n=[]);p=0;for(u=n.length;p<u;p++)v[n[p]]=o[q];o[q]=null;delete o[q]}o=a.extend(o,v);for(q in o)if(o.hasOwnProperty(q)&&
(f=o[q],(n=l[q])||(n=l[q+"[]"]),t=n?a.trim(b(a(n))):"",v=(f.modifier||"")+",",n&&!n.disabled)){if(f["if"]){a.isArray(f["if"])||(f["if"]=[f["if"]]);for(p=0;p<f["if"].length;p++)u=f["if"][p],n=new Function("el","return !!("+u.test.replace(/\$(\w+)/g,'el["$1"].value')+")"),n(l)&&(f[u.attr]=u.value)}if(t){n=parseInt(f.minlength)||0;u=parseInt(f.maxlength)||0;z=/b$/.test(f.minlength||"");y=/b$/.test(f.maxlength||"");p=t.length;if(z||y)B=d(t);if(n&&n>(z?B:p)||u&&u<(y?B:p))return this.cast("ALERT",[m,q,
"outofrange",n,u])&&!1;if(f.equalto&&(u=(p=l[f.equalto])?a.trim(b(a(p))):"",p&&u!==t))return this.cast("ALERT",[m,q,"equalto"])&&!1;y=(f.rule||"").split(",");p=0;for(u=y.length;p<u;p++)if(z=y[p])if(n=this.cast("APPLY_RULE",[z,t]),-1<v.indexOf("not,")&&(n=!n),!n)return this.cast("ALERT",[m,q,"invalid_"+z])&&!1}else if(f["default"]&&(t=f["default"]),f.required)return this.cast("ALERT",[m,q,"isnull"])&&!1}return a.isFunction(A)?A(m):!0},API_ADD_RULE:function(a,b){var c=b[0].toLowerCase();e[c]=b[1]},
API_DEL_RULE:function(a,b){var c=b[0].toLowerCase();delete e[c]},API_GET_RULE:function(a,b){var c=b[0].toLowerCase();return e[c]?e[c]:null},API_ADD_FILTER:function(a,b){var c=b[0].toLowerCase();g[c]=b[1]},API_DEL_FILTER:function(a,b){var c=b[0].toLowerCase();delete g[c]},API_GET_FILTER:function(a,b){var c=b[0].toLowerCase();return g[c]?g[c]:null},API_ADD_EXTRA_FIELD:function(a,b){var c=b[0].toLowerCase();k[c]=b[1]},API_GET_EXTRA_FIELD:function(a,b){var c=b[0].toLowerCase();return k[c]},API_DEL_EXTRA_FIELD:function(a,
b){var c=b[0].toLowerCase();delete k[c]},API_APPLY_RULE:function(b,c){var d=c[0],g=c[1];return"undefined"==typeof e[d]?!0:a.isFunction(e[d])?e[d](g):e[d]instanceof RegExp?e[d].test(g):a.isArray(e[d])?-1<a.inArray(g,e[d]):!0},API_ALERT:function(b,c){var d=c[0],e=c[1],g=c[2],j=c[3],l=c[4],m=this.cast("GET_MESSAGE",[e]),k=this.cast("GET_MESSAGE",[g]);k!=g&&(k=0>k.indexOf("%s")?m+k:k.replace("%s",m));if(j||l)k+="("+(j||"")+"~"+(l||"")+")";this.cast("SHOW_ALERT",[k]);a(d.elements[e]).focus()},API_SHOW_ALERT:function(a,
b){alert(b[0])},API_ADD_MESSAGE:function(a,b){c[b[0]]=b[1]},API_GET_MESSAGE:function(a,b){var d=b[0];return c[d]||d},API_ADD_CALLBACK:function(a,b){j[b[0]]=b[1]},API_REMOVE_CALLBACK:function(a,b){delete j[b[0]]}}));xe.registerApp(m);var l=xe.createPlugin("editor_stub",{API_BEFORE_VALIDATE:function(a,b){var c=b[0].getAttribute("editor_sequence");c&&"object"==typeof c&&(c=c.value);if(c)try{editorRelKeys[c].content.value=editorRelKeys[c].func(c)||""}catch(d){}}});m.registerPlugin(new l)})(jQuery);
function filterAlertMessage(a){var b=a.message,d=a.act,a=a.redirect_url,c=location.href;"undefined"!=typeof b&&b&&"success"!=b&&alert(b);"undefined"!=typeof d&&d?c=current_url.setQuery("act",d):"undefined"!=typeof a&&a&&(c=a);c==location.href&&(c=c.replace(/#(.*)$/,""));location.href=c}function procFilter(a,b){b(a);return!1}
function legacy_filter(a,b,d,c,e,g,j,k){var l=xe.getApp("Validator")[0],m=jQuery,h=[];if(!l)return!1;b.elements._filter||m(b).prepend('<input type="hidden" name="_filter" />');b.elements._filter.value=a;h[0]=a;h[1]=function(a){var h={},a=m(a).serializeArray();m.each(a,function(a,b){var c=m.trim(b.value),d=b.name;if(!c||!d)return!0;k[d]&&(d=k[d]);/\[\]$/.test(d)&&(d=d.replace(/\[\]$/,""));h[d]=h[d]?h[d]+("|@|"+c):b.value});if(j&&!confirm(j))return!1;exec_xml(d,c,h,e,g,h,b)};l.cast("ADD_CALLBACK",h);
l.cast("VALIDATE",[b,a]);return!1};
function legacy_filter(a,b,d,c,e,g,j,k){var m=xe.getApp("Validator")[0],l=jQuery,h=[];if(!m)return!1;b.elements._filter||l(b).prepend('<input type="hidden" name="_filter" />');b.elements._filter.value=a;h[0]=a;h[1]=function(a){var h={},a=l(a).serializeArray();l.each(a,function(a,b){var c=l.trim(b.value),d=b.name;if(!c||!d)return!0;k[d]&&(d=k[d]);/\[\]$/.test(d)&&(d=d.replace(/\[\]$/,""));h[d]=h[d]?h[d]+("|@|"+c):b.value});if(j&&!confirm(j))return!1;exec_xml(d,c,h,e,g,h,b)};m.cast("ADD_CALLBACK",h);
m.cast("VALIDATE",[b,a]);return!1};

View file

@ -76,11 +76,15 @@ var Validator = xe.createApp('Validator', {
this.onsubmit = null;
}
})
.submit(function(){
.submit(function(e){
var legacyFn = this['xe:onsubmit'];
var hasLegacyFn = $.isFunction(legacyFn);
var bResult = hasLegacyFn?legacyFn.apply(this):self.run(this);
if(!bResult)
{
e.stopImmediatePropagation();
}
return bResult;
});
},
@ -138,9 +142,14 @@ var Validator = xe.createApp('Validator', {
f = filter[name];
el = elems[name];
if(!el)
{
el = elems[name + '[]'];
}
val = el?$.trim(get_value($(el))):'';
mod = (f.modifier||'')+',';
if(!el || el.disabled) continue;
if(f['if']) {

View file

@ -88,7 +88,7 @@
<value xml:lang="ko"><![CDATA[전체]]></value>
<value xml:lang="en"><![CDATA[All]]></value>
<value xml:lang="jp"><![CDATA[すべて]]></value>
<value xml:lang="zh-TW"><![CDATA[All全部]]></value>
<value xml:lang="zh-TW"><![CDATA[全部]]></value>
</item>
<item name="cmd_view_all">
<value xml:lang="ko"><![CDATA[전체 보기]]></value>
@ -193,7 +193,7 @@
<value xml:lang="en"><![CDATA[Add Comment]]></value>
<value xml:lang="jp"><![CDATA[コメント登録]]></value>
<value xml:lang="zh-CN"><![CDATA[提交评论]]></value>
<value xml:lang="zh-TW"><![CDATA[送出評論]]></value>
<value xml:lang="zh-TW"><![CDATA[回覆]]></value>
<value xml:lang="fr"><![CDATA[Ajouter un Commentaire]]></value>
<value xml:lang="de"><![CDATA[Kommentar hinzufügen]]></value>
<value xml:lang="ru"><![CDATA[Добавить запись]]></value>
@ -577,7 +577,7 @@
<value xml:lang="en"><![CDATA[Close All]]></value>
<value xml:lang="jp"><![CDATA[すべて閉じる]]></value>
<value xml:lang="zh-CN"><![CDATA[全部折叠]]></value>
<value xml:lang="zh-TW"><![CDATA[全部收合]]></value>
<value xml:lang="zh-TW"><![CDATA[全部關閉]]></value>
<value xml:lang="fr"><![CDATA[Fermer Tout]]></value>
<value xml:lang="de"><![CDATA[Alle schließen]]></value>
<value xml:lang="ru"><![CDATA[Закрыть все]]></value>
@ -1116,6 +1116,11 @@
<value xml:lang="vi"><![CDATA[Nhập lại mật khẩu]]></value>
<value xml:lang="mn"><![CDATA[Нууц дугаар шалгах]]></value>
</item>
<item name="password3">
<value xml:lang="ko"><![CDATA[비밀번호 확인]]></value>
<value xml:lang="en"><![CDATA[Retype Password]]></value>
<value xml:lang="jp"><![CDATA[パスワード確認]]></value>
</item>
<item name="admin_id">
<value xml:lang="ko"><![CDATA[관리자ID]]></value>
<value xml:lang="en"><![CDATA[Admin ID]]></value>
@ -1337,7 +1342,7 @@
<value xml:lang="en"><![CDATA[Comment]]></value>
<value xml:lang="jp"><![CDATA[コメント]]></value>
<value xml:lang="zh-CN"><![CDATA[评论]]></value>
<value xml:lang="zh-TW"><![CDATA[評論]]></value>
<value xml:lang="zh-TW"><![CDATA[回覆]]></value>
<value xml:lang="fr"><![CDATA[Commentaire]]></value>
<value xml:lang="de"><![CDATA[Kommentar]]></value>
<value xml:lang="ru"><![CDATA[Комментарии]]></value>
@ -1472,7 +1477,7 @@
<value xml:lang="en"><![CDATA[Total]]></value>
<value xml:lang="jp"><![CDATA[すべて]]></value>
<value xml:lang="zh-CN"><![CDATA[全部]]></value>
<value xml:lang="zh-TW"><![CDATA[全部]]></value>
<value xml:lang="zh-TW"><![CDATA[總共]]></value>
<value xml:lang="de"><![CDATA[Gesamt]]></value>
<value xml:lang="ru"><![CDATA[Всего]]></value>
<value xml:lang="tr"><![CDATA[Toplam]]></value>
@ -1498,7 +1503,7 @@
<value xml:lang="en"><![CDATA[IP Address]]></value>
<value xml:lang="jp"><![CDATA[IPアドレス]]></value>
<value xml:lang="zh-CN"><![CDATA[IP地址]]></value>
<value xml:lang="zh-TW"><![CDATA[IP位址]]></value>
<value xml:lang="zh-TW"><![CDATA[IP 位址]]></value>
<value xml:lang="fr"><![CDATA[Addresse IP]]></value>
<value xml:lang="de"><![CDATA[IP-Adresse]]></value>
<value xml:lang="ru"><![CDATA[IP адрес]]></value>
@ -1912,6 +1917,7 @@
<item name="blamed_count">
<value xml:lang="ko"><![CDATA[비추천 수]]></value>
<value xml:lang="en"><![CDATA[Blames]]></value>
<value xml:lang="zh-TW"><![CDATA[Blames]]></value>
</item>
<item name="comment_count">
<value xml:lang="ko"><![CDATA[댓글 수]]></value>
@ -2797,10 +2803,15 @@ Xin vui lòng kiểm tra lại thông tin Database.]]></value>
<item name="msg_empty_search_target">
<value xml:lang="ko"><![CDATA[검색대상이 없습니다.]]></value>
<value xml:lang="en"><![CDATA[Cannot find the Search target.]]></value>
<value xml:lang="zh-TW"><![CDATA[搜尋不到目標]]></value>
</item>
<item name="msg_empty_search_keyword">
<value xml:lang="ko"><![CDATA[검색어가 없습니다.]]></value>
<value xml:lang="en"><![CDATA[Cannot find the Keyword.]]></value>
<value xml:lang="en"><![CDATA[搜尋不到關鍵字]]></value>
</item>
<item name="comment_to_be_approved">
<value xml:lang="en"><![CDATA[Your comment must be approved by admin before being published.]]></value>
</item>
<item name="success_registed">
<value xml:lang="ko"><![CDATA[등록했습니다.]]></value>
@ -3672,7 +3683,7 @@ Xin vui lòng kiểm tra lại thông tin Database.]]></value>
<item name="use_and_display">
<value xml:lang="ko"><![CDATA[사용+노출]]></value>
<value xml:lang="en"><![CDATA[Use+Display]]></value>
<value xml:lang="zh-TW"><![CDATA[Use+Display]]></value>
<value xml:lang="zh-TW"><![CDATA[使用+顯示]]></value>
</item>
<item name="mobile_view">
<value xml:lang="ko"><![CDATA[모바일 뷰 사용]]></value>
@ -3698,4 +3709,14 @@ Xin vui lòng kiểm tra lại thông tin Database.]]></value>
<value xml:lang="tr"><![CDATA[Hareketli görünümü, mobil cihazlarla giriş yapılırken, mobil cihazlara uygun en iyi yerleşim düzenini göstermek içindir.]]></value>
<value xml:lang="vi"><![CDATA[Nếu truy cập bằng thiết bị di động, nội dung sẽ được bố trí theo từng loại thiết bị.]]></value>
</item>
<item name="simple_view">
<value xml:lang="ko"><![CDATA[간단보기]]></value>
<value xml:lang="en"><![CDATA[Simple View]]></value>
<value xml:lang="jp"><![CDATA[シンプルビュー]]></value>
</item>
<item name="detail_view">
<value xml:lang="ko"><![CDATA[상세보기]]></value>
<value xml:lang="en"><![CDATA[Detail View]]></value>
<value xml:lang="jp"><![CDATA[詳細ビュー]]></value>
</item>
</lang>

View file

@ -10,13 +10,10 @@
<html lang="{$lang_type}" xml:lang="{$lang_type}" xmlns="http://www.w3.org/1999/xhtml">
<!--@end-->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="Generator" content="XpressEngine" />
{@ $meta_tags = Context::getMetaTag() }
<block loop="$meta_tags=>$key,$meta_tag">
<meta http-equiv="{$meta_tag['name']}" content="{$meta_tag['content']}" cond="$meta_tag['is_http_equiv']" />
<meta name="{$meta_tag['name']}" content="{$meta_tag['content']}" cond="!$meta_tag['is_http_equiv']" />
</block>
{@$css_files=Context::getCssFile()}
{@$js_files=Context::getJsFile()}
<!-- META -->
<meta charset="UTF-8" cond="$db_info->use_html5=='Y'"/><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" cond="$db_info->use_html5!='Y'" />
<!--@if($module_info->module)-->
<meta name="module" content="{$module_info->module}" />
@ -88,21 +85,33 @@
</head>
<body{Context::getBodyClass()}>
{Context::getBodyHeader()}
<script type="text/javascript"|cond="$db_info->use_html5!='Y'">
//<![CDATA[
var current_url = "{$current_url}";
var request_uri = "{$request_uri}";
<block cond="$vid">var xeVid = "{$vid}";</block>
var current_mid = "{$mid}";
var waiting_message = "{$lang->msg_call_server}";
var ssl_actions = new Array(<block cond="count($ssl_actions)">"{implode('","',$ssl_actions)}"</block>);
var default_url = "{Context::getDefaultUrl()}";
<block cond="Context::get('_http_port')">var http_port = {Context::get("_http_port")};</block>
<block cond="Context::get('_https_port')">var https_port = {Context::get("_https_port")};</block>
<block cond="Context::get('_use_ssl') && Context::get('_use_ssl') == 'always'">var enforce_ssl = true;</block>
//]]>
</script>
{$content}
{Context::getBodyHeader()}
{Context::getHtmlFooter()}
<div class="wfsr"></div>
{@ $js_body_files = Context::getJsFile('body') }
<!--@foreach($js_body_files as $key => $js_file)-->
<!--@if($js_file['targetie'])-->
<!--[if {$js_file['targetie']}]>
<!--@end-->
<script type="text/javascript" src="{$js_file['file']}"></script>
<!--@if($js_file['targetie'])-->
<![endif]-->
<!--@end-->
<!--@end-->
{$content}
{Context::getHtmlFooter()}
<!-- ETC -->
<div class="wfsr"></div>
{@$ssl_actions=Context::getSSLActions()}
{@ $js_body_files = Context::getJsFile('body') }
<block loop="$js_body_files => $key, $js_file">
<block cond="$js_file['targetie']"><!--[if {$js_file['targetie']}]></block><script type="text/javascript"|cond="$db_info->use_html5!='Y'" src="{$js_file['file']}"></script><block cond="$js_file['targetie']"><![endif]--></block>
</block>
</body>
</html>