mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-14 00:39:57 +09:00
rollback r10028.
merge branch 1.5.0 (to ver. 1.5.1.2, r9896 - r10000) git-svn-id: http://xe-core.googlecode.com/svn/trunk@10031 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
commit
b4b7a58d4e
133 changed files with 2843 additions and 2545 deletions
|
|
@ -1151,9 +1151,13 @@ class Context {
|
|||
* @brief Add the js file
|
||||
* @deprecated
|
||||
**/
|
||||
function addJsFile($file, $optimized = false, $targetie = '',$index=0, $type='head', $isRuleset = false) {
|
||||
function addJsFile($file, $optimized = false, $targetie = '',$index=0, $type='head', $isRuleset = false, $autoPath = null) {
|
||||
if($isRuleset)
|
||||
{
|
||||
if (strpos($file, '#') !== false){
|
||||
$file = str_replace('#', '', $file);
|
||||
if (!is_readable($file)) $file = $autoPath;
|
||||
}
|
||||
$validator = new Validator($file);
|
||||
$validator->setCacheDir('files/cache');
|
||||
$file = $validator->getJsPath();
|
||||
|
|
|
|||
|
|
@ -3,8 +3,10 @@
|
|||
class ConditionWithoutArgument extends Condition {
|
||||
function ConditionWithoutArgument($column_name, $argument, $operation, $pipe = ""){
|
||||
parent::Condition($column_name, $argument, $operation, $pipe);
|
||||
if(in_array($operation, array('in', 'notin')))
|
||||
$this->_value = '('. $argument .')';
|
||||
if(in_array($operation, array('in', 'notin'))){
|
||||
if(is_array($argument)) $argument = implode($argument, ',');
|
||||
$this->_value = '('. $argument .')';
|
||||
}
|
||||
else
|
||||
$this->_value = $argument;
|
||||
|
||||
|
|
|
|||
|
|
@ -199,9 +199,9 @@
|
|||
// Phone Number
|
||||
case 'tel' :
|
||||
$buff .=
|
||||
'<input type="text" name="'.$column_name.'" value="'.$value[0].'" size="4" class="tel" />'.
|
||||
'<input type="text" name="'.$column_name.'" value="'.$value[1].'" size="4" class="tel" />'.
|
||||
'<input type="text" name="'.$column_name.'" value="'.$value[2].'" size="4" class="tel" />';
|
||||
'<input type="text" name="'.$column_name.'[]" value="'.$value[0].'" size="4" class="tel" />'.
|
||||
'<input type="text" name="'.$column_name.'[]" value="'.$value[1].'" size="4" class="tel" />'.
|
||||
'<input type="text" name="'.$column_name.'[]" value="'.$value[2].'" size="4" class="tel" />';
|
||||
break;
|
||||
|
||||
// textarea
|
||||
|
|
@ -218,7 +218,7 @@
|
|||
// Temporary ID for labeling
|
||||
$tmp_id = $column_name.'-'.$id_num++;
|
||||
|
||||
$buff .='<li><input type="checkbox" name="'.$column_name.'" id="'.$tmp_id.'" value="'.htmlspecialchars($v).'" '.$checked.' /><label for="'.$tmp_id.'">'.$v.'</label></li>';
|
||||
$buff .='<li><input type="checkbox" name="'.$column_name.'[]" id="'.$tmp_id.'" value="'.htmlspecialchars($v).'" '.$checked.' /><label for="'.$tmp_id.'">'.$v.'</label></li>';
|
||||
}
|
||||
$buff .= '</ul>';
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -206,7 +206,8 @@
|
|||
}
|
||||
else
|
||||
{
|
||||
$fullFilePath = $file->filePath . '/' . $file->fileName;
|
||||
$noneCache = (is_readable($file->cdnPath.'/'.$file->fileName))?'?'.date('YmdHis', filemtime($file->cdnPath.'/'.$file->fileName)):'';
|
||||
$fullFilePath = $file->filePath . '/' . $file->fileName.$noneCache;
|
||||
}
|
||||
$result[] = array('file' => $fullFilePath, 'targetie' => $file->targetIe);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -370,7 +370,7 @@
|
|||
if(!empty($ruleset))
|
||||
{
|
||||
$rulesetModule = $forward->module ? $forward->module : $this->module;
|
||||
$rulesetFile = $oModuleModel->getValidatorFilePath($rulesetModule, $ruleset);
|
||||
$rulesetFile = $oModuleModel->getValidatorFilePath($rulesetModule, $ruleset, $this->mid);
|
||||
if(!empty($rulesetFile))
|
||||
{
|
||||
$Validator = new Validator($rulesetFile);
|
||||
|
|
|
|||
|
|
@ -187,7 +187,7 @@ class TemplateHandler {
|
|||
$buff = $this->_parseInline($buff);
|
||||
|
||||
// include, unload/load, import
|
||||
$buff = preg_replace_callback('/{(@[\s\S]+?|(?=\$\w+|_{1,2}[A-Z]+|[!\(+-]|\w+(?:\(|::)|\d+|[\'"].*?[\'"]).+?)}|<(!--[#%])?(include|import|(un)?load(?(4)|(?:_js_plugin)?))(?(2)\("([^"]+)")(.*?)(?(2)\)--|\/)>|<!--(@[a-z@]+)([\s\S]*?)-->(\s*)/', array($this, '_parseResource'), $buff);
|
||||
$buff = preg_replace_callback('/{(@[\s\S]+?|(?=\$\w+|_{1,2}[A-Z]+|[!\(+-]|\w+(?:\(|::)|\d+|[\'"].*?[\'"]).+?)}|<(!--[#%])?(include|import|(un)?load(?(4)|(?:_js_plugin)?))(?(2)\("([^"]+)")(.*?)(?(2)\)--|\/)>|<!--(@[a-z@]*)([\s\S]*?)-->(\s*)/', array($this, '_parseResource'), $buff);
|
||||
|
||||
// remove block which is a virtual tag and remove comments
|
||||
$buff = preg_replace('@</?block\s*>|\s?<!--//(.*?)-->@is','',$buff);
|
||||
|
|
@ -215,18 +215,30 @@ class TemplateHandler {
|
|||
preg_match('/ruleset="([^"]*?)"/is', $matches[1], $m);
|
||||
if($m[0])
|
||||
{
|
||||
$matches[1] = preg_replace('/'.$m[0].'/i', '', $matches[1]);
|
||||
$matches[2] = '<input type="hidden" name="ruleset" value="'.$m[1].'" />'.$matches[2];
|
||||
$matches[1] = preg_replace('/'.addcslashes($m[0], '?$').'/i', '', $matches[1]);
|
||||
|
||||
if (strpos($m[1],'@') !== false){
|
||||
$path = str_replace('@', '', $m[1]);
|
||||
$path = './files/ruleset/'.$path.'.xml';
|
||||
}else if(strpos($m[1],'#') !== false){
|
||||
$fileName = str_replace('#', '', $m[1]);
|
||||
$fileName = str_replace('<?php echo ', '', $fileName);
|
||||
$fileName = str_replace(' ?>', '', $fileName);
|
||||
$path = '#./files/ruleset/'.$fileName.'.xml';
|
||||
|
||||
preg_match('@(?:^|\.?/)(modules/[\w-]+)@', $this->path, $mm);
|
||||
$module_path = $mm[1];
|
||||
list($rulsetFile) = explode('.', $fileName);
|
||||
$autoPath = $module_path.'/ruleset/'.$rulsetFile.'.xml';
|
||||
$m[1] = $rulsetFile;
|
||||
}else if(preg_match('@(?:^|\.?/)(modules/[\w-]+)@', $this->path, $mm)) {
|
||||
$module_path = $mm[1];
|
||||
$path = $module_path.'/ruleset/'.$m[1].'.xml';
|
||||
}
|
||||
|
||||
$matches[2] = '<input type="hidden" name="ruleset" value="'.$m[1].'" />'.$matches[2];
|
||||
//assign to addJsFile method for js dynamic recache
|
||||
$matches[1] = '<?php Context::addJsFile("'.$path.'", false, "", 0, "head", true) ?'.'>'.$matches[1];
|
||||
$matches[1] = '<?php Context::addJsFile("'.$path.'", false, "", 0, "head", true, "'.$autoPath.'") ?'.'>'.$matches[1];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -245,11 +257,15 @@ class TemplateHandler {
|
|||
}
|
||||
|
||||
// return url generate
|
||||
if (!preg_match('/no-error-return-url="true"/i', $matches[1]))
|
||||
if(!preg_match('/no-error-return-url="true"/i', $matches[1]))
|
||||
{
|
||||
preg_match('/<input[^>]*name="error_return_url"[^>]*>/is', $matches[2], $m3);
|
||||
if(!$m3[0]) $matches[2] = '<input type="hidden" name="error_return_url" value="<?php echo getRequestUriByServerEnviroment() ?>" />'.$matches[2];
|
||||
}
|
||||
else
|
||||
{
|
||||
$matches[1] = preg_replace('/no-error-return-url="true"/i', '', $matches[1]);
|
||||
}
|
||||
|
||||
$matches[0] = '';
|
||||
return implode($matches);
|
||||
|
|
@ -297,7 +313,7 @@ class TemplateHandler {
|
|||
$src = str_replace('/./', '/', $src);
|
||||
|
||||
// for backward compatibility
|
||||
$src = preg_replace('@((?:[\w-]+/)+)\1@', '\1', $src);
|
||||
$src = preg_replace('@/((?:[\w-]+/)+)\1@', '/\1', $src);
|
||||
|
||||
while(($tmp=preg_replace('@[^/]+/\.\./@', '', $src))!==$src) $src = $tmp;
|
||||
|
||||
|
|
@ -506,6 +522,7 @@ class TemplateHandler {
|
|||
if($m[7])
|
||||
{
|
||||
$m[7] = substr($m[7],1);
|
||||
if(!$m[7]) return '<?php '.$this->_replaceVar($m[8]).'{ ?>'.$m[9];
|
||||
if(!preg_match('/^(?:((?:end)?(?:if|switch|for(?:each)?|while)|end)|(else(?:if)?)|(break@)?(case|default)|(break))$/', $m[7], $mm)) return '';
|
||||
if($mm[1]) {
|
||||
if($mm[1]{0} == 'e') return '<?php } ?>'.$m[9];
|
||||
|
|
@ -560,7 +577,7 @@ class TemplateHandler {
|
|||
**/
|
||||
function _replaceVar($php) {
|
||||
if(!strlen($php)) return '';
|
||||
return preg_replace('@(?<!::|\\\\|\')\$([a-z]|_[a-z0-9])@i', '\$__Context->$1', $php);
|
||||
return preg_replace('@(?<!::|\\\\|(?<!eval\()\')\$([a-z]|_[a-z0-9])@i', '\$__Context->$1', $php);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -421,6 +421,8 @@ class Validator
|
|||
|
||||
if(preg_match('@(^|/)files/ruleset/\w+\.xml$@i', $this->_xml_path)) $ruleset = '@'.$ruleset;
|
||||
|
||||
list($ruleset) = explode('.', $ruleset);
|
||||
|
||||
// current language
|
||||
$lang_type = class_exists('Context')?Context::getLangType():'en';
|
||||
|
||||
|
|
|
|||
43
classes/xml/XmlGenerator.class.php
Normal file
43
classes/xml/XmlGenerator.class.php
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
<?php
|
||||
|
||||
class XmlGenerator{
|
||||
|
||||
function obj2xml($xml){
|
||||
$buff = "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n";
|
||||
|
||||
foreach($xml as $nodeName => $nodeItem){
|
||||
$buff .= $this->_makexml($nodeItem);
|
||||
}
|
||||
return $buff;
|
||||
}
|
||||
|
||||
function _makexml($node){
|
||||
$body = '';
|
||||
foreach($node as $key => $value){
|
||||
switch($key){
|
||||
case 'node_name' : break;
|
||||
case 'attrs' : {
|
||||
$attrs = '';
|
||||
if (isset($value)){
|
||||
foreach($value as $attrName=>$attrValue){
|
||||
$attrs .= sprintf(' %s="%s"', $attrName, htmlspecialchars($attrValue));
|
||||
}
|
||||
}
|
||||
}break;
|
||||
case 'body' : $body = $value; break;
|
||||
default : {
|
||||
if (is_array($value)){
|
||||
foreach($value as $idx => $arrNode){
|
||||
$body .= $this->_makexml($arrNode);
|
||||
}
|
||||
}else if(is_object($value)){
|
||||
$body = $this->_makexml($value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return sprintf('<%s%s>%s</%s>'."\n", $node->node_name, $attrs, $body, $node->node_name);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
Binary file not shown.
|
|
@ -532,7 +532,9 @@ function doDocumentPreview(obj) {
|
|||
).appendTo(document.body);
|
||||
|
||||
dummy_obj = jQuery("#previewDocument")[0];
|
||||
}
|
||||
} else {
|
||||
dummy_obj = dummy_obj[0];
|
||||
}
|
||||
|
||||
if(dummy_obj) {
|
||||
dummy_obj.content.value = content;
|
||||
|
|
@ -974,4 +976,11 @@ jQuery(function($){
|
|||
// cancel default action
|
||||
return false;
|
||||
});
|
||||
|
||||
// date picker default settings
|
||||
if($.datepicker) {
|
||||
$.datepicker.setDefaults({
|
||||
dateFormat : 'yy-mm-dd'
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -80,3 +80,32 @@
|
|||
$.extend(window.XE, {'filebox' : filebox});
|
||||
|
||||
}) (jQuery);
|
||||
|
||||
function addRow(ulId){
|
||||
var $ = jQuery;
|
||||
var count = $('#'+ulId).children().length;
|
||||
var clone = $('#'+ulId).find('li:last-child').prev().clone();
|
||||
$('#'+ulId).find('li:last-child').prev().find('.__addBtn').hide();
|
||||
|
||||
clone.find('input[name^="attribute_name"]').attr("name", "attribute_name"+count).attr('value', '')
|
||||
.attr("id", "attribute_name"+count)
|
||||
.prev('label').attr('for', 'attribute_name'+count);
|
||||
clone.find('input[name^="attribute_value"]').attr("name", "attribute_value"+count).attr('value', '')
|
||||
.attr("id", "attribute_value"+count)
|
||||
.prev('label').attr('for', 'attribute_value'+count);
|
||||
|
||||
$('#'+ulId).find('li:last-child').before(clone);
|
||||
}
|
||||
|
||||
function clearRow(target){
|
||||
var $ = jQuery;
|
||||
var ulTag = $(target).closest('ul');
|
||||
var count = ulTag.children().length - 1;
|
||||
if (count <= 1){
|
||||
ulTag.find('li:last-child').prev().find('.__addBtn').show();
|
||||
return;
|
||||
}
|
||||
|
||||
$(target).closest('li').remove();
|
||||
ulTag.find('li:last-child').prev().find('.__addBtn').show();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,79 +1 @@
|
|||
.colorpicker img, .colorpicker div {
|
||||
behavior: url(iepngfix.htc);
|
||||
}
|
||||
|
||||
|
||||
.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;
|
||||
}
|
||||
.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}
|
||||
52
common/js/plugins/ui/jquery-ui.css
vendored
52
common/js/plugins/ui/jquery-ui.css
vendored
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* jQuery UI CSS Framework 1.8.12
|
||||
* jQuery UI CSS Framework 1.8.16
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
|
|
@ -42,7 +42,7 @@
|
|||
|
||||
|
||||
/*
|
||||
* jQuery UI CSS Framework 1.8.12
|
||||
* jQuery UI CSS Framework 1.8.16
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
|
|
@ -280,20 +280,15 @@
|
|||
----------------------------------*/
|
||||
|
||||
/* Corner radius */
|
||||
.ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; }
|
||||
.ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; }
|
||||
.ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; }
|
||||
.ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
|
||||
.ui-corner-top { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; }
|
||||
.ui-corner-bottom { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
|
||||
.ui-corner-right { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
|
||||
.ui-corner-left { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; }
|
||||
.ui-corner-all { -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; }
|
||||
.ui-corner-all, .ui-corner-top, .ui-corner-left, .ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; -khtml-border-top-left-radius: 4px; border-top-left-radius: 4px; }
|
||||
.ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; -khtml-border-top-right-radius: 4px; border-top-right-radius: 4px; }
|
||||
.ui-corner-all, .ui-corner-bottom, .ui-corner-left, .ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; -khtml-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; }
|
||||
.ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; -khtml-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
|
||||
|
||||
/* Overlays */
|
||||
.ui-widget-overlay { background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); }
|
||||
.ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }/*
|
||||
* jQuery UI Resizable 1.8.12
|
||||
.ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -khtml-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }/*
|
||||
* jQuery UI Resizable 1.8.16
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
|
|
@ -302,12 +297,7 @@
|
|||
* http://docs.jquery.com/UI/Resizable#theming
|
||||
*/
|
||||
.ui-resizable { position: relative;}
|
||||
.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block;
|
||||
/* http://bugs.jqueryui.com/ticket/7233
|
||||
- Resizable: resizable handles fail to work in IE if transparent and content overlaps
|
||||
*/
|
||||
background-image:url(data:);
|
||||
}
|
||||
.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block; }
|
||||
.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; }
|
||||
.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; }
|
||||
.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; }
|
||||
|
|
@ -317,7 +307,7 @@
|
|||
.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; }
|
||||
.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; }
|
||||
.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/*
|
||||
* jQuery UI Selectable 1.8.12
|
||||
* jQuery UI Selectable 1.8.16
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
|
|
@ -327,7 +317,7 @@
|
|||
*/
|
||||
.ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; }
|
||||
/*
|
||||
* jQuery UI Accordion 1.8.12
|
||||
* jQuery UI Accordion 1.8.16
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
|
|
@ -346,7 +336,7 @@
|
|||
.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; }
|
||||
.ui-accordion .ui-accordion-content-active { display: block; }
|
||||
/*
|
||||
* jQuery UI Autocomplete 1.8.12
|
||||
* jQuery UI Autocomplete 1.8.16
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
|
|
@ -360,7 +350,7 @@
|
|||
* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */
|
||||
|
||||
/*
|
||||
* jQuery UI Menu 1.8.12
|
||||
* jQuery UI Menu 1.8.16
|
||||
*
|
||||
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
|
|
@ -399,7 +389,7 @@
|
|||
margin: -1px;
|
||||
}
|
||||
/*
|
||||
* jQuery UI Button 1.8.12
|
||||
* jQuery UI Button 1.8.16
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
|
|
@ -437,7 +427,7 @@ input.ui-button { padding: .4em 1em; }
|
|||
/* workarounds */
|
||||
button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */
|
||||
/*
|
||||
* jQuery UI Dialog 1.8.12
|
||||
* jQuery UI Dialog 1.8.16
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
|
|
@ -458,7 +448,7 @@ button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra pad
|
|||
.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
|
||||
.ui-draggable .ui-dialog-titlebar { cursor: move; }
|
||||
/*
|
||||
* jQuery UI Slider 1.8.12
|
||||
* jQuery UI Slider 1.8.16
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
|
|
@ -481,7 +471,7 @@ button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra pad
|
|||
.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
|
||||
.ui-slider-vertical .ui-slider-range-min { bottom: 0; }
|
||||
.ui-slider-vertical .ui-slider-range-max { top: 0; }/*
|
||||
* jQuery UI Tabs 1.8.12
|
||||
* jQuery UI Tabs 1.8.16
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
|
|
@ -499,7 +489,7 @@ button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra pad
|
|||
.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; }
|
||||
.ui-tabs .ui-tabs-hide { display: none !important; }
|
||||
/*
|
||||
* jQuery UI Datepicker 1.8.12
|
||||
* jQuery UI Datepicker 1.8.16
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
|
|
@ -507,7 +497,7 @@ button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra pad
|
|||
*
|
||||
* http://docs.jquery.com/UI/Datepicker#theming
|
||||
*/
|
||||
.ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; z-index:100 !important}
|
||||
.ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; }
|
||||
.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; }
|
||||
.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
|
||||
.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; }
|
||||
|
|
@ -539,7 +529,7 @@ button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra pad
|
|||
.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
|
||||
.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
|
||||
.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
|
||||
.ui-datepicker-row-break { clear:both; width:100%; }
|
||||
.ui-datepicker-row-break { clear:both; width:100%; font-size:0em; }
|
||||
|
||||
/* RTL support */
|
||||
.ui-datepicker-rtl { direction: rtl; }
|
||||
|
|
@ -566,7 +556,7 @@ button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra pad
|
|||
width: 200px; /*must have*/
|
||||
height: 200px; /*must have*/
|
||||
}/*
|
||||
* jQuery UI Progressbar 1.8.12
|
||||
* jQuery UI Progressbar 1.8.16
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
|
|
|
|||
1180
common/js/plugins/ui/jquery-ui.min.js
vendored
1180
common/js/plugins/ui/jquery-ui.min.js
vendored
File diff suppressed because it is too large
Load diff
526
common/js/plugins/ui/jquery-ui.packed.js
vendored
526
common/js/plugins/ui/jquery-ui.packed.js
vendored
|
|
@ -1,5 +1,5 @@
|
|||
/*!
|
||||
* jQuery UI 1.8.12
|
||||
* jQuery UI 1.8.16
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
|
|
@ -7,16 +7,17 @@
|
|||
*
|
||||
* http://docs.jquery.com/UI
|
||||
*/
|
||||
(function(c,j){function k(a){return!c(a).parents().andSelf().filter(function(){return c.curCSS(this,"visibility")==="hidden"||c.expr.filters.hidden(this)}).length}c.ui=c.ui||{};if(!c.ui.version){c.extend(c.ui,{version:"1.8.12",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,
|
||||
NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});c.fn.extend({_focus:c.fn.focus,focus:function(a,b){return typeof a==="number"?this.each(function(){var d=this;setTimeout(function(){c(d).focus();b&&b.call(d)},a)}):this._focus.apply(this,arguments)},scrollParent:function(){var a;a=c.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(c.curCSS(this,
|
||||
"position",1))&&/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!a.length?c(document):a},zIndex:function(a){if(a!==j)return this.css("zIndex",a);if(this.length){a=c(this[0]);for(var b;a.length&&a[0]!==document;){b=a.css("position");
|
||||
if(b==="absolute"||b==="relative"||b==="fixed"){b=parseInt(a.css("zIndex"),10);if(!isNaN(b)&&b!==0)return b}a=a.parent()}}return 0},disableSelection:function(){return this.bind((c.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(a){a.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});c.each(["Width","Height"],function(a,b){function d(f,g,l,m){c.each(e,function(){g-=parseFloat(c.curCSS(f,"padding"+this,true))||0;if(l)g-=parseFloat(c.curCSS(f,
|
||||
"border"+this+"Width",true))||0;if(m)g-=parseFloat(c.curCSS(f,"margin"+this,true))||0});return g}var e=b==="Width"?["Left","Right"]:["Top","Bottom"],h=b.toLowerCase(),i={innerWidth:c.fn.innerWidth,innerHeight:c.fn.innerHeight,outerWidth:c.fn.outerWidth,outerHeight:c.fn.outerHeight};c.fn["inner"+b]=function(f){if(f===j)return i["inner"+b].call(this);return this.each(function(){c(this).css(h,d(this,f)+"px")})};c.fn["outer"+b]=function(f,g){if(typeof f!=="number")return i["outer"+b].call(this,f);return this.each(function(){c(this).css(h,
|
||||
d(this,f,true,g)+"px")})}});c.extend(c.expr[":"],{data:function(a,b,d){return!!c.data(a,d[3])},focusable:function(a){var b=a.nodeName.toLowerCase(),d=c.attr(a,"tabindex");if("area"===b){b=a.parentNode;d=b.name;if(!a.href||!d||b.nodeName.toLowerCase()!=="map")return false;a=c("img[usemap=#"+d+"]")[0];return!!a&&k(a)}return(/input|select|textarea|button|object/.test(b)?!a.disabled:"a"==b?a.href||!isNaN(d):!isNaN(d))&&k(a)},tabbable:function(a){var b=c.attr(a,"tabindex");return(isNaN(b)||b>=0)&&c(a).is(":focusable")}});
|
||||
c(function(){var a=document.body,b=a.appendChild(b=document.createElement("div"));c.extend(b.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});c.support.minHeight=b.offsetHeight===100;c.support.selectstart="onselectstart"in b;a.removeChild(b).style.display="none"});c.extend(c.ui,{plugin:{add:function(a,b,d){a=c.ui[a].prototype;for(var e in d){a.plugins[e]=a.plugins[e]||[];a.plugins[e].push([b,d[e]])}},call:function(a,b,d){if((b=a.plugins[b])&&a.element[0].parentNode)for(var e=0;e<b.length;e++)a.options[b[e][0]]&&
|
||||
b[e][1].apply(a.element,d)}},contains:function(a,b){return document.compareDocumentPosition?a.compareDocumentPosition(b)&16:a!==b&&a.contains(b)},hasScroll:function(a,b){if(c(a).css("overflow")==="hidden")return false;b=b&&b==="left"?"scrollLeft":"scrollTop";var d=false;if(a[b]>0)return true;a[b]=1;d=a[b]>0;a[b]=0;return d},isOverAxis:function(a,b,d){return a>b&&a<b+d},isOver:function(a,b,d,e,h,i){return c.ui.isOverAxis(a,d,h)&&c.ui.isOverAxis(b,e,i)}})}})(jQuery);
|
||||
(function(c,j){function k(a,b){var d=a.nodeName.toLowerCase();if("area"===d){b=a.parentNode;d=b.name;if(!a.href||!d||b.nodeName.toLowerCase()!=="map")return false;a=c("img[usemap=#"+d+"]")[0];return!!a&&l(a)}return(/input|select|textarea|button|object/.test(d)?!a.disabled:"a"==d?a.href||b:b)&&l(a)}function l(a){return!c(a).parents().andSelf().filter(function(){return c.curCSS(this,"visibility")==="hidden"||c.expr.filters.hidden(this)}).length}c.ui=c.ui||{};if(!c.ui.version){c.extend(c.ui,{version:"1.8.16",
|
||||
keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});c.fn.extend({propAttr:c.fn.prop||c.fn.attr,_focus:c.fn.focus,focus:function(a,b){return typeof a==="number"?this.each(function(){var d=
|
||||
this;setTimeout(function(){c(d).focus();b&&b.call(d)},a)}):this._focus.apply(this,arguments)},scrollParent:function(){var a;a=c.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(c.curCSS(this,"position",1))&&/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(c.curCSS(this,
|
||||
"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!a.length?c(document):a},zIndex:function(a){if(a!==j)return this.css("zIndex",a);if(this.length){a=c(this[0]);for(var b;a.length&&a[0]!==document;){b=a.css("position");if(b==="absolute"||b==="relative"||b==="fixed"){b=parseInt(a.css("zIndex"),10);if(!isNaN(b)&&b!==0)return b}a=a.parent()}}return 0},disableSelection:function(){return this.bind((c.support.selectstart?"selectstart":
|
||||
"mousedown")+".ui-disableSelection",function(a){a.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});c.each(["Width","Height"],function(a,b){function d(f,g,m,n){c.each(e,function(){g-=parseFloat(c.curCSS(f,"padding"+this,true))||0;if(m)g-=parseFloat(c.curCSS(f,"border"+this+"Width",true))||0;if(n)g-=parseFloat(c.curCSS(f,"margin"+this,true))||0});return g}var e=b==="Width"?["Left","Right"]:["Top","Bottom"],h=b.toLowerCase(),i={innerWidth:c.fn.innerWidth,innerHeight:c.fn.innerHeight,
|
||||
outerWidth:c.fn.outerWidth,outerHeight:c.fn.outerHeight};c.fn["inner"+b]=function(f){if(f===j)return i["inner"+b].call(this);return this.each(function(){c(this).css(h,d(this,f)+"px")})};c.fn["outer"+b]=function(f,g){if(typeof f!=="number")return i["outer"+b].call(this,f);return this.each(function(){c(this).css(h,d(this,f,true,g)+"px")})}});c.extend(c.expr[":"],{data:function(a,b,d){return!!c.data(a,d[3])},focusable:function(a){return k(a,!isNaN(c.attr(a,"tabindex")))},tabbable:function(a){var b=c.attr(a,
|
||||
"tabindex"),d=isNaN(b);return(d||b>=0)&&k(a,!d)}});c(function(){var a=document.body,b=a.appendChild(b=document.createElement("div"));c.extend(b.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});c.support.minHeight=b.offsetHeight===100;c.support.selectstart="onselectstart"in b;a.removeChild(b).style.display="none"});c.extend(c.ui,{plugin:{add:function(a,b,d){a=c.ui[a].prototype;for(var e in d){a.plugins[e]=a.plugins[e]||[];a.plugins[e].push([b,d[e]])}},call:function(a,b,d){if((b=a.plugins[b])&&
|
||||
a.element[0].parentNode)for(var e=0;e<b.length;e++)a.options[b[e][0]]&&b[e][1].apply(a.element,d)}},contains:function(a,b){return document.compareDocumentPosition?a.compareDocumentPosition(b)&16:a!==b&&a.contains(b)},hasScroll:function(a,b){if(c(a).css("overflow")==="hidden")return false;b=b&&b==="left"?"scrollLeft":"scrollTop";var d=false;if(a[b]>0)return true;a[b]=1;d=a[b]>0;a[b]=0;return d},isOverAxis:function(a,b,d){return a>b&&a<b+d},isOver:function(a,b,d,e,h,i){return c.ui.isOverAxis(a,d,h)&&
|
||||
c.ui.isOverAxis(b,e,i)}})}})(jQuery);
|
||||
;/*!
|
||||
* jQuery UI Widget 1.8.12
|
||||
* jQuery UI Widget 1.8.16
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
|
|
@ -24,14 +25,14 @@ b[e][1].apply(a.element,d)}},contains:function(a,b){return document.compareDocum
|
|||
*
|
||||
* http://docs.jquery.com/UI/Widget
|
||||
*/
|
||||
(function(b,j){if(b.cleanData){var k=b.cleanData;b.cleanData=function(a){for(var c=0,d;(d=a[c])!=null;c++)b(d).triggerHandler("remove");k(a)}}else{var l=b.fn.remove;b.fn.remove=function(a,c){return this.each(function(){if(!c)if(!a||b.filter(a,[this]).length)b("*",this).add([this]).each(function(){b(this).triggerHandler("remove")});return l.call(b(this),a,c)})}}b.widget=function(a,c,d){var e=a.split(".")[0],f;a=a.split(".")[1];f=e+"-"+a;if(!d){d=c;c=b.Widget}b.expr[":"][f]=function(h){return!!b.data(h,
|
||||
a)};b[e]=b[e]||{};b[e][a]=function(h,g){arguments.length&&this._createWidget(h,g)};c=new c;c.options=b.extend(true,{},c.options);b[e][a].prototype=b.extend(true,c,{namespace:e,widgetName:a,widgetEventPrefix:b[e][a].prototype.widgetEventPrefix||a,widgetBaseClass:f},d);b.widget.bridge(a,b[e][a])};b.widget.bridge=function(a,c){b.fn[a]=function(d){var e=typeof d==="string",f=Array.prototype.slice.call(arguments,1),h=this;d=!e&&f.length?b.extend.apply(null,[true,d].concat(f)):d;if(e&&d.charAt(0)==="_")return h;
|
||||
e?this.each(function(){var g=b.data(this,a),i=g&&b.isFunction(g[d])?g[d].apply(g,f):g;if(i!==g&&i!==j){h=i;return false}}):this.each(function(){var g=b.data(this,a);g?g.option(d||{})._init():b.data(this,a,new c(d,this))});return h}};b.Widget=function(a,c){arguments.length&&this._createWidget(a,c)};b.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(a,c){b.data(c,this.widgetName,this);this.element=b(c);this.options=b.extend(true,{},this.options,
|
||||
this._getCreateOptions(),a);var d=this;this.element.bind("remove."+this.widgetName,function(){d.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){return b.metadata&&b.metadata.get(this.element[0])[this.widgetName]},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},
|
||||
widget:function(){return this.element},option:function(a,c){var d=a;if(arguments.length===0)return b.extend({},this.options);if(typeof a==="string"){if(c===j)return this.options[a];d={};d[a]=c}this._setOptions(d);return this},_setOptions:function(a){var c=this;b.each(a,function(d,e){c._setOption(d,e)});return this},_setOption:function(a,c){this.options[a]=c;if(a==="disabled")this.widget()[c?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",c);return this},
|
||||
enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(a,c,d){var e=this.options[a];c=b.Event(c);c.type=(a===this.widgetEventPrefix?a:this.widgetEventPrefix+a).toLowerCase();d=d||{};if(c.originalEvent){a=b.event.props.length;for(var f;a;){f=b.event.props[--a];c[f]=c.originalEvent[f]}}this.element.trigger(c,d);return!(b.isFunction(e)&&e.call(this.element[0],c,d)===false||c.isDefaultPrevented())}}})(jQuery);
|
||||
(function(b,j){if(b.cleanData){var k=b.cleanData;b.cleanData=function(a){for(var c=0,d;(d=a[c])!=null;c++)try{b(d).triggerHandler("remove")}catch(e){}k(a)}}else{var l=b.fn.remove;b.fn.remove=function(a,c){return this.each(function(){if(!c)if(!a||b.filter(a,[this]).length)b("*",this).add([this]).each(function(){try{b(this).triggerHandler("remove")}catch(d){}});return l.call(b(this),a,c)})}}b.widget=function(a,c,d){var e=a.split(".")[0],f;a=a.split(".")[1];f=e+"-"+a;if(!d){d=c;c=b.Widget}b.expr[":"][f]=
|
||||
function(h){return!!b.data(h,a)};b[e]=b[e]||{};b[e][a]=function(h,g){arguments.length&&this._createWidget(h,g)};c=new c;c.options=b.extend(true,{},c.options);b[e][a].prototype=b.extend(true,c,{namespace:e,widgetName:a,widgetEventPrefix:b[e][a].prototype.widgetEventPrefix||a,widgetBaseClass:f},d);b.widget.bridge(a,b[e][a])};b.widget.bridge=function(a,c){b.fn[a]=function(d){var e=typeof d==="string",f=Array.prototype.slice.call(arguments,1),h=this;d=!e&&f.length?b.extend.apply(null,[true,d].concat(f)):
|
||||
d;if(e&&d.charAt(0)==="_")return h;e?this.each(function(){var g=b.data(this,a),i=g&&b.isFunction(g[d])?g[d].apply(g,f):g;if(i!==g&&i!==j){h=i;return false}}):this.each(function(){var g=b.data(this,a);g?g.option(d||{})._init():b.data(this,a,new c(d,this))});return h}};b.Widget=function(a,c){arguments.length&&this._createWidget(a,c)};b.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(a,c){b.data(c,this.widgetName,this);this.element=b(c);this.options=
|
||||
b.extend(true,{},this.options,this._getCreateOptions(),a);var d=this;this.element.bind("remove."+this.widgetName,function(){d.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){return b.metadata&&b.metadata.get(this.element[0])[this.widgetName]},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+
|
||||
"-disabled ui-state-disabled")},widget:function(){return this.element},option:function(a,c){var d=a;if(arguments.length===0)return b.extend({},this.options);if(typeof a==="string"){if(c===j)return this.options[a];d={};d[a]=c}this._setOptions(d);return this},_setOptions:function(a){var c=this;b.each(a,function(d,e){c._setOption(d,e)});return this},_setOption:function(a,c){this.options[a]=c;if(a==="disabled")this.widget()[c?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",
|
||||
c);return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(a,c,d){var e=this.options[a];c=b.Event(c);c.type=(a===this.widgetEventPrefix?a:this.widgetEventPrefix+a).toLowerCase();d=d||{};if(c.originalEvent){a=b.event.props.length;for(var f;a;){f=b.event.props[--a];c[f]=c.originalEvent[f]}}this.element.trigger(c,d);return!(b.isFunction(e)&&e.call(this.element[0],c,d)===false||c.isDefaultPrevented())}}})(jQuery);
|
||||
;/*!
|
||||
* jQuery UI Mouse 1.8.12
|
||||
* jQuery UI Mouse 1.8.16
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
|
|
@ -42,13 +43,13 @@ enable:function(){return this._setOption("disabled",false)},disable:function(){r
|
|||
* Depends:
|
||||
* jquery.ui.widget.js
|
||||
*/
|
||||
(function(b){b.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var a=this;this.element.bind("mousedown."+this.widgetName,function(c){return a._mouseDown(c)}).bind("click."+this.widgetName,function(c){if(true===b.data(c.target,a.widgetName+".preventClickEvent")){b.removeData(c.target,a.widgetName+".preventClickEvent");c.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName)},_mouseDown:function(a){a.originalEvent=
|
||||
a.originalEvent||{};if(!a.originalEvent.mouseHandled){this._mouseStarted&&this._mouseUp(a);this._mouseDownEvent=a;var c=this,e=a.which==1,f=typeof this.options.cancel=="string"?b(a.target).parents().add(a.target).filter(this.options.cancel).length:false;if(!e||f||!this._mouseCapture(a))return true;this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet)this._mouseDelayTimer=setTimeout(function(){c.mouseDelayMet=true},this.options.delay);if(this._mouseDistanceMet(a)&&this._mouseDelayMet(a)){this._mouseStarted=
|
||||
this._mouseStart(a)!==false;if(!this._mouseStarted){a.preventDefault();return true}}true===b.data(a.target,this.widgetName+".preventClickEvent")&&b.removeData(a.target,this.widgetName+".preventClickEvent");this._mouseMoveDelegate=function(d){return c._mouseMove(d)};this._mouseUpDelegate=function(d){return c._mouseUp(d)};b(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);a.preventDefault();return a.originalEvent.mouseHandled=
|
||||
true}},_mouseMove:function(a){if(b.browser.msie&&!(document.documentMode>=9)&&!a.button)return this._mouseUp(a);if(this._mouseStarted){this._mouseDrag(a);return a.preventDefault()}if(this._mouseDistanceMet(a)&&this._mouseDelayMet(a))(this._mouseStarted=this._mouseStart(this._mouseDownEvent,a)!==false)?this._mouseDrag(a):this._mouseUp(a);return!this._mouseStarted},_mouseUp:function(a){b(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);
|
||||
if(this._mouseStarted){this._mouseStarted=false;a.target==this._mouseDownEvent.target&&b.data(a.target,this.widgetName+".preventClickEvent",true);this._mouseStop(a)}return false},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return true}})})(jQuery);
|
||||
(function(b){var d=false;b(document).mouseup(function(){d=false});b.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var a=this;this.element.bind("mousedown."+this.widgetName,function(c){return a._mouseDown(c)}).bind("click."+this.widgetName,function(c){if(true===b.data(c.target,a.widgetName+".preventClickEvent")){b.removeData(c.target,a.widgetName+".preventClickEvent");c.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+
|
||||
this.widgetName)},_mouseDown:function(a){if(!d){this._mouseStarted&&this._mouseUp(a);this._mouseDownEvent=a;var c=this,f=a.which==1,g=typeof this.options.cancel=="string"&&a.target.nodeName?b(a.target).closest(this.options.cancel).length:false;if(!f||g||!this._mouseCapture(a))return true;this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet)this._mouseDelayTimer=setTimeout(function(){c.mouseDelayMet=true},this.options.delay);if(this._mouseDistanceMet(a)&&this._mouseDelayMet(a)){this._mouseStarted=
|
||||
this._mouseStart(a)!==false;if(!this._mouseStarted){a.preventDefault();return true}}true===b.data(a.target,this.widgetName+".preventClickEvent")&&b.removeData(a.target,this.widgetName+".preventClickEvent");this._mouseMoveDelegate=function(e){return c._mouseMove(e)};this._mouseUpDelegate=function(e){return c._mouseUp(e)};b(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);a.preventDefault();return d=true}},_mouseMove:function(a){if(b.browser.msie&&
|
||||
!(document.documentMode>=9)&&!a.button)return this._mouseUp(a);if(this._mouseStarted){this._mouseDrag(a);return a.preventDefault()}if(this._mouseDistanceMet(a)&&this._mouseDelayMet(a))(this._mouseStarted=this._mouseStart(this._mouseDownEvent,a)!==false)?this._mouseDrag(a):this._mouseUp(a);return!this._mouseStarted},_mouseUp:function(a){b(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=
|
||||
false;a.target==this._mouseDownEvent.target&&b.data(a.target,this.widgetName+".preventClickEvent",true);this._mouseStop(a)}return false},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return true}})})(jQuery);
|
||||
;/*
|
||||
* jQuery UI Position 1.8.12
|
||||
* jQuery UI Position 1.8.16
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
|
|
@ -64,7 +65,7 @@ d>0?b.left-d:Math.max(b.left-a.collisionPosition.left,b.left)},top:function(b,a)
|
|||
a.collisionPosition.left<0?g+e+h:d>0?g+e+h:0}},top:function(b,a){if(a.at[1]!=="center"){var d=c(window);d=a.collisionPosition.top+a.collisionHeight-d.height()-d.scrollTop();var g=a.my[1]==="top"?-a.elemHeight:a.my[1]==="bottom"?a.elemHeight:0,e=a.at[1]==="top"?a.targetHeight:-a.targetHeight,h=-2*a.offset[1];b.top+=a.collisionPosition.top<0?g+e+h:d>0?g+e+h:0}}}};if(!c.offset.setOffset){c.offset.setOffset=function(b,a){if(/static/.test(c.curCSS(b,"position")))b.style.position="relative";var d=c(b),
|
||||
g=d.offset(),e=parseInt(c.curCSS(b,"top",true),10)||0,h=parseInt(c.curCSS(b,"left",true),10)||0;g={top:a.top-g.top+e,left:a.left-g.left+h};"using"in a?a.using.call(b,g):d.css(g)};c.fn.offset=function(b){var a=this[0];if(!a||!a.ownerDocument)return null;if(b)return this.each(function(){c.offset.setOffset(this,b)});return u.call(this)}}})(jQuery);
|
||||
;/*
|
||||
* jQuery UI Draggable 1.8.12
|
||||
* jQuery UI Draggable 1.8.16
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
|
|
@ -79,42 +80,42 @@ g=d.offset(),e=parseInt(c.curCSS(b,"top",true),10)||0,h=parseInt(c.curCSS(b,"lef
|
|||
*/
|
||||
(function(d){d.widget("ui.draggable",d.ui.mouse,{widgetEventPrefix:"drag",options:{addClasses:true,appendTo:"parent",axis:false,connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false},_create:function(){if(this.options.helper==
|
||||
"original"&&!/^(?:r|a|f)/.test(this.element.css("position")))this.element[0].style.position="relative";this.options.addClasses&&this.element.addClass("ui-draggable");this.options.disabled&&this.element.addClass("ui-draggable-disabled");this._mouseInit()},destroy:function(){if(this.element.data("draggable")){this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy();return this}},_mouseCapture:function(a){var b=
|
||||
this.options;if(this.helper||b.disabled||d(a.target).is(".ui-resizable-handle"))return false;this.handle=this._getHandle(a);if(!this.handle)return false;return true},_mouseStart:function(a){var b=this.options;this.helper=this._createHelper(a);this._cacheHelperProportions();if(d.ui.ddmanager)d.ui.ddmanager.current=this;this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.positionAbs=this.element.offset();this.offset={top:this.offset.top-
|
||||
this.margins.top,left:this.offset.left-this.margins.left};d.extend(this.offset,{click:{left:a.pageX-this.offset.left,top:a.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this.position=this._generatePosition(a);this.originalPageX=a.pageX;this.originalPageY=a.pageY;b.cursorAt&&this._adjustOffsetFromHelper(b.cursorAt);b.containment&&this._setContainment();if(this._trigger("start",a)===false){this._clear();return false}this._cacheHelperProportions();
|
||||
d.ui.ddmanager&&!b.dropBehaviour&&d.ui.ddmanager.prepareOffsets(this,a);this.helper.addClass("ui-draggable-dragging");this._mouseDrag(a,true);return true},_mouseDrag:function(a,b){this.position=this._generatePosition(a);this.positionAbs=this._convertPositionTo("absolute");if(!b){b=this._uiHash();if(this._trigger("drag",a,b)===false){this._mouseUp({});return false}this.position=b.position}if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||
|
||||
this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";d.ui.ddmanager&&d.ui.ddmanager.drag(this,a);return false},_mouseStop:function(a){var b=false;if(d.ui.ddmanager&&!this.options.dropBehaviour)b=d.ui.ddmanager.drop(this,a);if(this.dropped){b=this.dropped;this.dropped=false}if((!this.element[0]||!this.element[0].parentNode)&&this.options.helper=="original")return false;if(this.options.revert=="invalid"&&!b||this.options.revert=="valid"&&b||this.options.revert===true||d.isFunction(this.options.revert)&&
|
||||
this.options.revert.call(this.element,b)){var c=this;d(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){c._trigger("stop",a)!==false&&c._clear()})}else this._trigger("stop",a)!==false&&this._clear();return false},cancel:function(){this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear();return this},_getHandle:function(a){var b=!this.options.handle||!d(this.options.handle,this.element).length?true:false;d(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==
|
||||
a.target)b=true});return b},_createHelper:function(a){var b=this.options;a=d.isFunction(b.helper)?d(b.helper.apply(this.element[0],[a])):b.helper=="clone"?this.element.clone():this.element;a.parents("body").length||a.appendTo(b.appendTo=="parent"?this.element[0].parentNode:b.appendTo);a[0]!=this.element[0]&&!/(fixed|absolute)/.test(a.css("position"))&&a.css("position","absolute");return a},_adjustOffsetFromHelper:function(a){if(typeof a=="string")a=a.split(" ");if(d.isArray(a))a={left:+a[0],top:+a[1]||
|
||||
0};if("left"in a)this.offset.click.left=a.left+this.margins.left;if("right"in a)this.offset.click.left=this.helperProportions.width-a.right+this.margins.left;if("top"in a)this.offset.click.top=a.top+this.margins.top;if("bottom"in a)this.offset.click.top=this.helperProportions.height-a.bottom+this.margins.top},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var a=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],
|
||||
this.offsetParent[0])){a.left+=this.scrollParent.scrollLeft();a.top+=this.scrollParent.scrollTop()}if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&d.browser.msie)a={top:0,left:0};return{top:a.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:a.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var a=this.element.position();return{top:a.top-
|
||||
(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),
|
||||
height:this.helper.outerHeight()}},_setContainment:function(){var a=this.options;if(a.containment=="parent")a.containment=this.helper[0].parentNode;if(a.containment=="document"||a.containment=="window")this.containment=[(a.containment=="document"?0:d(window).scrollLeft())-this.offset.relative.left-this.offset.parent.left,(a.containment=="document"?0:d(window).scrollTop())-this.offset.relative.top-this.offset.parent.top,(a.containment=="document"?0:d(window).scrollLeft())+d(a.containment=="document"?
|
||||
document:window).width()-this.helperProportions.width-this.margins.left,(a.containment=="document"?0:d(window).scrollTop())+(d(a.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(a.containment)&&a.containment.constructor!=Array){var b=d(a.containment)[0];if(b){a=d(a.containment).offset();var c=d(b).css("overflow")!="hidden";this.containment=[a.left+(parseInt(d(b).css("borderLeftWidth"),
|
||||
10)||0)+(parseInt(d(b).css("paddingLeft"),10)||0),a.top+(parseInt(d(b).css("borderTopWidth"),10)||0)+(parseInt(d(b).css("paddingTop"),10)||0),a.left+(c?Math.max(b.scrollWidth,b.offsetWidth):b.offsetWidth)-(parseInt(d(b).css("borderLeftWidth"),10)||0)-(parseInt(d(b).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,a.top+(c?Math.max(b.scrollHeight,b.offsetHeight):b.offsetHeight)-(parseInt(d(b).css("borderTopWidth"),10)||0)-(parseInt(d(b).css("paddingBottom"),
|
||||
10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom]}}else if(a.containment.constructor==Array)this.containment=a.containment},_convertPositionTo:function(a,b){if(!b)b=this.position;a=a=="absolute"?1:-1;var c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,f=/(html|body)/i.test(c[0].tagName);return{top:b.top+this.offset.relative.top*a+this.offset.parent.top*a-(d.browser.safari&&
|
||||
d.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():f?0:c.scrollTop())*a),left:b.left+this.offset.relative.left*a+this.offset.parent.left*a-(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():f?0:c.scrollLeft())*a)}},_generatePosition:function(a){var b=this.options,c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],
|
||||
this.offsetParent[0]))?this.offsetParent:this.scrollParent,f=/(html|body)/i.test(c[0].tagName),e=a.pageX,g=a.pageY;if(this.originalPosition){if(this.containment){if(a.pageX-this.offset.click.left<this.containment[0])e=this.containment[0]+this.offset.click.left;if(a.pageY-this.offset.click.top<this.containment[1])g=this.containment[1]+this.offset.click.top;if(a.pageX-this.offset.click.left>this.containment[2])e=this.containment[2]+this.offset.click.left;if(a.pageY-this.offset.click.top>this.containment[3])g=
|
||||
this.containment[3]+this.offset.click.top}if(b.grid){g=this.originalPageY+Math.round((g-this.originalPageY)/b.grid[1])*b.grid[1];g=this.containment?!(g-this.offset.click.top<this.containment[1]||g-this.offset.click.top>this.containment[3])?g:!(g-this.offset.click.top<this.containment[1])?g-b.grid[1]:g+b.grid[1]:g;e=this.originalPageX+Math.round((e-this.originalPageX)/b.grid[0])*b.grid[0];e=this.containment?!(e-this.offset.click.left<this.containment[0]||e-this.offset.click.left>this.containment[2])?
|
||||
e:!(e-this.offset.click.left<this.containment[0])?e-b.grid[0]:e+b.grid[0]:e}}return{top:g-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():f?0:c.scrollTop()),left:e-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():
|
||||
f?0:c.scrollLeft())}},_clear:function(){this.helper.removeClass("ui-draggable-dragging");this.helper[0]!=this.element[0]&&!this.cancelHelperRemoval&&this.helper.remove();this.helper=null;this.cancelHelperRemoval=false},_trigger:function(a,b,c){c=c||this._uiHash();d.ui.plugin.call(this,a,[b,c]);if(a=="drag")this.positionAbs=this._convertPositionTo("absolute");return d.Widget.prototype._trigger.call(this,a,b,c)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,
|
||||
offset:this.positionAbs}}});d.extend(d.ui.draggable,{version:"1.8.12"});d.ui.plugin.add("draggable","connectToSortable",{start:function(a,b){var c=d(this).data("draggable"),f=c.options,e=d.extend({},b,{item:c.element});c.sortables=[];d(f.connectToSortable).each(function(){var g=d.data(this,"sortable");if(g&&!g.options.disabled){c.sortables.push({instance:g,shouldRevert:g.options.revert});g.refreshPositions();g._trigger("activate",a,e)}})},stop:function(a,b){var c=d(this).data("draggable"),f=d.extend({},
|
||||
b,{item:c.element});d.each(c.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;c.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert)this.instance.options.revert=true;this.instance._mouseStop(a);this.instance.options.helper=this.instance.options._helper;c.options.helper=="original"&&this.instance.currentItem.css({top:"auto",left:"auto"})}else{this.instance.cancelHelperRemoval=false;this.instance._trigger("deactivate",a,f)}})},drag:function(a,b){var c=
|
||||
d(this).data("draggable"),f=this;d.each(c.sortables,function(){this.instance.positionAbs=c.positionAbs;this.instance.helperProportions=c.helperProportions;this.instance.offset.click=c.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=d(f).clone().appendTo(this.instance.element).data("sortable-item",true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return b.helper[0]};
|
||||
a.target=this.instance.currentItem[0];this.instance._mouseCapture(a,true);this.instance._mouseStart(a,true,true);this.instance.offset.click.top=c.offset.click.top;this.instance.offset.click.left=c.offset.click.left;this.instance.offset.parent.left-=c.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=c.offset.parent.top-this.instance.offset.parent.top;c._trigger("toSortable",a);c.dropped=this.instance.element;c.currentItem=c.element;this.instance.fromOutside=c}this.instance.currentItem&&
|
||||
this.instance._mouseDrag(a)}else if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._trigger("out",a,this.instance._uiHash(this.instance));this.instance._mouseStop(a,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();this.instance.placeholder&&this.instance.placeholder.remove();c._trigger("fromSortable",a);c.dropped=false}})}});d.ui.plugin.add("draggable","cursor",
|
||||
{start:function(){var a=d("body"),b=d(this).data("draggable").options;if(a.css("cursor"))b._cursor=a.css("cursor");a.css("cursor",b.cursor)},stop:function(){var a=d(this).data("draggable").options;a._cursor&&d("body").css("cursor",a._cursor)}});d.ui.plugin.add("draggable","iframeFix",{start:function(){var a=d(this).data("draggable").options;d(a.iframeFix===true?"iframe":a.iframeFix).each(function(){d('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+
|
||||
"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1E3}).css(d(this).offset()).appendTo("body")})},stop:function(){d("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)})}});d.ui.plugin.add("draggable","opacity",{start:function(a,b){a=d(b.helper);b=d(this).data("draggable").options;if(a.css("opacity"))b._opacity=a.css("opacity");a.css("opacity",b.opacity)},stop:function(a,b){a=d(this).data("draggable").options;a._opacity&&d(b.helper).css("opacity",
|
||||
a._opacity)}});d.ui.plugin.add("draggable","scroll",{start:function(){var a=d(this).data("draggable");if(a.scrollParent[0]!=document&&a.scrollParent[0].tagName!="HTML")a.overflowOffset=a.scrollParent.offset()},drag:function(a){var b=d(this).data("draggable"),c=b.options,f=false;if(b.scrollParent[0]!=document&&b.scrollParent[0].tagName!="HTML"){if(!c.axis||c.axis!="x")if(b.overflowOffset.top+b.scrollParent[0].offsetHeight-a.pageY<c.scrollSensitivity)b.scrollParent[0].scrollTop=f=b.scrollParent[0].scrollTop+
|
||||
c.scrollSpeed;else if(a.pageY-b.overflowOffset.top<c.scrollSensitivity)b.scrollParent[0].scrollTop=f=b.scrollParent[0].scrollTop-c.scrollSpeed;if(!c.axis||c.axis!="y")if(b.overflowOffset.left+b.scrollParent[0].offsetWidth-a.pageX<c.scrollSensitivity)b.scrollParent[0].scrollLeft=f=b.scrollParent[0].scrollLeft+c.scrollSpeed;else if(a.pageX-b.overflowOffset.left<c.scrollSensitivity)b.scrollParent[0].scrollLeft=f=b.scrollParent[0].scrollLeft-c.scrollSpeed}else{if(!c.axis||c.axis!="x")if(a.pageY-d(document).scrollTop()<
|
||||
c.scrollSensitivity)f=d(document).scrollTop(d(document).scrollTop()-c.scrollSpeed);else if(d(window).height()-(a.pageY-d(document).scrollTop())<c.scrollSensitivity)f=d(document).scrollTop(d(document).scrollTop()+c.scrollSpeed);if(!c.axis||c.axis!="y")if(a.pageX-d(document).scrollLeft()<c.scrollSensitivity)f=d(document).scrollLeft(d(document).scrollLeft()-c.scrollSpeed);else if(d(window).width()-(a.pageX-d(document).scrollLeft())<c.scrollSensitivity)f=d(document).scrollLeft(d(document).scrollLeft()+
|
||||
c.scrollSpeed)}f!==false&&d.ui.ddmanager&&!c.dropBehaviour&&d.ui.ddmanager.prepareOffsets(b,a)}});d.ui.plugin.add("draggable","snap",{start:function(){var a=d(this).data("draggable"),b=a.options;a.snapElements=[];d(b.snap.constructor!=String?b.snap.items||":data(draggable)":b.snap).each(function(){var c=d(this),f=c.offset();this!=a.element[0]&&a.snapElements.push({item:this,width:c.outerWidth(),height:c.outerHeight(),top:f.top,left:f.left})})},drag:function(a,b){for(var c=d(this).data("draggable"),
|
||||
f=c.options,e=f.snapTolerance,g=b.offset.left,n=g+c.helperProportions.width,m=b.offset.top,o=m+c.helperProportions.height,h=c.snapElements.length-1;h>=0;h--){var i=c.snapElements[h].left,k=i+c.snapElements[h].width,j=c.snapElements[h].top,l=j+c.snapElements[h].height;if(i-e<g&&g<k+e&&j-e<m&&m<l+e||i-e<g&&g<k+e&&j-e<o&&o<l+e||i-e<n&&n<k+e&&j-e<m&&m<l+e||i-e<n&&n<k+e&&j-e<o&&o<l+e){if(f.snapMode!="inner"){var p=Math.abs(j-o)<=e,q=Math.abs(l-m)<=e,r=Math.abs(i-n)<=e,s=Math.abs(k-g)<=e;if(p)b.position.top=
|
||||
c._convertPositionTo("relative",{top:j-c.helperProportions.height,left:0}).top-c.margins.top;if(q)b.position.top=c._convertPositionTo("relative",{top:l,left:0}).top-c.margins.top;if(r)b.position.left=c._convertPositionTo("relative",{top:0,left:i-c.helperProportions.width}).left-c.margins.left;if(s)b.position.left=c._convertPositionTo("relative",{top:0,left:k}).left-c.margins.left}var t=p||q||r||s;if(f.snapMode!="outer"){p=Math.abs(j-m)<=e;q=Math.abs(l-o)<=e;r=Math.abs(i-g)<=e;s=Math.abs(k-n)<=e;if(p)b.position.top=
|
||||
c._convertPositionTo("relative",{top:j,left:0}).top-c.margins.top;if(q)b.position.top=c._convertPositionTo("relative",{top:l-c.helperProportions.height,left:0}).top-c.margins.top;if(r)b.position.left=c._convertPositionTo("relative",{top:0,left:i}).left-c.margins.left;if(s)b.position.left=c._convertPositionTo("relative",{top:0,left:k-c.helperProportions.width}).left-c.margins.left}if(!c.snapElements[h].snapping&&(p||q||r||s||t))c.options.snap.snap&&c.options.snap.snap.call(c.element,a,d.extend(c._uiHash(),
|
||||
{snapItem:c.snapElements[h].item}));c.snapElements[h].snapping=p||q||r||s||t}else{c.snapElements[h].snapping&&c.options.snap.release&&c.options.snap.release.call(c.element,a,d.extend(c._uiHash(),{snapItem:c.snapElements[h].item}));c.snapElements[h].snapping=false}}}});d.ui.plugin.add("draggable","stack",{start:function(){var a=d(this).data("draggable").options;a=d.makeArray(d(a.stack)).sort(function(c,f){return(parseInt(d(c).css("zIndex"),10)||0)-(parseInt(d(f).css("zIndex"),10)||0)});if(a.length){var b=
|
||||
parseInt(a[0].style.zIndex)||0;d(a).each(function(c){this.style.zIndex=b+c});this[0].style.zIndex=b+a.length}}});d.ui.plugin.add("draggable","zIndex",{start:function(a,b){a=d(b.helper);b=d(this).data("draggable").options;if(a.css("zIndex"))b._zIndex=a.css("zIndex");a.css("zIndex",b.zIndex)},stop:function(a,b){a=d(this).data("draggable").options;a._zIndex&&d(b.helper).css("zIndex",a._zIndex)}})})(jQuery);
|
||||
this.options;if(this.helper||b.disabled||d(a.target).is(".ui-resizable-handle"))return false;this.handle=this._getHandle(a);if(!this.handle)return false;if(b.iframeFix)d(b.iframeFix===true?"iframe":b.iframeFix).each(function(){d('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1E3}).css(d(this).offset()).appendTo("body")});return true},_mouseStart:function(a){var b=this.options;
|
||||
this.helper=this._createHelper(a);this._cacheHelperProportions();if(d.ui.ddmanager)d.ui.ddmanager.current=this;this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.positionAbs=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};d.extend(this.offset,{click:{left:a.pageX-this.offset.left,top:a.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});
|
||||
this.originalPosition=this.position=this._generatePosition(a);this.originalPageX=a.pageX;this.originalPageY=a.pageY;b.cursorAt&&this._adjustOffsetFromHelper(b.cursorAt);b.containment&&this._setContainment();if(this._trigger("start",a)===false){this._clear();return false}this._cacheHelperProportions();d.ui.ddmanager&&!b.dropBehaviour&&d.ui.ddmanager.prepareOffsets(this,a);this.helper.addClass("ui-draggable-dragging");this._mouseDrag(a,true);d.ui.ddmanager&&d.ui.ddmanager.dragStart(this,a);return true},
|
||||
_mouseDrag:function(a,b){this.position=this._generatePosition(a);this.positionAbs=this._convertPositionTo("absolute");if(!b){b=this._uiHash();if(this._trigger("drag",a,b)===false){this._mouseUp({});return false}this.position=b.position}if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";d.ui.ddmanager&&d.ui.ddmanager.drag(this,a);return false},_mouseStop:function(a){var b=
|
||||
false;if(d.ui.ddmanager&&!this.options.dropBehaviour)b=d.ui.ddmanager.drop(this,a);if(this.dropped){b=this.dropped;this.dropped=false}if((!this.element[0]||!this.element[0].parentNode)&&this.options.helper=="original")return false;if(this.options.revert=="invalid"&&!b||this.options.revert=="valid"&&b||this.options.revert===true||d.isFunction(this.options.revert)&&this.options.revert.call(this.element,b)){var c=this;d(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,
|
||||
10),function(){c._trigger("stop",a)!==false&&c._clear()})}else this._trigger("stop",a)!==false&&this._clear();return false},_mouseUp:function(a){this.options.iframeFix===true&&d("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)});d.ui.ddmanager&&d.ui.ddmanager.dragStop(this,a);return d.ui.mouse.prototype._mouseUp.call(this,a)},cancel:function(){this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear();return this},_getHandle:function(a){var b=!this.options.handle||
|
||||
!d(this.options.handle,this.element).length?true:false;d(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==a.target)b=true});return b},_createHelper:function(a){var b=this.options;a=d.isFunction(b.helper)?d(b.helper.apply(this.element[0],[a])):b.helper=="clone"?this.element.clone().removeAttr("id"):this.element;a.parents("body").length||a.appendTo(b.appendTo=="parent"?this.element[0].parentNode:b.appendTo);a[0]!=this.element[0]&&!/(fixed|absolute)/.test(a.css("position"))&&
|
||||
a.css("position","absolute");return a},_adjustOffsetFromHelper:function(a){if(typeof a=="string")a=a.split(" ");if(d.isArray(a))a={left:+a[0],top:+a[1]||0};if("left"in a)this.offset.click.left=a.left+this.margins.left;if("right"in a)this.offset.click.left=this.helperProportions.width-a.right+this.margins.left;if("top"in a)this.offset.click.top=a.top+this.margins.top;if("bottom"in a)this.offset.click.top=this.helperProportions.height-a.bottom+this.margins.top},_getParentOffset:function(){this.offsetParent=
|
||||
this.helper.offsetParent();var a=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0])){a.left+=this.scrollParent.scrollLeft();a.top+=this.scrollParent.scrollTop()}if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&d.browser.msie)a={top:0,left:0};return{top:a.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:a.left+(parseInt(this.offsetParent.css("borderLeftWidth"),
|
||||
10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var a=this.element.position();return{top:a.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),
|
||||
10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var a=this.options;if(a.containment=="parent")a.containment=this.helper[0].parentNode;if(a.containment=="document"||a.containment=="window")this.containment=[a.containment=="document"?0:d(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,a.containment=="document"?0:d(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,
|
||||
(a.containment=="document"?0:d(window).scrollLeft())+d(a.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a.containment=="document"?0:d(window).scrollTop())+(d(a.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(a.containment)&&a.containment.constructor!=Array){a=d(a.containment);var b=a[0];if(b){a.offset();var c=d(b).css("overflow")!=
|
||||
"hidden";this.containment=[(parseInt(d(b).css("borderLeftWidth"),10)||0)+(parseInt(d(b).css("paddingLeft"),10)||0),(parseInt(d(b).css("borderTopWidth"),10)||0)+(parseInt(d(b).css("paddingTop"),10)||0),(c?Math.max(b.scrollWidth,b.offsetWidth):b.offsetWidth)-(parseInt(d(b).css("borderLeftWidth"),10)||0)-(parseInt(d(b).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(c?Math.max(b.scrollHeight,b.offsetHeight):b.offsetHeight)-(parseInt(d(b).css("borderTopWidth"),
|
||||
10)||0)-(parseInt(d(b).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom];this.relative_container=a}}else if(a.containment.constructor==Array)this.containment=a.containment},_convertPositionTo:function(a,b){if(!b)b=this.position;a=a=="absolute"?1:-1;var c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,f=/(html|body)/i.test(c[0].tagName);return{top:b.top+
|
||||
this.offset.relative.top*a+this.offset.parent.top*a-(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():f?0:c.scrollTop())*a),left:b.left+this.offset.relative.left*a+this.offset.parent.left*a-(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():f?0:c.scrollLeft())*a)}},_generatePosition:function(a){var b=this.options,c=this.cssPosition=="absolute"&&
|
||||
!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,f=/(html|body)/i.test(c[0].tagName),e=a.pageX,h=a.pageY;if(this.originalPosition){var g;if(this.containment){if(this.relative_container){g=this.relative_container.offset();g=[this.containment[0]+g.left,this.containment[1]+g.top,this.containment[2]+g.left,this.containment[3]+g.top]}else g=this.containment;if(a.pageX-this.offset.click.left<g[0])e=g[0]+this.offset.click.left;
|
||||
if(a.pageY-this.offset.click.top<g[1])h=g[1]+this.offset.click.top;if(a.pageX-this.offset.click.left>g[2])e=g[2]+this.offset.click.left;if(a.pageY-this.offset.click.top>g[3])h=g[3]+this.offset.click.top}if(b.grid){h=b.grid[1]?this.originalPageY+Math.round((h-this.originalPageY)/b.grid[1])*b.grid[1]:this.originalPageY;h=g?!(h-this.offset.click.top<g[1]||h-this.offset.click.top>g[3])?h:!(h-this.offset.click.top<g[1])?h-b.grid[1]:h+b.grid[1]:h;e=b.grid[0]?this.originalPageX+Math.round((e-this.originalPageX)/
|
||||
b.grid[0])*b.grid[0]:this.originalPageX;e=g?!(e-this.offset.click.left<g[0]||e-this.offset.click.left>g[2])?e:!(e-this.offset.click.left<g[0])?e-b.grid[0]:e+b.grid[0]:e}}return{top:h-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():f?0:c.scrollTop()),left:e-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(d.browser.safari&&d.browser.version<
|
||||
526&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():f?0:c.scrollLeft())}},_clear:function(){this.helper.removeClass("ui-draggable-dragging");this.helper[0]!=this.element[0]&&!this.cancelHelperRemoval&&this.helper.remove();this.helper=null;this.cancelHelperRemoval=false},_trigger:function(a,b,c){c=c||this._uiHash();d.ui.plugin.call(this,a,[b,c]);if(a=="drag")this.positionAbs=this._convertPositionTo("absolute");return d.Widget.prototype._trigger.call(this,a,b,
|
||||
c)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}});d.extend(d.ui.draggable,{version:"1.8.16"});d.ui.plugin.add("draggable","connectToSortable",{start:function(a,b){var c=d(this).data("draggable"),f=c.options,e=d.extend({},b,{item:c.element});c.sortables=[];d(f.connectToSortable).each(function(){var h=d.data(this,"sortable");if(h&&!h.options.disabled){c.sortables.push({instance:h,shouldRevert:h.options.revert});
|
||||
h.refreshPositions();h._trigger("activate",a,e)}})},stop:function(a,b){var c=d(this).data("draggable"),f=d.extend({},b,{item:c.element});d.each(c.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;c.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert)this.instance.options.revert=true;this.instance._mouseStop(a);this.instance.options.helper=this.instance.options._helper;c.options.helper=="original"&&this.instance.currentItem.css({top:"auto",left:"auto"})}else{this.instance.cancelHelperRemoval=
|
||||
false;this.instance._trigger("deactivate",a,f)}})},drag:function(a,b){var c=d(this).data("draggable"),f=this;d.each(c.sortables,function(){this.instance.positionAbs=c.positionAbs;this.instance.helperProportions=c.helperProportions;this.instance.offset.click=c.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=d(f).clone().removeAttr("id").appendTo(this.instance.element).data("sortable-item",true);
|
||||
this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return b.helper[0]};a.target=this.instance.currentItem[0];this.instance._mouseCapture(a,true);this.instance._mouseStart(a,true,true);this.instance.offset.click.top=c.offset.click.top;this.instance.offset.click.left=c.offset.click.left;this.instance.offset.parent.left-=c.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=c.offset.parent.top-this.instance.offset.parent.top;
|
||||
c._trigger("toSortable",a);c.dropped=this.instance.element;c.currentItem=c.element;this.instance.fromOutside=c}this.instance.currentItem&&this.instance._mouseDrag(a)}else if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._trigger("out",a,this.instance._uiHash(this.instance));this.instance._mouseStop(a,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();this.instance.placeholder&&
|
||||
this.instance.placeholder.remove();c._trigger("fromSortable",a);c.dropped=false}})}});d.ui.plugin.add("draggable","cursor",{start:function(){var a=d("body"),b=d(this).data("draggable").options;if(a.css("cursor"))b._cursor=a.css("cursor");a.css("cursor",b.cursor)},stop:function(){var a=d(this).data("draggable").options;a._cursor&&d("body").css("cursor",a._cursor)}});d.ui.plugin.add("draggable","opacity",{start:function(a,b){a=d(b.helper);b=d(this).data("draggable").options;if(a.css("opacity"))b._opacity=
|
||||
a.css("opacity");a.css("opacity",b.opacity)},stop:function(a,b){a=d(this).data("draggable").options;a._opacity&&d(b.helper).css("opacity",a._opacity)}});d.ui.plugin.add("draggable","scroll",{start:function(){var a=d(this).data("draggable");if(a.scrollParent[0]!=document&&a.scrollParent[0].tagName!="HTML")a.overflowOffset=a.scrollParent.offset()},drag:function(a){var b=d(this).data("draggable"),c=b.options,f=false;if(b.scrollParent[0]!=document&&b.scrollParent[0].tagName!="HTML"){if(!c.axis||c.axis!=
|
||||
"x")if(b.overflowOffset.top+b.scrollParent[0].offsetHeight-a.pageY<c.scrollSensitivity)b.scrollParent[0].scrollTop=f=b.scrollParent[0].scrollTop+c.scrollSpeed;else if(a.pageY-b.overflowOffset.top<c.scrollSensitivity)b.scrollParent[0].scrollTop=f=b.scrollParent[0].scrollTop-c.scrollSpeed;if(!c.axis||c.axis!="y")if(b.overflowOffset.left+b.scrollParent[0].offsetWidth-a.pageX<c.scrollSensitivity)b.scrollParent[0].scrollLeft=f=b.scrollParent[0].scrollLeft+c.scrollSpeed;else if(a.pageX-b.overflowOffset.left<
|
||||
c.scrollSensitivity)b.scrollParent[0].scrollLeft=f=b.scrollParent[0].scrollLeft-c.scrollSpeed}else{if(!c.axis||c.axis!="x")if(a.pageY-d(document).scrollTop()<c.scrollSensitivity)f=d(document).scrollTop(d(document).scrollTop()-c.scrollSpeed);else if(d(window).height()-(a.pageY-d(document).scrollTop())<c.scrollSensitivity)f=d(document).scrollTop(d(document).scrollTop()+c.scrollSpeed);if(!c.axis||c.axis!="y")if(a.pageX-d(document).scrollLeft()<c.scrollSensitivity)f=d(document).scrollLeft(d(document).scrollLeft()-
|
||||
c.scrollSpeed);else if(d(window).width()-(a.pageX-d(document).scrollLeft())<c.scrollSensitivity)f=d(document).scrollLeft(d(document).scrollLeft()+c.scrollSpeed)}f!==false&&d.ui.ddmanager&&!c.dropBehaviour&&d.ui.ddmanager.prepareOffsets(b,a)}});d.ui.plugin.add("draggable","snap",{start:function(){var a=d(this).data("draggable"),b=a.options;a.snapElements=[];d(b.snap.constructor!=String?b.snap.items||":data(draggable)":b.snap).each(function(){var c=d(this),f=c.offset();this!=a.element[0]&&a.snapElements.push({item:this,
|
||||
width:c.outerWidth(),height:c.outerHeight(),top:f.top,left:f.left})})},drag:function(a,b){for(var c=d(this).data("draggable"),f=c.options,e=f.snapTolerance,h=b.offset.left,g=h+c.helperProportions.width,n=b.offset.top,o=n+c.helperProportions.height,i=c.snapElements.length-1;i>=0;i--){var j=c.snapElements[i].left,l=j+c.snapElements[i].width,k=c.snapElements[i].top,m=k+c.snapElements[i].height;if(j-e<h&&h<l+e&&k-e<n&&n<m+e||j-e<h&&h<l+e&&k-e<o&&o<m+e||j-e<g&&g<l+e&&k-e<n&&n<m+e||j-e<g&&g<l+e&&k-e<o&&
|
||||
o<m+e){if(f.snapMode!="inner"){var p=Math.abs(k-o)<=e,q=Math.abs(m-n)<=e,r=Math.abs(j-g)<=e,s=Math.abs(l-h)<=e;if(p)b.position.top=c._convertPositionTo("relative",{top:k-c.helperProportions.height,left:0}).top-c.margins.top;if(q)b.position.top=c._convertPositionTo("relative",{top:m,left:0}).top-c.margins.top;if(r)b.position.left=c._convertPositionTo("relative",{top:0,left:j-c.helperProportions.width}).left-c.margins.left;if(s)b.position.left=c._convertPositionTo("relative",{top:0,left:l}).left-c.margins.left}var t=
|
||||
p||q||r||s;if(f.snapMode!="outer"){p=Math.abs(k-n)<=e;q=Math.abs(m-o)<=e;r=Math.abs(j-h)<=e;s=Math.abs(l-g)<=e;if(p)b.position.top=c._convertPositionTo("relative",{top:k,left:0}).top-c.margins.top;if(q)b.position.top=c._convertPositionTo("relative",{top:m-c.helperProportions.height,left:0}).top-c.margins.top;if(r)b.position.left=c._convertPositionTo("relative",{top:0,left:j}).left-c.margins.left;if(s)b.position.left=c._convertPositionTo("relative",{top:0,left:l-c.helperProportions.width}).left-c.margins.left}if(!c.snapElements[i].snapping&&
|
||||
(p||q||r||s||t))c.options.snap.snap&&c.options.snap.snap.call(c.element,a,d.extend(c._uiHash(),{snapItem:c.snapElements[i].item}));c.snapElements[i].snapping=p||q||r||s||t}else{c.snapElements[i].snapping&&c.options.snap.release&&c.options.snap.release.call(c.element,a,d.extend(c._uiHash(),{snapItem:c.snapElements[i].item}));c.snapElements[i].snapping=false}}}});d.ui.plugin.add("draggable","stack",{start:function(){var a=d(this).data("draggable").options;a=d.makeArray(d(a.stack)).sort(function(c,f){return(parseInt(d(c).css("zIndex"),
|
||||
10)||0)-(parseInt(d(f).css("zIndex"),10)||0)});if(a.length){var b=parseInt(a[0].style.zIndex)||0;d(a).each(function(c){this.style.zIndex=b+c});this[0].style.zIndex=b+a.length}}});d.ui.plugin.add("draggable","zIndex",{start:function(a,b){a=d(b.helper);b=d(this).data("draggable").options;if(a.css("zIndex"))b._zIndex=a.css("zIndex");a.css("zIndex",b.zIndex)},stop:function(a,b){a=d(this).data("draggable").options;a._zIndex&&d(b.helper).css("zIndex",a._zIndex)}})})(jQuery);
|
||||
;/*
|
||||
* jQuery UI Droppable 1.8.12
|
||||
* jQuery UI Droppable 1.8.16
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
|
|
@ -133,14 +134,15 @@ a.addClasses&&this.element.addClass("ui-droppable")},destroy:function(){for(var
|
|||
this.element.addClass(this.options.activeClass);b&&this._trigger("activate",a,this.ui(b))},_deactivate:function(a){var b=d.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass);b&&this._trigger("deactivate",a,this.ui(b))},_over:function(a){var b=d.ui.ddmanager.current;if(!(!b||(b.currentItem||b.element)[0]==this.element[0]))if(this.accept.call(this.element[0],b.currentItem||b.element)){this.options.hoverClass&&this.element.addClass(this.options.hoverClass);
|
||||
this._trigger("over",a,this.ui(b))}},_out:function(a){var b=d.ui.ddmanager.current;if(!(!b||(b.currentItem||b.element)[0]==this.element[0]))if(this.accept.call(this.element[0],b.currentItem||b.element)){this.options.hoverClass&&this.element.removeClass(this.options.hoverClass);this._trigger("out",a,this.ui(b))}},_drop:function(a,b){var c=b||d.ui.ddmanager.current;if(!c||(c.currentItem||c.element)[0]==this.element[0])return false;var e=false;this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function(){var g=
|
||||
d.data(this,"droppable");if(g.options.greedy&&!g.options.disabled&&g.options.scope==c.options.scope&&g.accept.call(g.element[0],c.currentItem||c.element)&&d.ui.intersect(c,d.extend(g,{offset:g.element.offset()}),g.options.tolerance)){e=true;return false}});if(e)return false;if(this.accept.call(this.element[0],c.currentItem||c.element)){this.options.activeClass&&this.element.removeClass(this.options.activeClass);this.options.hoverClass&&this.element.removeClass(this.options.hoverClass);this._trigger("drop",
|
||||
a,this.ui(c));return this.element}return false},ui:function(a){return{draggable:a.currentItem||a.element,helper:a.helper,position:a.position,offset:a.positionAbs}}});d.extend(d.ui.droppable,{version:"1.8.12"});d.ui.intersect=function(a,b,c){if(!b.offset)return false;var e=(a.positionAbs||a.position.absolute).left,g=e+a.helperProportions.width,f=(a.positionAbs||a.position.absolute).top,h=f+a.helperProportions.height,i=b.offset.left,k=i+b.proportions.width,j=b.offset.top,l=j+b.proportions.height;
|
||||
a,this.ui(c));return this.element}return false},ui:function(a){return{draggable:a.currentItem||a.element,helper:a.helper,position:a.position,offset:a.positionAbs}}});d.extend(d.ui.droppable,{version:"1.8.16"});d.ui.intersect=function(a,b,c){if(!b.offset)return false;var e=(a.positionAbs||a.position.absolute).left,g=e+a.helperProportions.width,f=(a.positionAbs||a.position.absolute).top,h=f+a.helperProportions.height,i=b.offset.left,k=i+b.proportions.width,j=b.offset.top,l=j+b.proportions.height;
|
||||
switch(c){case "fit":return i<=e&&g<=k&&j<=f&&h<=l;case "intersect":return i<e+a.helperProportions.width/2&&g-a.helperProportions.width/2<k&&j<f+a.helperProportions.height/2&&h-a.helperProportions.height/2<l;case "pointer":return d.ui.isOver((a.positionAbs||a.position.absolute).top+(a.clickOffset||a.offset.click).top,(a.positionAbs||a.position.absolute).left+(a.clickOffset||a.offset.click).left,j,i,b.proportions.height,b.proportions.width);case "touch":return(f>=j&&f<=l||h>=j&&h<=l||f<j&&h>l)&&(e>=
|
||||
i&&e<=k||g>=i&&g<=k||e<i&&g>k);default:return false}};d.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(a,b){var c=d.ui.ddmanager.droppables[a.options.scope]||[],e=b?b.type:null,g=(a.currentItem||a.element).find(":data(droppable)").andSelf(),f=0;a:for(;f<c.length;f++)if(!(c[f].options.disabled||a&&!c[f].accept.call(c[f].element[0],a.currentItem||a.element))){for(var h=0;h<g.length;h++)if(g[h]==c[f].element[0]){c[f].proportions.height=0;continue a}c[f].visible=c[f].element.css("display")!=
|
||||
"none";if(c[f].visible){e=="mousedown"&&c[f]._activate.call(c[f],b);c[f].offset=c[f].element.offset();c[f].proportions={width:c[f].element[0].offsetWidth,height:c[f].element[0].offsetHeight}}}},drop:function(a,b){var c=false;d.each(d.ui.ddmanager.droppables[a.options.scope]||[],function(){if(this.options){if(!this.options.disabled&&this.visible&&d.ui.intersect(a,this,this.options.tolerance))c=c||this._drop.call(this,b);if(!this.options.disabled&&this.visible&&this.accept.call(this.element[0],a.currentItem||
|
||||
a.element)){this.isout=1;this.isover=0;this._deactivate.call(this,b)}}});return c},drag:function(a,b){a.options.refreshPositions&&d.ui.ddmanager.prepareOffsets(a,b);d.each(d.ui.ddmanager.droppables[a.options.scope]||[],function(){if(!(this.options.disabled||this.greedyChild||!this.visible)){var c=d.ui.intersect(a,this,this.options.tolerance);if(c=!c&&this.isover==1?"isout":c&&this.isover==0?"isover":null){var e;if(this.options.greedy){var g=this.element.parents(":data(droppable):eq(0)");if(g.length){e=
|
||||
d.data(g[0],"droppable");e.greedyChild=c=="isover"?1:0}}if(e&&c=="isover"){e.isover=0;e.isout=1;e._out.call(e,b)}this[c]=1;this[c=="isout"?"isover":"isout"]=0;this[c=="isover"?"_over":"_out"].call(this,b);if(e&&c=="isout"){e.isout=0;e.isover=1;e._over.call(e,b)}}}})}}})(jQuery);
|
||||
a.element)){this.isout=1;this.isover=0;this._deactivate.call(this,b)}}});return c},dragStart:function(a,b){a.element.parents(":not(body,html)").bind("scroll.droppable",function(){a.options.refreshPositions||d.ui.ddmanager.prepareOffsets(a,b)})},drag:function(a,b){a.options.refreshPositions&&d.ui.ddmanager.prepareOffsets(a,b);d.each(d.ui.ddmanager.droppables[a.options.scope]||[],function(){if(!(this.options.disabled||this.greedyChild||!this.visible)){var c=d.ui.intersect(a,this,this.options.tolerance);
|
||||
if(c=!c&&this.isover==1?"isout":c&&this.isover==0?"isover":null){var e;if(this.options.greedy){var g=this.element.parents(":data(droppable):eq(0)");if(g.length){e=d.data(g[0],"droppable");e.greedyChild=c=="isover"?1:0}}if(e&&c=="isover"){e.isover=0;e.isout=1;e._out.call(e,b)}this[c]=1;this[c=="isout"?"isover":"isout"]=0;this[c=="isover"?"_over":"_out"].call(this,b);if(e&&c=="isout"){e.isout=0;e.isover=1;e._over.call(e,b)}}}})},dragStop:function(a,b){a.element.parents(":not(body,html)").unbind("scroll.droppable");
|
||||
a.options.refreshPositions||d.ui.ddmanager.prepareOffsets(a,b)}}})(jQuery);
|
||||
;/*
|
||||
* jQuery UI Resizable 1.8.12
|
||||
* jQuery UI Resizable 1.8.16
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
|
|
@ -158,36 +160,38 @@ _proportionallyResizeElements:[],_helper:a.helper||a.ghost||a.animate?a.helper||
|
|||
top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=
|
||||
this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=a.handles||(!e(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",
|
||||
nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all")this.handles="n,e,s,w,se,sw,ne,nw";var c=this.handles.split(",");this.handles={};for(var d=0;d<c.length;d++){var f=e.trim(c[d]),g=e('<div class="ui-resizable-handle '+("ui-resizable-"+f)+'"></div>');/sw|se|ne|nw/.test(f)&&g.css({zIndex:++a.zIndex});"se"==f&&g.addClass("ui-icon ui-icon-gripsmall-diagonal-se");this.handles[f]=".ui-resizable-"+f;this.element.append(g)}}this._renderAxis=function(h){h=h||this.element;for(var i in this.handles){if(this.handles[i].constructor==
|
||||
String)this.handles[i]=e(this.handles[i],this.element).show();if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var j=e(this.handles[i],this.element),k=0;k=/sw|ne|nw|se|n|s/.test(i)?j.outerHeight():j.outerWidth();j=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join("");h.css(j,k);this._proportionallyResize()}e(this.handles[i])}};this._renderAxis(this.element);this._handles=e(".ui-resizable-handle",this.element).disableSelection();
|
||||
this._handles.mouseover(function(){if(!b.resizing){if(this.className)var h=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);b.axis=h&&h[1]?h[1]:"se"}});if(a.autoHide){this._handles.hide();e(this.element).addClass("ui-resizable-autohide").hover(function(){e(this).removeClass("ui-resizable-autohide");b._handles.show()},function(){if(!b.resizing){e(this).addClass("ui-resizable-autohide");b._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var b=function(c){e(c).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};
|
||||
if(this.elementIsWrapper){b(this.element);var a=this.element;a.after(this.originalElement.css({position:a.css("position"),width:a.outerWidth(),height:a.outerHeight(),top:a.css("top"),left:a.css("left")})).remove()}this.originalElement.css("resize",this.originalResizeStyle);b(this.originalElement);return this},_mouseCapture:function(b){var a=false;for(var c in this.handles)if(e(this.handles[c])[0]==b.target)a=true;return!this.options.disabled&&a},_mouseStart:function(b){var a=this.options,c=this.element.position(),
|
||||
d=this.element;this.resizing=true;this.documentScroll={top:e(document).scrollTop(),left:e(document).scrollLeft()};if(d.is(".ui-draggable")||/absolute/.test(d.css("position")))d.css({position:"absolute",top:c.top,left:c.left});e.browser.opera&&/relative/.test(d.css("position"))&&d.css({position:"relative",top:"auto",left:"auto"});this._renderProxy();c=m(this.helper.css("left"));var f=m(this.helper.css("top"));if(a.containment){c+=e(a.containment).scrollLeft()||0;f+=e(a.containment).scrollTop()||0}this.offset=
|
||||
this.helper.offset();this.position={left:c,top:f};this.size=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalSize=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalPosition={left:c,top:f};this.sizeDiff={width:d.outerWidth()-d.width(),height:d.outerHeight()-d.height()};this.originalMousePosition={left:b.pageX,top:b.pageY};this.aspectRatio=typeof a.aspectRatio=="number"?a.aspectRatio:
|
||||
this.originalSize.width/this.originalSize.height||1;a=e(".ui-resizable-"+this.axis).css("cursor");e("body").css("cursor",a=="auto"?this.axis+"-resize":a);d.addClass("ui-resizable-resizing");this._propagate("start",b);return true},_mouseDrag:function(b){var a=this.helper,c=this.originalMousePosition,d=this._change[this.axis];if(!d)return false;c=d.apply(this,[b,b.pageX-c.left||0,b.pageY-c.top||0]);if(this._aspectRatio||b.shiftKey)c=this._updateRatio(c,b);c=this._respectSize(c,b);this._propagate("resize",
|
||||
b);a.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize();this._updateCache(c);this._trigger("resize",b,this.ui());return false},_mouseStop:function(b){this.resizing=false;var a=this.options,c=this;if(this._helper){var d=this._proportionallyResizeElements,f=d.length&&/textarea/i.test(d[0].nodeName);d=f&&e.ui.hasScroll(d[0],"left")?0:c.sizeDiff.height;
|
||||
f=f?0:c.sizeDiff.width;f={width:c.helper.width()-f,height:c.helper.height()-d};d=parseInt(c.element.css("left"),10)+(c.position.left-c.originalPosition.left)||null;var g=parseInt(c.element.css("top"),10)+(c.position.top-c.originalPosition.top)||null;a.animate||this.element.css(e.extend(f,{top:g,left:d}));c.helper.height(c.size.height);c.helper.width(c.size.width);this._helper&&!a.animate&&this._proportionallyResize()}e("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");
|
||||
this._propagate("stop",b);this._helper&&this.helper.remove();return false},_updateCache:function(b){this.offset=this.helper.offset();if(l(b.left))this.position.left=b.left;if(l(b.top))this.position.top=b.top;if(l(b.height))this.size.height=b.height;if(l(b.width))this.size.width=b.width},_updateRatio:function(b){var a=this.position,c=this.size,d=this.axis;if(b.height)b.width=c.height*this.aspectRatio;else if(b.width)b.height=c.width/this.aspectRatio;if(d=="sw"){b.left=a.left+(c.width-b.width);b.top=
|
||||
null}if(d=="nw"){b.top=a.top+(c.height-b.height);b.left=a.left+(c.width-b.width)}return b},_respectSize:function(b){var a=this.options,c=this.axis,d=l(b.width)&&a.maxWidth&&a.maxWidth<b.width,f=l(b.height)&&a.maxHeight&&a.maxHeight<b.height,g=l(b.width)&&a.minWidth&&a.minWidth>b.width,h=l(b.height)&&a.minHeight&&a.minHeight>b.height;if(g)b.width=a.minWidth;if(h)b.height=a.minHeight;if(d)b.width=a.maxWidth;if(f)b.height=a.maxHeight;var i=this.originalPosition.left+this.originalSize.width,j=this.position.top+
|
||||
this.size.height,k=/sw|nw|w/.test(c);c=/nw|ne|n/.test(c);if(g&&k)b.left=i-a.minWidth;if(d&&k)b.left=i-a.maxWidth;if(h&&c)b.top=j-a.minHeight;if(f&&c)b.top=j-a.maxHeight;if((a=!b.width&&!b.height)&&!b.left&&b.top)b.top=null;else if(a&&!b.top&&b.left)b.left=null;return b},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var b=this.helper||this.element,a=0;a<this._proportionallyResizeElements.length;a++){var c=this._proportionallyResizeElements[a];if(!this.borderDif){var d=
|
||||
[c.css("borderTopWidth"),c.css("borderRightWidth"),c.css("borderBottomWidth"),c.css("borderLeftWidth")],f=[c.css("paddingTop"),c.css("paddingRight"),c.css("paddingBottom"),c.css("paddingLeft")];this.borderDif=e.map(d,function(g,h){g=parseInt(g,10)||0;h=parseInt(f[h],10)||0;return g+h})}e.browser.msie&&(e(b).is(":hidden")||e(b).parents(":hidden").length)||c.css({height:b.height()-this.borderDif[0]-this.borderDif[2]||0,width:b.width()-this.borderDif[1]-this.borderDif[3]||0})}},_renderProxy:function(){var b=
|
||||
this.options;this.elementOffset=this.element.offset();if(this._helper){this.helper=this.helper||e('<div style="overflow:hidden;"></div>');var a=e.browser.msie&&e.browser.version<7,c=a?1:0;a=a?2:-1;this.helper.addClass(this._helper).css({width:this.element.outerWidth()+a,height:this.element.outerHeight()+a,position:"absolute",left:this.elementOffset.left-c+"px",top:this.elementOffset.top-c+"px",zIndex:++b.zIndex});this.helper.appendTo("body").disableSelection()}else this.helper=this.element},_change:{e:function(b,
|
||||
a){return{width:this.originalSize.width+a}},w:function(b,a){return{left:this.originalPosition.left+a,width:this.originalSize.width-a}},n:function(b,a,c){return{top:this.originalPosition.top+c,height:this.originalSize.height-c}},s:function(b,a,c){return{height:this.originalSize.height+c}},se:function(b,a,c){return e.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[b,a,c]))},sw:function(b,a,c){return e.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[b,a,
|
||||
c]))},ne:function(b,a,c){return e.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[b,a,c]))},nw:function(b,a,c){return e.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[b,a,c]))}},_propagate:function(b,a){e.ui.plugin.call(this,b,[a,this.ui()]);b!="resize"&&this._trigger(b,a,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,
|
||||
originalPosition:this.originalPosition}}});e.extend(e.ui.resizable,{version:"1.8.12"});e.ui.plugin.add("resizable","alsoResize",{start:function(){var b=e(this).data("resizable").options,a=function(c){e(c).each(function(){var d=e(this);d.data("resizable-alsoresize",{width:parseInt(d.width(),10),height:parseInt(d.height(),10),left:parseInt(d.css("left"),10),top:parseInt(d.css("top"),10),position:d.css("position")})})};if(typeof b.alsoResize=="object"&&!b.alsoResize.parentNode)if(b.alsoResize.length){b.alsoResize=
|
||||
b.alsoResize[0];a(b.alsoResize)}else e.each(b.alsoResize,function(c){a(c)});else a(b.alsoResize)},resize:function(b,a){var c=e(this).data("resizable");b=c.options;var d=c.originalSize,f=c.originalPosition,g={height:c.size.height-d.height||0,width:c.size.width-d.width||0,top:c.position.top-f.top||0,left:c.position.left-f.left||0},h=function(i,j){e(i).each(function(){var k=e(this),q=e(this).data("resizable-alsoresize"),p={},r=j&&j.length?j:k.parents(a.originalElement[0]).length?["width","height"]:["width",
|
||||
"height","top","left"];e.each(r,function(n,o){if((n=(q[o]||0)+(g[o]||0))&&n>=0)p[o]=n||null});if(e.browser.opera&&/relative/.test(k.css("position"))){c._revertToRelativePosition=true;k.css({position:"absolute",top:"auto",left:"auto"})}k.css(p)})};typeof b.alsoResize=="object"&&!b.alsoResize.nodeType?e.each(b.alsoResize,function(i,j){h(i,j)}):h(b.alsoResize)},stop:function(){var b=e(this).data("resizable"),a=b.options,c=function(d){e(d).each(function(){var f=e(this);f.css({position:f.data("resizable-alsoresize").position})})};
|
||||
if(b._revertToRelativePosition){b._revertToRelativePosition=false;typeof a.alsoResize=="object"&&!a.alsoResize.nodeType?e.each(a.alsoResize,function(d){c(d)}):c(a.alsoResize)}e(this).removeData("resizable-alsoresize")}});e.ui.plugin.add("resizable","animate",{stop:function(b){var a=e(this).data("resizable"),c=a.options,d=a._proportionallyResizeElements,f=d.length&&/textarea/i.test(d[0].nodeName),g=f&&e.ui.hasScroll(d[0],"left")?0:a.sizeDiff.height;f={width:a.size.width-(f?0:a.sizeDiff.width),height:a.size.height-
|
||||
g};g=parseInt(a.element.css("left"),10)+(a.position.left-a.originalPosition.left)||null;var h=parseInt(a.element.css("top"),10)+(a.position.top-a.originalPosition.top)||null;a.element.animate(e.extend(f,h&&g?{top:h,left:g}:{}),{duration:c.animateDuration,easing:c.animateEasing,step:function(){var i={width:parseInt(a.element.css("width"),10),height:parseInt(a.element.css("height"),10),top:parseInt(a.element.css("top"),10),left:parseInt(a.element.css("left"),10)};d&&d.length&&e(d[0]).css({width:i.width,
|
||||
height:i.height});a._updateCache(i);a._propagate("resize",b)}})}});e.ui.plugin.add("resizable","containment",{start:function(){var b=e(this).data("resizable"),a=b.element,c=b.options.containment;if(a=c instanceof e?c.get(0):/parent/.test(c)?a.parent().get(0):c){b.containerElement=e(a);if(/document/.test(c)||c==document){b.containerOffset={left:0,top:0};b.containerPosition={left:0,top:0};b.parentData={element:e(document),left:0,top:0,width:e(document).width(),height:e(document).height()||document.body.parentNode.scrollHeight}}else{var d=
|
||||
e(a),f=[];e(["Top","Right","Left","Bottom"]).each(function(i,j){f[i]=m(d.css("padding"+j))});b.containerOffset=d.offset();b.containerPosition=d.position();b.containerSize={height:d.innerHeight()-f[3],width:d.innerWidth()-f[1]};c=b.containerOffset;var g=b.containerSize.height,h=b.containerSize.width;h=e.ui.hasScroll(a,"left")?a.scrollWidth:h;g=e.ui.hasScroll(a)?a.scrollHeight:g;b.parentData={element:a,left:c.left,top:c.top,width:h,height:g}}}},resize:function(b){var a=e(this).data("resizable"),c=a.options,
|
||||
d=a.containerOffset,f=a.position;b=a._aspectRatio||b.shiftKey;var g={top:0,left:0},h=a.containerElement;if(h[0]!=document&&/static/.test(h.css("position")))g=d;if(f.left<(a._helper?d.left:0)){a.size.width+=a._helper?a.position.left-d.left:a.position.left-g.left;if(b)a.size.height=a.size.width/c.aspectRatio;a.position.left=c.helper?d.left:0}if(f.top<(a._helper?d.top:0)){a.size.height+=a._helper?a.position.top-d.top:a.position.top;if(b)a.size.width=a.size.height*c.aspectRatio;a.position.top=a._helper?
|
||||
d.top:0}a.offset.left=a.parentData.left+a.position.left;a.offset.top=a.parentData.top+a.position.top;c=Math.abs((a._helper?a.offset.left-g.left:a.offset.left-g.left)+a.sizeDiff.width);d=Math.abs((a._helper?a.offset.top-g.top:a.offset.top-d.top)+a.sizeDiff.height);f=a.containerElement.get(0)==a.element.parent().get(0);g=/relative|absolute/.test(a.containerElement.css("position"));if(f&&g)c-=a.parentData.left;if(c+a.size.width>=a.parentData.width){a.size.width=a.parentData.width-c;if(b)a.size.height=
|
||||
a.size.width/a.aspectRatio}if(d+a.size.height>=a.parentData.height){a.size.height=a.parentData.height-d;if(b)a.size.width=a.size.height*a.aspectRatio}},stop:function(){var b=e(this).data("resizable"),a=b.options,c=b.containerOffset,d=b.containerPosition,f=b.containerElement,g=e(b.helper),h=g.offset(),i=g.outerWidth()-b.sizeDiff.width;g=g.outerHeight()-b.sizeDiff.height;b._helper&&!a.animate&&/relative/.test(f.css("position"))&&e(this).css({left:h.left-d.left-c.left,width:i,height:g});b._helper&&!a.animate&&
|
||||
/static/.test(f.css("position"))&&e(this).css({left:h.left-d.left-c.left,width:i,height:g})}});e.ui.plugin.add("resizable","ghost",{start:function(){var b=e(this).data("resizable"),a=b.options,c=b.size;b.ghost=b.originalElement.clone();b.ghost.css({opacity:0.25,display:"block",position:"relative",height:c.height,width:c.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof a.ghost=="string"?a.ghost:"");b.ghost.appendTo(b.helper)},resize:function(){var b=e(this).data("resizable");
|
||||
b.ghost&&b.ghost.css({position:"relative",height:b.size.height,width:b.size.width})},stop:function(){var b=e(this).data("resizable");b.ghost&&b.helper&&b.helper.get(0).removeChild(b.ghost.get(0))}});e.ui.plugin.add("resizable","grid",{resize:function(){var b=e(this).data("resizable"),a=b.options,c=b.size,d=b.originalSize,f=b.originalPosition,g=b.axis;a.grid=typeof a.grid=="number"?[a.grid,a.grid]:a.grid;var h=Math.round((c.width-d.width)/(a.grid[0]||1))*(a.grid[0]||1);a=Math.round((c.height-d.height)/
|
||||
(a.grid[1]||1))*(a.grid[1]||1);if(/^(se|s|e)$/.test(g)){b.size.width=d.width+h;b.size.height=d.height+a}else if(/^(ne)$/.test(g)){b.size.width=d.width+h;b.size.height=d.height+a;b.position.top=f.top-a}else{if(/^(sw)$/.test(g)){b.size.width=d.width+h;b.size.height=d.height+a}else{b.size.width=d.width+h;b.size.height=d.height+a;b.position.top=f.top-a}b.position.left=f.left-h}}});var m=function(b){return parseInt(b,10)||0},l=function(b){return!isNaN(parseInt(b,10))}})(jQuery);
|
||||
String)this.handles[i]=e(this.handles[i],this.element).show();if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var j=e(this.handles[i],this.element),l=0;l=/sw|ne|nw|se|n|s/.test(i)?j.outerHeight():j.outerWidth();j=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join("");h.css(j,l);this._proportionallyResize()}e(this.handles[i])}};this._renderAxis(this.element);this._handles=e(".ui-resizable-handle",this.element).disableSelection();
|
||||
this._handles.mouseover(function(){if(!b.resizing){if(this.className)var h=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);b.axis=h&&h[1]?h[1]:"se"}});if(a.autoHide){this._handles.hide();e(this.element).addClass("ui-resizable-autohide").hover(function(){if(!a.disabled){e(this).removeClass("ui-resizable-autohide");b._handles.show()}},function(){if(!a.disabled)if(!b.resizing){e(this).addClass("ui-resizable-autohide");b._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();
|
||||
var b=function(c){e(c).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){b(this.element);var a=this.element;a.after(this.originalElement.css({position:a.css("position"),width:a.outerWidth(),height:a.outerHeight(),top:a.css("top"),left:a.css("left")})).remove()}this.originalElement.css("resize",this.originalResizeStyle);b(this.originalElement);return this},_mouseCapture:function(b){var a=
|
||||
false;for(var c in this.handles)if(e(this.handles[c])[0]==b.target)a=true;return!this.options.disabled&&a},_mouseStart:function(b){var a=this.options,c=this.element.position(),d=this.element;this.resizing=true;this.documentScroll={top:e(document).scrollTop(),left:e(document).scrollLeft()};if(d.is(".ui-draggable")||/absolute/.test(d.css("position")))d.css({position:"absolute",top:c.top,left:c.left});e.browser.opera&&/relative/.test(d.css("position"))&&d.css({position:"relative",top:"auto",left:"auto"});
|
||||
this._renderProxy();c=m(this.helper.css("left"));var f=m(this.helper.css("top"));if(a.containment){c+=e(a.containment).scrollLeft()||0;f+=e(a.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:c,top:f};this.size=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalSize=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalPosition={left:c,top:f};this.sizeDiff=
|
||||
{width:d.outerWidth()-d.width(),height:d.outerHeight()-d.height()};this.originalMousePosition={left:b.pageX,top:b.pageY};this.aspectRatio=typeof a.aspectRatio=="number"?a.aspectRatio:this.originalSize.width/this.originalSize.height||1;a=e(".ui-resizable-"+this.axis).css("cursor");e("body").css("cursor",a=="auto"?this.axis+"-resize":a);d.addClass("ui-resizable-resizing");this._propagate("start",b);return true},_mouseDrag:function(b){var a=this.helper,c=this.originalMousePosition,d=this._change[this.axis];
|
||||
if(!d)return false;c=d.apply(this,[b,b.pageX-c.left||0,b.pageY-c.top||0]);this._updateVirtualBoundaries(b.shiftKey);if(this._aspectRatio||b.shiftKey)c=this._updateRatio(c,b);c=this._respectSize(c,b);this._propagate("resize",b);a.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize();this._updateCache(c);this._trigger("resize",b,this.ui());return false},
|
||||
_mouseStop:function(b){this.resizing=false;var a=this.options,c=this;if(this._helper){var d=this._proportionallyResizeElements,f=d.length&&/textarea/i.test(d[0].nodeName);d=f&&e.ui.hasScroll(d[0],"left")?0:c.sizeDiff.height;f=f?0:c.sizeDiff.width;f={width:c.helper.width()-f,height:c.helper.height()-d};d=parseInt(c.element.css("left"),10)+(c.position.left-c.originalPosition.left)||null;var g=parseInt(c.element.css("top"),10)+(c.position.top-c.originalPosition.top)||null;a.animate||this.element.css(e.extend(f,
|
||||
{top:g,left:d}));c.helper.height(c.size.height);c.helper.width(c.size.width);this._helper&&!a.animate&&this._proportionallyResize()}e("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",b);this._helper&&this.helper.remove();return false},_updateVirtualBoundaries:function(b){var a=this.options,c,d,f;a={minWidth:k(a.minWidth)?a.minWidth:0,maxWidth:k(a.maxWidth)?a.maxWidth:Infinity,minHeight:k(a.minHeight)?a.minHeight:0,maxHeight:k(a.maxHeight)?a.maxHeight:
|
||||
Infinity};if(this._aspectRatio||b){b=a.minHeight*this.aspectRatio;d=a.minWidth/this.aspectRatio;c=a.maxHeight*this.aspectRatio;f=a.maxWidth/this.aspectRatio;if(b>a.minWidth)a.minWidth=b;if(d>a.minHeight)a.minHeight=d;if(c<a.maxWidth)a.maxWidth=c;if(f<a.maxHeight)a.maxHeight=f}this._vBoundaries=a},_updateCache:function(b){this.offset=this.helper.offset();if(k(b.left))this.position.left=b.left;if(k(b.top))this.position.top=b.top;if(k(b.height))this.size.height=b.height;if(k(b.width))this.size.width=
|
||||
b.width},_updateRatio:function(b){var a=this.position,c=this.size,d=this.axis;if(k(b.height))b.width=b.height*this.aspectRatio;else if(k(b.width))b.height=b.width/this.aspectRatio;if(d=="sw"){b.left=a.left+(c.width-b.width);b.top=null}if(d=="nw"){b.top=a.top+(c.height-b.height);b.left=a.left+(c.width-b.width)}return b},_respectSize:function(b){var a=this._vBoundaries,c=this.axis,d=k(b.width)&&a.maxWidth&&a.maxWidth<b.width,f=k(b.height)&&a.maxHeight&&a.maxHeight<b.height,g=k(b.width)&&a.minWidth&&
|
||||
a.minWidth>b.width,h=k(b.height)&&a.minHeight&&a.minHeight>b.height;if(g)b.width=a.minWidth;if(h)b.height=a.minHeight;if(d)b.width=a.maxWidth;if(f)b.height=a.maxHeight;var i=this.originalPosition.left+this.originalSize.width,j=this.position.top+this.size.height,l=/sw|nw|w/.test(c);c=/nw|ne|n/.test(c);if(g&&l)b.left=i-a.minWidth;if(d&&l)b.left=i-a.maxWidth;if(h&&c)b.top=j-a.minHeight;if(f&&c)b.top=j-a.maxHeight;if((a=!b.width&&!b.height)&&!b.left&&b.top)b.top=null;else if(a&&!b.top&&b.left)b.left=
|
||||
null;return b},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var b=this.helper||this.element,a=0;a<this._proportionallyResizeElements.length;a++){var c=this._proportionallyResizeElements[a];if(!this.borderDif){var d=[c.css("borderTopWidth"),c.css("borderRightWidth"),c.css("borderBottomWidth"),c.css("borderLeftWidth")],f=[c.css("paddingTop"),c.css("paddingRight"),c.css("paddingBottom"),c.css("paddingLeft")];this.borderDif=e.map(d,function(g,h){g=parseInt(g,10)||
|
||||
0;h=parseInt(f[h],10)||0;return g+h})}e.browser.msie&&(e(b).is(":hidden")||e(b).parents(":hidden").length)||c.css({height:b.height()-this.borderDif[0]-this.borderDif[2]||0,width:b.width()-this.borderDif[1]-this.borderDif[3]||0})}},_renderProxy:function(){var b=this.options;this.elementOffset=this.element.offset();if(this._helper){this.helper=this.helper||e('<div style="overflow:hidden;"></div>');var a=e.browser.msie&&e.browser.version<7,c=a?1:0;a=a?2:-1;this.helper.addClass(this._helper).css({width:this.element.outerWidth()+
|
||||
a,height:this.element.outerHeight()+a,position:"absolute",left:this.elementOffset.left-c+"px",top:this.elementOffset.top-c+"px",zIndex:++b.zIndex});this.helper.appendTo("body").disableSelection()}else this.helper=this.element},_change:{e:function(b,a){return{width:this.originalSize.width+a}},w:function(b,a){return{left:this.originalPosition.left+a,width:this.originalSize.width-a}},n:function(b,a,c){return{top:this.originalPosition.top+c,height:this.originalSize.height-c}},s:function(b,a,c){return{height:this.originalSize.height+
|
||||
c}},se:function(b,a,c){return e.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[b,a,c]))},sw:function(b,a,c){return e.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[b,a,c]))},ne:function(b,a,c){return e.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[b,a,c]))},nw:function(b,a,c){return e.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[b,a,c]))}},_propagate:function(b,a){e.ui.plugin.call(this,b,[a,this.ui()]);
|
||||
b!="resize"&&this._trigger(b,a,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}});e.extend(e.ui.resizable,{version:"1.8.16"});e.ui.plugin.add("resizable","alsoResize",{start:function(){var b=e(this).data("resizable").options,a=function(c){e(c).each(function(){var d=e(this);d.data("resizable-alsoresize",{width:parseInt(d.width(),
|
||||
10),height:parseInt(d.height(),10),left:parseInt(d.css("left"),10),top:parseInt(d.css("top"),10),position:d.css("position")})})};if(typeof b.alsoResize=="object"&&!b.alsoResize.parentNode)if(b.alsoResize.length){b.alsoResize=b.alsoResize[0];a(b.alsoResize)}else e.each(b.alsoResize,function(c){a(c)});else a(b.alsoResize)},resize:function(b,a){var c=e(this).data("resizable");b=c.options;var d=c.originalSize,f=c.originalPosition,g={height:c.size.height-d.height||0,width:c.size.width-d.width||0,top:c.position.top-
|
||||
f.top||0,left:c.position.left-f.left||0},h=function(i,j){e(i).each(function(){var l=e(this),q=e(this).data("resizable-alsoresize"),p={},r=j&&j.length?j:l.parents(a.originalElement[0]).length?["width","height"]:["width","height","top","left"];e.each(r,function(n,o){if((n=(q[o]||0)+(g[o]||0))&&n>=0)p[o]=n||null});if(e.browser.opera&&/relative/.test(l.css("position"))){c._revertToRelativePosition=true;l.css({position:"absolute",top:"auto",left:"auto"})}l.css(p)})};typeof b.alsoResize=="object"&&!b.alsoResize.nodeType?
|
||||
e.each(b.alsoResize,function(i,j){h(i,j)}):h(b.alsoResize)},stop:function(){var b=e(this).data("resizable"),a=b.options,c=function(d){e(d).each(function(){var f=e(this);f.css({position:f.data("resizable-alsoresize").position})})};if(b._revertToRelativePosition){b._revertToRelativePosition=false;typeof a.alsoResize=="object"&&!a.alsoResize.nodeType?e.each(a.alsoResize,function(d){c(d)}):c(a.alsoResize)}e(this).removeData("resizable-alsoresize")}});e.ui.plugin.add("resizable","animate",{stop:function(b){var a=
|
||||
e(this).data("resizable"),c=a.options,d=a._proportionallyResizeElements,f=d.length&&/textarea/i.test(d[0].nodeName),g=f&&e.ui.hasScroll(d[0],"left")?0:a.sizeDiff.height;f={width:a.size.width-(f?0:a.sizeDiff.width),height:a.size.height-g};g=parseInt(a.element.css("left"),10)+(a.position.left-a.originalPosition.left)||null;var h=parseInt(a.element.css("top"),10)+(a.position.top-a.originalPosition.top)||null;a.element.animate(e.extend(f,h&&g?{top:h,left:g}:{}),{duration:c.animateDuration,easing:c.animateEasing,
|
||||
step:function(){var i={width:parseInt(a.element.css("width"),10),height:parseInt(a.element.css("height"),10),top:parseInt(a.element.css("top"),10),left:parseInt(a.element.css("left"),10)};d&&d.length&&e(d[0]).css({width:i.width,height:i.height});a._updateCache(i);a._propagate("resize",b)}})}});e.ui.plugin.add("resizable","containment",{start:function(){var b=e(this).data("resizable"),a=b.element,c=b.options.containment;if(a=c instanceof e?c.get(0):/parent/.test(c)?a.parent().get(0):c){b.containerElement=
|
||||
e(a);if(/document/.test(c)||c==document){b.containerOffset={left:0,top:0};b.containerPosition={left:0,top:0};b.parentData={element:e(document),left:0,top:0,width:e(document).width(),height:e(document).height()||document.body.parentNode.scrollHeight}}else{var d=e(a),f=[];e(["Top","Right","Left","Bottom"]).each(function(i,j){f[i]=m(d.css("padding"+j))});b.containerOffset=d.offset();b.containerPosition=d.position();b.containerSize={height:d.innerHeight()-f[3],width:d.innerWidth()-f[1]};c=b.containerOffset;
|
||||
var g=b.containerSize.height,h=b.containerSize.width;h=e.ui.hasScroll(a,"left")?a.scrollWidth:h;g=e.ui.hasScroll(a)?a.scrollHeight:g;b.parentData={element:a,left:c.left,top:c.top,width:h,height:g}}}},resize:function(b){var a=e(this).data("resizable"),c=a.options,d=a.containerOffset,f=a.position;b=a._aspectRatio||b.shiftKey;var g={top:0,left:0},h=a.containerElement;if(h[0]!=document&&/static/.test(h.css("position")))g=d;if(f.left<(a._helper?d.left:0)){a.size.width+=a._helper?a.position.left-d.left:
|
||||
a.position.left-g.left;if(b)a.size.height=a.size.width/c.aspectRatio;a.position.left=c.helper?d.left:0}if(f.top<(a._helper?d.top:0)){a.size.height+=a._helper?a.position.top-d.top:a.position.top;if(b)a.size.width=a.size.height*c.aspectRatio;a.position.top=a._helper?d.top:0}a.offset.left=a.parentData.left+a.position.left;a.offset.top=a.parentData.top+a.position.top;c=Math.abs((a._helper?a.offset.left-g.left:a.offset.left-g.left)+a.sizeDiff.width);d=Math.abs((a._helper?a.offset.top-g.top:a.offset.top-
|
||||
d.top)+a.sizeDiff.height);f=a.containerElement.get(0)==a.element.parent().get(0);g=/relative|absolute/.test(a.containerElement.css("position"));if(f&&g)c-=a.parentData.left;if(c+a.size.width>=a.parentData.width){a.size.width=a.parentData.width-c;if(b)a.size.height=a.size.width/a.aspectRatio}if(d+a.size.height>=a.parentData.height){a.size.height=a.parentData.height-d;if(b)a.size.width=a.size.height*a.aspectRatio}},stop:function(){var b=e(this).data("resizable"),a=b.options,c=b.containerOffset,d=b.containerPosition,
|
||||
f=b.containerElement,g=e(b.helper),h=g.offset(),i=g.outerWidth()-b.sizeDiff.width;g=g.outerHeight()-b.sizeDiff.height;b._helper&&!a.animate&&/relative/.test(f.css("position"))&&e(this).css({left:h.left-d.left-c.left,width:i,height:g});b._helper&&!a.animate&&/static/.test(f.css("position"))&&e(this).css({left:h.left-d.left-c.left,width:i,height:g})}});e.ui.plugin.add("resizable","ghost",{start:function(){var b=e(this).data("resizable"),a=b.options,c=b.size;b.ghost=b.originalElement.clone();b.ghost.css({opacity:0.25,
|
||||
display:"block",position:"relative",height:c.height,width:c.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof a.ghost=="string"?a.ghost:"");b.ghost.appendTo(b.helper)},resize:function(){var b=e(this).data("resizable");b.ghost&&b.ghost.css({position:"relative",height:b.size.height,width:b.size.width})},stop:function(){var b=e(this).data("resizable");b.ghost&&b.helper&&b.helper.get(0).removeChild(b.ghost.get(0))}});e.ui.plugin.add("resizable","grid",{resize:function(){var b=
|
||||
e(this).data("resizable"),a=b.options,c=b.size,d=b.originalSize,f=b.originalPosition,g=b.axis;a.grid=typeof a.grid=="number"?[a.grid,a.grid]:a.grid;var h=Math.round((c.width-d.width)/(a.grid[0]||1))*(a.grid[0]||1);a=Math.round((c.height-d.height)/(a.grid[1]||1))*(a.grid[1]||1);if(/^(se|s|e)$/.test(g)){b.size.width=d.width+h;b.size.height=d.height+a}else if(/^(ne)$/.test(g)){b.size.width=d.width+h;b.size.height=d.height+a;b.position.top=f.top-a}else{if(/^(sw)$/.test(g)){b.size.width=d.width+h;b.size.height=
|
||||
d.height+a}else{b.size.width=d.width+h;b.size.height=d.height+a;b.position.top=f.top-a}b.position.left=f.left-h}}});var m=function(b){return parseInt(b,10)||0},k=function(b){return!isNaN(parseInt(b,10))}})(jQuery);
|
||||
;/*
|
||||
* jQuery UI Selectable 1.8.12
|
||||
* jQuery UI Selectable 1.8.16
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
|
|
@ -207,9 +211,9 @@ c,{unselecting:b.element})}});e(c.target).parents().andSelf().each(function(){va
|
|||
this.options,b=this.opos[0],g=this.opos[1],h=c.pageX,i=c.pageY;if(b>h){var j=h;h=b;b=j}if(g>i){j=i;i=g;g=j}this.helper.css({left:b,top:g,width:h-b,height:i-g});this.selectees.each(function(){var a=e.data(this,"selectable-item");if(!(!a||a.element==f.element[0])){var k=false;if(d.tolerance=="touch")k=!(a.left>h||a.right<b||a.top>i||a.bottom<g);else if(d.tolerance=="fit")k=a.left>b&&a.right<h&&a.top>g&&a.bottom<i;if(k){if(a.selected){a.$element.removeClass("ui-selected");a.selected=false}if(a.unselecting){a.$element.removeClass("ui-unselecting");
|
||||
a.unselecting=false}if(!a.selecting){a.$element.addClass("ui-selecting");a.selecting=true;f._trigger("selecting",c,{selecting:a.element})}}else{if(a.selecting)if(c.metaKey&&a.startselected){a.$element.removeClass("ui-selecting");a.selecting=false;a.$element.addClass("ui-selected");a.selected=true}else{a.$element.removeClass("ui-selecting");a.selecting=false;if(a.startselected){a.$element.addClass("ui-unselecting");a.unselecting=true}f._trigger("unselecting",c,{unselecting:a.element})}if(a.selected)if(!c.metaKey&&
|
||||
!a.startselected){a.$element.removeClass("ui-selected");a.selected=false;a.$element.addClass("ui-unselecting");a.unselecting=true;f._trigger("unselecting",c,{unselecting:a.element})}}}});return false}},_mouseStop:function(c){var f=this;this.dragged=false;e(".ui-unselecting",this.element[0]).each(function(){var d=e.data(this,"selectable-item");d.$element.removeClass("ui-unselecting");d.unselecting=false;d.startselected=false;f._trigger("unselected",c,{unselected:d.element})});e(".ui-selecting",this.element[0]).each(function(){var d=
|
||||
e.data(this,"selectable-item");d.$element.removeClass("ui-selecting").addClass("ui-selected");d.selecting=false;d.selected=true;d.startselected=true;f._trigger("selected",c,{selected:d.element})});this._trigger("stop",c);this.helper.remove();return false}});e.extend(e.ui.selectable,{version:"1.8.12"})})(jQuery);
|
||||
e.data(this,"selectable-item");d.$element.removeClass("ui-selecting").addClass("ui-selected");d.selecting=false;d.selected=true;d.startselected=true;f._trigger("selected",c,{selected:d.element})});this._trigger("stop",c);this.helper.remove();return false}});e.extend(e.ui.selectable,{version:"1.8.16"})})(jQuery);
|
||||
;/*
|
||||
* jQuery UI Sortable 1.8.12
|
||||
* jQuery UI Sortable 1.8.16
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
|
|
@ -222,11 +226,11 @@ e.data(this,"selectable-item");d.$element.removeClass("ui-selecting").addClass("
|
|||
* jquery.ui.mouse.js
|
||||
* jquery.ui.widget.js
|
||||
*/
|
||||
(function(d){d.widget("ui.sortable",d.ui.mouse,{widgetEventPrefix:"sort",options:{appendTo:"parent",axis:false,connectWith:false,containment:false,cursor:"auto",cursorAt:false,dropOnEmpty:true,forcePlaceholderSize:false,forceHelperSize:false,grid:false,handle:false,helper:"original",items:"> *",opacity:false,placeholder:false,revert:false,scroll:true,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1E3},_create:function(){this.containerCache={};this.element.addClass("ui-sortable");
|
||||
this.refresh();this.floating=this.items.length?/left|right/.test(this.items[0].item.css("float"))||/inline|table-cell/.test(this.items[0].item.css("display")):false;this.offset=this.element.offset();this._mouseInit()},destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable");this._mouseDestroy();for(var a=this.items.length-1;a>=0;a--)this.items[a].item.removeData("sortable-item");return this},_setOption:function(a,b){if(a==="disabled"){this.options[a]=
|
||||
b;this.widget()[b?"addClass":"removeClass"]("ui-sortable-disabled")}else d.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(a,b){if(this.reverting)return false;if(this.options.disabled||this.options.type=="static")return false;this._refreshItems(a);var c=null,e=this;d(a.target).parents().each(function(){if(d.data(this,"sortable-item")==e){c=d(this);return false}});if(d.data(a.target,"sortable-item")==e)c=d(a.target);if(!c)return false;if(this.options.handle&&!b){var f=false;
|
||||
d(this.options.handle,c).find("*").andSelf().each(function(){if(this==a.target)f=true});if(!f)return false}this.currentItem=c;this._removeCurrentsFromItems();return true},_mouseStart:function(a,b,c){b=this.options;var e=this;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(a);this._cacheHelperProportions();this._cacheMargins();this.scrollParent=this.helper.scrollParent();this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-
|
||||
this.margins.left};this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");d.extend(this.offset,{click:{left:a.pageX-this.offset.left,top:a.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(a);this.originalPageX=a.pageX;this.originalPageY=a.pageY;b.cursorAt&&this._adjustOffsetFromHelper(b.cursorAt);this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};
|
||||
(function(d){d.widget("ui.sortable",d.ui.mouse,{widgetEventPrefix:"sort",options:{appendTo:"parent",axis:false,connectWith:false,containment:false,cursor:"auto",cursorAt:false,dropOnEmpty:true,forcePlaceholderSize:false,forceHelperSize:false,grid:false,handle:false,helper:"original",items:"> *",opacity:false,placeholder:false,revert:false,scroll:true,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1E3},_create:function(){var a=this.options;this.containerCache={};this.element.addClass("ui-sortable");
|
||||
this.refresh();this.floating=this.items.length?a.axis==="x"||/left|right/.test(this.items[0].item.css("float"))||/inline|table-cell/.test(this.items[0].item.css("display")):false;this.offset=this.element.offset();this._mouseInit()},destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable");this._mouseDestroy();for(var a=this.items.length-1;a>=0;a--)this.items[a].item.removeData("sortable-item");return this},_setOption:function(a,b){if(a===
|
||||
"disabled"){this.options[a]=b;this.widget()[b?"addClass":"removeClass"]("ui-sortable-disabled")}else d.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(a,b){if(this.reverting)return false;if(this.options.disabled||this.options.type=="static")return false;this._refreshItems(a);var c=null,e=this;d(a.target).parents().each(function(){if(d.data(this,"sortable-item")==e){c=d(this);return false}});if(d.data(a.target,"sortable-item")==e)c=d(a.target);if(!c)return false;if(this.options.handle&&
|
||||
!b){var f=false;d(this.options.handle,c).find("*").andSelf().each(function(){if(this==a.target)f=true});if(!f)return false}this.currentItem=c;this._removeCurrentsFromItems();return true},_mouseStart:function(a,b,c){b=this.options;var e=this;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(a);this._cacheHelperProportions();this._cacheMargins();this.scrollParent=this.helper.scrollParent();this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top,
|
||||
left:this.offset.left-this.margins.left};this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");d.extend(this.offset,{click:{left:a.pageX-this.offset.left,top:a.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(a);this.originalPageX=a.pageX;this.originalPageY=a.pageY;b.cursorAt&&this._adjustOffsetFromHelper(b.cursorAt);this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};
|
||||
this.helper[0]!=this.currentItem[0]&&this.currentItem.hide();this._createPlaceholder();b.containment&&this._setContainment();if(b.cursor){if(d("body").css("cursor"))this._storedCursor=d("body").css("cursor");d("body").css("cursor",b.cursor)}if(b.opacity){if(this.helper.css("opacity"))this._storedOpacity=this.helper.css("opacity");this.helper.css("opacity",b.opacity)}if(b.zIndex){if(this.helper.css("zIndex"))this._storedZIndex=this.helper.css("zIndex");this.helper.css("zIndex",b.zIndex)}if(this.scrollParent[0]!=
|
||||
document&&this.scrollParent[0].tagName!="HTML")this.overflowOffset=this.scrollParent.offset();this._trigger("start",a,this._uiHash());this._preserveHelperProportions||this._cacheHelperProportions();if(!c)for(c=this.containers.length-1;c>=0;c--)this.containers[c]._trigger("activate",a,e._uiHash(this));if(d.ui.ddmanager)d.ui.ddmanager.current=this;d.ui.ddmanager&&!b.dropBehaviour&&d.ui.ddmanager.prepareOffsets(this,a);this.dragging=true;this.helper.addClass("ui-sortable-helper");this._mouseDrag(a);
|
||||
return true},_mouseDrag:function(a){this.position=this._generatePosition(a);this.positionAbs=this._convertPositionTo("absolute");if(!this.lastPositionAbs)this.lastPositionAbs=this.positionAbs;if(this.options.scroll){var b=this.options,c=false;if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){if(this.overflowOffset.top+this.scrollParent[0].offsetHeight-a.pageY<b.scrollSensitivity)this.scrollParent[0].scrollTop=c=this.scrollParent[0].scrollTop+b.scrollSpeed;else if(a.pageY-this.overflowOffset.top<
|
||||
|
|
@ -262,14 +266,14 @@ this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scroll
|
|||
var f=a.pageX,g=a.pageY;if(this.originalPosition){if(this.containment){if(a.pageX-this.offset.click.left<this.containment[0])f=this.containment[0]+this.offset.click.left;if(a.pageY-this.offset.click.top<this.containment[1])g=this.containment[1]+this.offset.click.top;if(a.pageX-this.offset.click.left>this.containment[2])f=this.containment[2]+this.offset.click.left;if(a.pageY-this.offset.click.top>this.containment[3])g=this.containment[3]+this.offset.click.top}if(b.grid){g=this.originalPageY+Math.round((g-
|
||||
this.originalPageY)/b.grid[1])*b.grid[1];g=this.containment?!(g-this.offset.click.top<this.containment[1]||g-this.offset.click.top>this.containment[3])?g:!(g-this.offset.click.top<this.containment[1])?g-b.grid[1]:g+b.grid[1]:g;f=this.originalPageX+Math.round((f-this.originalPageX)/b.grid[0])*b.grid[0];f=this.containment?!(f-this.offset.click.left<this.containment[0]||f-this.offset.click.left>this.containment[2])?f:!(f-this.offset.click.left<this.containment[0])?f-b.grid[0]:f+b.grid[0]:f}}return{top:g-
|
||||
this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(d.browser.safari&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():e?0:c.scrollTop()),left:f-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(d.browser.safari&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():e?0:c.scrollLeft())}},_rearrange:function(a,b,c,e){c?c[0].appendChild(this.placeholder[0]):b.item[0].parentNode.insertBefore(this.placeholder[0],
|
||||
this.direction=="down"?b.item[0]:b.item[0].nextSibling);this.counter=this.counter?++this.counter:1;var f=this,g=this.counter;window.setTimeout(function(){g==f.counter&&f.refreshPositions(!e)},0)},_clear:function(a,b){this.reverting=false;var c=[];!this._noFinalSort&&this.currentItem[0].parentNode&&this.placeholder.before(this.currentItem);this._noFinalSort=null;if(this.helper[0]==this.currentItem[0]){for(var e in this._storedCSS)if(this._storedCSS[e]=="auto"||this._storedCSS[e]=="static")this._storedCSS[e]=
|
||||
this.direction=="down"?b.item[0]:b.item[0].nextSibling);this.counter=this.counter?++this.counter:1;var f=this,g=this.counter;window.setTimeout(function(){g==f.counter&&f.refreshPositions(!e)},0)},_clear:function(a,b){this.reverting=false;var c=[];!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem);this._noFinalSort=null;if(this.helper[0]==this.currentItem[0]){for(var e in this._storedCSS)if(this._storedCSS[e]=="auto"||this._storedCSS[e]=="static")this._storedCSS[e]=
|
||||
"";this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();this.fromOutside&&!b&&c.push(function(f){this._trigger("receive",f,this._uiHash(this.fromOutside))});if((this.fromOutside||this.domPosition.prev!=this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!=this.currentItem.parent()[0])&&!b)c.push(function(f){this._trigger("update",f,this._uiHash())});if(!d.ui.contains(this.element[0],this.currentItem[0])){b||c.push(function(f){this._trigger("remove",
|
||||
f,this._uiHash())});for(e=this.containers.length-1;e>=0;e--)if(d.ui.contains(this.containers[e].element[0],this.currentItem[0])&&!b){c.push(function(f){return function(g){f._trigger("receive",g,this._uiHash(this))}}.call(this,this.containers[e]));c.push(function(f){return function(g){f._trigger("update",g,this._uiHash(this))}}.call(this,this.containers[e]))}}for(e=this.containers.length-1;e>=0;e--){b||c.push(function(f){return function(g){f._trigger("deactivate",g,this._uiHash(this))}}.call(this,
|
||||
this.containers[e]));if(this.containers[e].containerCache.over){c.push(function(f){return function(g){f._trigger("out",g,this._uiHash(this))}}.call(this,this.containers[e]));this.containers[e].containerCache.over=0}}this._storedCursor&&d("body").css("cursor",this._storedCursor);this._storedOpacity&&this.helper.css("opacity",this._storedOpacity);if(this._storedZIndex)this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex);this.dragging=false;if(this.cancelHelperRemoval){if(!b){this._trigger("beforeStop",
|
||||
a,this._uiHash());for(e=0;e<c.length;e++)c[e].call(this,a);this._trigger("stop",a,this._uiHash())}return false}b||this._trigger("beforeStop",a,this._uiHash());this.placeholder[0].parentNode.removeChild(this.placeholder[0]);this.helper[0]!=this.currentItem[0]&&this.helper.remove();this.helper=null;if(!b){for(e=0;e<c.length;e++)c[e].call(this,a);this._trigger("stop",a,this._uiHash())}this.fromOutside=false;return true},_trigger:function(){d.Widget.prototype._trigger.apply(this,arguments)===false&&this.cancel()},
|
||||
_uiHash:function(a){var b=a||this;return{helper:b.helper,placeholder:b.placeholder||d([]),position:b.position,originalPosition:b.originalPosition,offset:b.positionAbs,item:b.currentItem,sender:a?a.element:null}}});d.extend(d.ui.sortable,{version:"1.8.12"})})(jQuery);
|
||||
_uiHash:function(a){var b=a||this;return{helper:b.helper,placeholder:b.placeholder||d([]),position:b.position,originalPosition:b.originalPosition,offset:b.positionAbs,item:b.currentItem,sender:a?a.element:null}}});d.extend(d.ui.sortable,{version:"1.8.16"})})(jQuery);
|
||||
;/*
|
||||
* jQuery UI Accordion 1.8.12
|
||||
* jQuery UI Accordion 1.8.16
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
|
|
@ -294,12 +298,12 @@ if(!d.disabled)if(a.target){a=c(a.currentTarget||b);b=a[0]===this.active[0];d.ac
|
|||
if(!b){a.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").children(".ui-icon").removeClass(d.icons.header).addClass(d.icons.headerSelected);a.next().addClass("ui-accordion-content-active")}}}else if(d.collapsible){this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header);this.active.next().addClass("ui-accordion-content-active");var g=this.active.next(),
|
||||
e={options:d,newHeader:c([]),oldHeader:d.active,newContent:c([]),oldContent:g},j=this.active=c([]);this._toggle(j,g,e)}},_toggle:function(a,b,d,h,f){var g=this,e=g.options;g.toShow=a;g.toHide=b;g.data=d;var j=function(){if(g)return g._completed.apply(g,arguments)};g._trigger("changestart",null,g.data);g.running=b.size()===0?a.size():b.size();if(e.animated){d={};d=e.collapsible&&h?{toShow:c([]),toHide:b,complete:j,down:f,autoHeight:e.autoHeight||e.fillSpace}:{toShow:a,toHide:b,complete:j,down:f,autoHeight:e.autoHeight||
|
||||
e.fillSpace};if(!e.proxied)e.proxied=e.animated;if(!e.proxiedDuration)e.proxiedDuration=e.duration;e.animated=c.isFunction(e.proxied)?e.proxied(d):e.proxied;e.duration=c.isFunction(e.proxiedDuration)?e.proxiedDuration(d):e.proxiedDuration;h=c.ui.accordion.animations;var i=e.duration,k=e.animated;if(k&&!h[k]&&!c.easing[k])k="slide";h[k]||(h[k]=function(l){this.slide(l,{easing:k,duration:i||700})});h[k](d)}else{if(e.collapsible&&h)a.toggle();else{b.hide();a.show()}j(true)}b.prev().attr({"aria-expanded":"false",
|
||||
"aria-selected":"false",tabIndex:-1}).blur();a.prev().attr({"aria-expanded":"true","aria-selected":"true",tabIndex:0}).focus()},_completed:function(a){this.running=a?0:--this.running;if(!this.running){this.options.clearStyle&&this.toShow.add(this.toHide).css({height:"",overflow:""});this.toHide.removeClass("ui-accordion-content-active");if(this.toHide.length)this.toHide.parent()[0].className=this.toHide.parent()[0].className;this._trigger("change",null,this.data)}}});c.extend(c.ui.accordion,{version:"1.8.12",
|
||||
"aria-selected":"false",tabIndex:-1}).blur();a.prev().attr({"aria-expanded":"true","aria-selected":"true",tabIndex:0}).focus()},_completed:function(a){this.running=a?0:--this.running;if(!this.running){this.options.clearStyle&&this.toShow.add(this.toHide).css({height:"",overflow:""});this.toHide.removeClass("ui-accordion-content-active");if(this.toHide.length)this.toHide.parent()[0].className=this.toHide.parent()[0].className;this._trigger("change",null,this.data)}}});c.extend(c.ui.accordion,{version:"1.8.16",
|
||||
animations:{slide:function(a,b){a=c.extend({easing:"swing",duration:300},a,b);if(a.toHide.size())if(a.toShow.size()){var d=a.toShow.css("overflow"),h=0,f={},g={},e;b=a.toShow;e=b[0].style.width;b.width(parseInt(b.parent().width(),10)-parseInt(b.css("paddingLeft"),10)-parseInt(b.css("paddingRight"),10)-(parseInt(b.css("borderLeftWidth"),10)||0)-(parseInt(b.css("borderRightWidth"),10)||0));c.each(["height","paddingTop","paddingBottom"],function(j,i){g[i]="hide";j=(""+c.css(a.toShow[0],i)).match(/^([\d+-.]+)(.*)$/);
|
||||
f[i]={value:j[1],unit:j[2]||"px"}});a.toShow.css({height:0,overflow:"hidden"}).show();a.toHide.filter(":hidden").each(a.complete).end().filter(":visible").animate(g,{step:function(j,i){if(i.prop=="height")h=i.end-i.start===0?0:(i.now-i.start)/(i.end-i.start);a.toShow[0].style[i.prop]=h*f[i.prop].value+f[i.prop].unit},duration:a.duration,easing:a.easing,complete:function(){a.autoHeight||a.toShow.css("height","");a.toShow.css({width:e,overflow:d});a.complete()}})}else a.toHide.animate({height:"hide",
|
||||
paddingTop:"hide",paddingBottom:"hide"},a);else a.toShow.animate({height:"show",paddingTop:"show",paddingBottom:"show"},a)},bounceslide:function(a){this.slide(a,{easing:a.down?"easeOutBounce":"swing",duration:a.down?1E3:200})}}})})(jQuery);
|
||||
;/*
|
||||
* jQuery UI Autocomplete 1.8.12
|
||||
* jQuery UI Autocomplete 1.8.16
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
|
|
@ -312,7 +316,7 @@ paddingTop:"hide",paddingBottom:"hide"},a);else a.toShow.animate({height:"show",
|
|||
* jquery.ui.widget.js
|
||||
* jquery.ui.position.js
|
||||
*/
|
||||
(function(d){var e=0;d.widget("ui.autocomplete",{options:{appendTo:"body",autoFocus:false,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null},pending:0,_create:function(){var a=this,b=this.element[0].ownerDocument,g;this.element.addClass("ui-autocomplete-input").attr("autocomplete","off").attr({role:"textbox","aria-autocomplete":"list","aria-haspopup":"true"}).bind("keydown.autocomplete",function(c){if(!(a.options.disabled||a.element.attr("readonly"))){g=
|
||||
(function(d){var e=0;d.widget("ui.autocomplete",{options:{appendTo:"body",autoFocus:false,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null},pending:0,_create:function(){var a=this,b=this.element[0].ownerDocument,g;this.element.addClass("ui-autocomplete-input").attr("autocomplete","off").attr({role:"textbox","aria-autocomplete":"list","aria-haspopup":"true"}).bind("keydown.autocomplete",function(c){if(!(a.options.disabled||a.element.propAttr("readOnly"))){g=
|
||||
false;var f=d.ui.keyCode;switch(c.keyCode){case f.PAGE_UP:a._move("previousPage",c);break;case f.PAGE_DOWN:a._move("nextPage",c);break;case f.UP:a._move("previous",c);c.preventDefault();break;case f.DOWN:a._move("next",c);c.preventDefault();break;case f.ENTER:case f.NUMPAD_ENTER:if(a.menu.active){g=true;c.preventDefault()}case f.TAB:if(!a.menu.active)return;a.menu.select(c);break;case f.ESCAPE:a.element.val(a.term);a.close(c);break;default:clearTimeout(a.searching);a.searching=setTimeout(function(){if(a.term!=
|
||||
a.element.val()){a.selectedItem=null;a.search(null,c)}},a.options.delay);break}}}).bind("keypress.autocomplete",function(c){if(g){g=false;c.preventDefault()}}).bind("focus.autocomplete",function(){if(!a.options.disabled){a.selectedItem=null;a.previous=a.element.val()}}).bind("blur.autocomplete",function(c){if(!a.options.disabled){clearTimeout(a.searching);a.closing=setTimeout(function(){a.close(c);a._change(c)},150)}});this._initSource();this.response=function(){return a._response.apply(a,arguments)};
|
||||
this.menu=d("<ul></ul>").addClass("ui-autocomplete").appendTo(d(this.options.appendTo||"body",b)[0]).mousedown(function(c){var f=a.menu.element[0];d(c.target).closest(".ui-menu-item").length||setTimeout(function(){d(document).one("mousedown",function(h){h.target!==a.element[0]&&h.target!==f&&!d.ui.contains(f,h.target)&&a.close()})},1);setTimeout(function(){clearTimeout(a.closing)},13)}).menu({focus:function(c,f){f=f.item.data("item.autocomplete");false!==a._trigger("focus",c,{item:f})&&/^key/.test(c.originalEvent.type)&&
|
||||
|
|
@ -325,13 +329,13 @@ b.value,value:b.value||b.label},b)})},_suggest:function(a){var b=this.menu.eleme
|
|||
d.each(b,function(c,f){g._renderItem(a,f)})},_renderItem:function(a,b){return d("<li></li>").data("item.autocomplete",b).append(d("<a></a>").text(b.label)).appendTo(a)},_move:function(a,b){if(this.menu.element.is(":visible"))if(this.menu.first()&&/^previous/.test(a)||this.menu.last()&&/^next/.test(a)){this.element.val(this.term);this.menu.deactivate()}else this.menu[a](b);else this.search(null,b)},widget:function(){return this.menu.element}});d.extend(d.ui.autocomplete,{escapeRegex:function(a){return a.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,
|
||||
"\\$&")},filter:function(a,b){var g=new RegExp(d.ui.autocomplete.escapeRegex(b),"i");return d.grep(a,function(c){return g.test(c.label||c.value||c)})}})})(jQuery);
|
||||
(function(d){d.widget("ui.menu",{_create:function(){var e=this;this.element.addClass("ui-menu ui-widget ui-widget-content ui-corner-all").attr({role:"listbox","aria-activedescendant":"ui-active-menuitem"}).click(function(a){if(d(a.target).closest(".ui-menu-item a").length){a.preventDefault();e.select(a)}});this.refresh()},refresh:function(){var e=this;this.element.children("li:not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","menuitem").children("a").addClass("ui-corner-all").attr("tabindex",
|
||||
-1).mouseenter(function(a){e.activate(a,d(this).parent())}).mouseleave(function(){e.deactivate()})},activate:function(e,a){this.deactivate();if(this.hasScroll()){var b=a.offset().top-this.element.offset().top,g=this.element.attr("scrollTop"),c=this.element.height();if(b<0)this.element.attr("scrollTop",g+b);else b>=c&&this.element.attr("scrollTop",g+b-c+a.height())}this.active=a.eq(0).children("a").addClass("ui-state-hover").attr("id","ui-active-menuitem").end();this._trigger("focus",e,{item:a})},
|
||||
deactivate:function(){if(this.active){this.active.children("a").removeClass("ui-state-hover").removeAttr("id");this._trigger("blur");this.active=null}},next:function(e){this.move("next",".ui-menu-item:first",e)},previous:function(e){this.move("prev",".ui-menu-item:last",e)},first:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},last:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},move:function(e,a,b){if(this.active){e=this.active[e+"All"](".ui-menu-item").eq(0);
|
||||
e.length?this.activate(b,e):this.activate(b,this.element.children(a))}else this.activate(b,this.element.children(a))},nextPage:function(e){if(this.hasScroll())if(!this.active||this.last())this.activate(e,this.element.children(".ui-menu-item:first"));else{var a=this.active.offset().top,b=this.element.height(),g=this.element.children(".ui-menu-item").filter(function(){var c=d(this).offset().top-a-b+d(this).height();return c<10&&c>-10});g.length||(g=this.element.children(".ui-menu-item:last"));this.activate(e,
|
||||
g)}else this.activate(e,this.element.children(".ui-menu-item").filter(!this.active||this.last()?":first":":last"))},previousPage:function(e){if(this.hasScroll())if(!this.active||this.first())this.activate(e,this.element.children(".ui-menu-item:last"));else{var a=this.active.offset().top,b=this.element.height();result=this.element.children(".ui-menu-item").filter(function(){var g=d(this).offset().top-a+b-d(this).height();return g<10&&g>-10});result.length||(result=this.element.children(".ui-menu-item:first"));
|
||||
this.activate(e,result)}else this.activate(e,this.element.children(".ui-menu-item").filter(!this.active||this.first()?":last":":first"))},hasScroll:function(){return this.element.height()<this.element.attr("scrollHeight")},select:function(e){this._trigger("selected",e,{item:this.active})}})})(jQuery);
|
||||
-1).mouseenter(function(a){e.activate(a,d(this).parent())}).mouseleave(function(){e.deactivate()})},activate:function(e,a){this.deactivate();if(this.hasScroll()){var b=a.offset().top-this.element.offset().top,g=this.element.scrollTop(),c=this.element.height();if(b<0)this.element.scrollTop(g+b);else b>=c&&this.element.scrollTop(g+b-c+a.height())}this.active=a.eq(0).children("a").addClass("ui-state-hover").attr("id","ui-active-menuitem").end();this._trigger("focus",e,{item:a})},deactivate:function(){if(this.active){this.active.children("a").removeClass("ui-state-hover").removeAttr("id");
|
||||
this._trigger("blur");this.active=null}},next:function(e){this.move("next",".ui-menu-item:first",e)},previous:function(e){this.move("prev",".ui-menu-item:last",e)},first:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},last:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},move:function(e,a,b){if(this.active){e=this.active[e+"All"](".ui-menu-item").eq(0);e.length?this.activate(b,e):this.activate(b,this.element.children(a))}else this.activate(b,
|
||||
this.element.children(a))},nextPage:function(e){if(this.hasScroll())if(!this.active||this.last())this.activate(e,this.element.children(".ui-menu-item:first"));else{var a=this.active.offset().top,b=this.element.height(),g=this.element.children(".ui-menu-item").filter(function(){var c=d(this).offset().top-a-b+d(this).height();return c<10&&c>-10});g.length||(g=this.element.children(".ui-menu-item:last"));this.activate(e,g)}else this.activate(e,this.element.children(".ui-menu-item").filter(!this.active||
|
||||
this.last()?":first":":last"))},previousPage:function(e){if(this.hasScroll())if(!this.active||this.first())this.activate(e,this.element.children(".ui-menu-item:last"));else{var a=this.active.offset().top,b=this.element.height();result=this.element.children(".ui-menu-item").filter(function(){var g=d(this).offset().top-a+b-d(this).height();return g<10&&g>-10});result.length||(result=this.element.children(".ui-menu-item:first"));this.activate(e,result)}else this.activate(e,this.element.children(".ui-menu-item").filter(!this.active||
|
||||
this.first()?":last":":first"))},hasScroll:function(){return this.element.height()<this.element[d.fn.prop?"prop":"attr"]("scrollHeight")},select:function(e){this._trigger("selected",e,{item:this.active})}})})(jQuery);
|
||||
;/*
|
||||
* jQuery UI Button 1.8.12
|
||||
* jQuery UI Button 1.8.16
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
|
|
@ -343,20 +347,22 @@ this.activate(e,result)}else this.activate(e,this.element.children(".ui-menu-ite
|
|||
* jquery.ui.core.js
|
||||
* jquery.ui.widget.js
|
||||
*/
|
||||
(function(a){var g,i=function(b){a(":ui-button",b.target.form).each(function(){var c=a(this).data("button");setTimeout(function(){c.refresh()},1)})},h=function(b){var c=b.name,d=b.form,f=a([]);if(c)f=d?a(d).find("[name='"+c+"']"):a("[name='"+c+"']",b.ownerDocument).filter(function(){return!this.form});return f};a.widget("ui.button",{options:{disabled:null,text:true,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset.button").bind("reset.button",
|
||||
i);if(typeof this.options.disabled!=="boolean")this.options.disabled=this.element.attr("disabled");this._determineButtonType();this.hasTitle=!!this.buttonElement.attr("title");var b=this,c=this.options,d=this.type==="checkbox"||this.type==="radio",f="ui-state-hover"+(!d?" ui-state-active":"");if(c.label===null)c.label=this.buttonElement.html();if(this.element.is(":disabled"))c.disabled=true;this.buttonElement.addClass("ui-button ui-widget ui-state-default ui-corner-all").attr("role","button").bind("mouseenter.button",
|
||||
function(){if(!c.disabled){a(this).addClass("ui-state-hover");this===g&&a(this).addClass("ui-state-active")}}).bind("mouseleave.button",function(){c.disabled||a(this).removeClass(f)}).bind("focus.button",function(){a(this).addClass("ui-state-focus")}).bind("blur.button",function(){a(this).removeClass("ui-state-focus")});d&&this.element.bind("change.button",function(){b.refresh()});if(this.type==="checkbox")this.buttonElement.bind("click.button",function(){if(c.disabled)return false;a(this).toggleClass("ui-state-active");
|
||||
b.buttonElement.attr("aria-pressed",b.element[0].checked)});else if(this.type==="radio")this.buttonElement.bind("click.button",function(){if(c.disabled)return false;a(this).addClass("ui-state-active");b.buttonElement.attr("aria-pressed",true);var e=b.element[0];h(e).not(e).map(function(){return a(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed",false)});else{this.buttonElement.bind("mousedown.button",function(){if(c.disabled)return false;a(this).addClass("ui-state-active");
|
||||
g=this;a(document).one("mouseup",function(){g=null})}).bind("mouseup.button",function(){if(c.disabled)return false;a(this).removeClass("ui-state-active")}).bind("keydown.button",function(e){if(c.disabled)return false;if(e.keyCode==a.ui.keyCode.SPACE||e.keyCode==a.ui.keyCode.ENTER)a(this).addClass("ui-state-active")}).bind("keyup.button",function(){a(this).removeClass("ui-state-active")});this.buttonElement.is("a")&&this.buttonElement.keyup(function(e){e.keyCode===a.ui.keyCode.SPACE&&a(this).click()})}this._setOption("disabled",
|
||||
c.disabled)},_determineButtonType:function(){this.type=this.element.is(":checkbox")?"checkbox":this.element.is(":radio")?"radio":this.element.is("input")?"input":"button";if(this.type==="checkbox"||this.type==="radio"){var b=this.element.parents().filter(":last"),c="label[for="+this.element.attr("id")+"]";this.buttonElement=b.find(c);if(!this.buttonElement.length){b=b.length?b.siblings():this.element.siblings();this.buttonElement=b.filter(c);if(!this.buttonElement.length)this.buttonElement=b.find(c)}this.element.addClass("ui-helper-hidden-accessible");
|
||||
(b=this.element.is(":checked"))&&this.buttonElement.addClass("ui-state-active");this.buttonElement.attr("aria-pressed",b)}else this.buttonElement=this.element},widget:function(){return this.buttonElement},destroy:function(){this.element.removeClass("ui-helper-hidden-accessible");this.buttonElement.removeClass("ui-button ui-widget ui-state-default ui-corner-all ui-state-hover ui-state-active ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only").removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html());
|
||||
this.hasTitle||this.buttonElement.removeAttr("title");a.Widget.prototype.destroy.call(this)},_setOption:function(b,c){a.Widget.prototype._setOption.apply(this,arguments);if(b==="disabled")c?this.element.attr("disabled",true):this.element.removeAttr("disabled");this._resetButton()},refresh:function(){var b=this.element.is(":disabled");b!==this.options.disabled&&this._setOption("disabled",b);if(this.type==="radio")h(this.element[0]).each(function(){a(this).is(":checked")?a(this).button("widget").addClass("ui-state-active").attr("aria-pressed",
|
||||
true):a(this).button("widget").removeClass("ui-state-active").attr("aria-pressed",false)});else if(this.type==="checkbox")this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed",true):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed",false)},_resetButton:function(){if(this.type==="input")this.options.label&&this.element.val(this.options.label);else{var b=this.buttonElement.removeClass("ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only"),
|
||||
c=a("<span></span>").addClass("ui-button-text").html(this.options.label).appendTo(b.empty()).text(),d=this.options.icons,f=d.primary&&d.secondary,e=[];if(d.primary||d.secondary){if(this.options.text)e.push("ui-button-text-icon"+(f?"s":d.primary?"-primary":"-secondary"));d.primary&&b.prepend("<span class='ui-button-icon-primary ui-icon "+d.primary+"'></span>");d.secondary&&b.append("<span class='ui-button-icon-secondary ui-icon "+d.secondary+"'></span>");if(!this.options.text){e.push(f?"ui-button-icons-only":
|
||||
"ui-button-icon-only");this.hasTitle||b.attr("title",c)}}else e.push("ui-button-text-only");b.addClass(e.join(" "))}}});a.widget("ui.buttonset",{options:{items:":button, :submit, :reset, :checkbox, :radio, a, :data(button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(b,c){b==="disabled"&&this.buttons.button("option",b,c);a.Widget.prototype._setOption.apply(this,arguments)},refresh:function(){this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return a(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass("ui-corner-left").end().filter(":last").addClass("ui-corner-right").end().end()},
|
||||
destroy:function(){this.element.removeClass("ui-buttonset");this.buttons.map(function(){return a(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy");a.Widget.prototype.destroy.call(this)}})})(jQuery);
|
||||
(function(b){var h,i,j,g,l=function(){var a=b(this).find(":ui-button");setTimeout(function(){a.button("refresh")},1)},k=function(a){var c=a.name,e=a.form,f=b([]);if(c)f=e?b(e).find("[name='"+c+"']"):b("[name='"+c+"']",a.ownerDocument).filter(function(){return!this.form});return f};b.widget("ui.button",{options:{disabled:null,text:true,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset.button").bind("reset.button",l);if(typeof this.options.disabled!==
|
||||
"boolean")this.options.disabled=this.element.propAttr("disabled");this._determineButtonType();this.hasTitle=!!this.buttonElement.attr("title");var a=this,c=this.options,e=this.type==="checkbox"||this.type==="radio",f="ui-state-hover"+(!e?" ui-state-active":"");if(c.label===null)c.label=this.buttonElement.html();if(this.element.is(":disabled"))c.disabled=true;this.buttonElement.addClass("ui-button ui-widget ui-state-default ui-corner-all").attr("role","button").bind("mouseenter.button",function(){if(!c.disabled){b(this).addClass("ui-state-hover");
|
||||
this===h&&b(this).addClass("ui-state-active")}}).bind("mouseleave.button",function(){c.disabled||b(this).removeClass(f)}).bind("click.button",function(d){if(c.disabled){d.preventDefault();d.stopImmediatePropagation()}});this.element.bind("focus.button",function(){a.buttonElement.addClass("ui-state-focus")}).bind("blur.button",function(){a.buttonElement.removeClass("ui-state-focus")});if(e){this.element.bind("change.button",function(){g||a.refresh()});this.buttonElement.bind("mousedown.button",function(d){if(!c.disabled){g=
|
||||
false;i=d.pageX;j=d.pageY}}).bind("mouseup.button",function(d){if(!c.disabled)if(i!==d.pageX||j!==d.pageY)g=true})}if(this.type==="checkbox")this.buttonElement.bind("click.button",function(){if(c.disabled||g)return false;b(this).toggleClass("ui-state-active");a.buttonElement.attr("aria-pressed",a.element[0].checked)});else if(this.type==="radio")this.buttonElement.bind("click.button",function(){if(c.disabled||g)return false;b(this).addClass("ui-state-active");a.buttonElement.attr("aria-pressed","true");
|
||||
var d=a.element[0];k(d).not(d).map(function(){return b(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")});else{this.buttonElement.bind("mousedown.button",function(){if(c.disabled)return false;b(this).addClass("ui-state-active");h=this;b(document).one("mouseup",function(){h=null})}).bind("mouseup.button",function(){if(c.disabled)return false;b(this).removeClass("ui-state-active")}).bind("keydown.button",function(d){if(c.disabled)return false;if(d.keyCode==b.ui.keyCode.SPACE||
|
||||
d.keyCode==b.ui.keyCode.ENTER)b(this).addClass("ui-state-active")}).bind("keyup.button",function(){b(this).removeClass("ui-state-active")});this.buttonElement.is("a")&&this.buttonElement.keyup(function(d){d.keyCode===b.ui.keyCode.SPACE&&b(this).click()})}this._setOption("disabled",c.disabled);this._resetButton()},_determineButtonType:function(){this.type=this.element.is(":checkbox")?"checkbox":this.element.is(":radio")?"radio":this.element.is("input")?"input":"button";if(this.type==="checkbox"||this.type===
|
||||
"radio"){var a=this.element.parents().filter(":last"),c="label[for='"+this.element.attr("id")+"']";this.buttonElement=a.find(c);if(!this.buttonElement.length){a=a.length?a.siblings():this.element.siblings();this.buttonElement=a.filter(c);if(!this.buttonElement.length)this.buttonElement=a.find(c)}this.element.addClass("ui-helper-hidden-accessible");(a=this.element.is(":checked"))&&this.buttonElement.addClass("ui-state-active");this.buttonElement.attr("aria-pressed",a)}else this.buttonElement=this.element},
|
||||
widget:function(){return this.buttonElement},destroy:function(){this.element.removeClass("ui-helper-hidden-accessible");this.buttonElement.removeClass("ui-button ui-widget ui-state-default ui-corner-all ui-state-hover ui-state-active ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only").removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html());this.hasTitle||this.buttonElement.removeAttr("title");
|
||||
b.Widget.prototype.destroy.call(this)},_setOption:function(a,c){b.Widget.prototype._setOption.apply(this,arguments);if(a==="disabled")c?this.element.propAttr("disabled",true):this.element.propAttr("disabled",false);else this._resetButton()},refresh:function(){var a=this.element.is(":disabled");a!==this.options.disabled&&this._setOption("disabled",a);if(this.type==="radio")k(this.element[0]).each(function(){b(this).is(":checked")?b(this).button("widget").addClass("ui-state-active").attr("aria-pressed",
|
||||
"true"):b(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")});else if(this.type==="checkbox")this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false")},_resetButton:function(){if(this.type==="input")this.options.label&&this.element.val(this.options.label);else{var a=this.buttonElement.removeClass("ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only"),
|
||||
c=b("<span></span>").addClass("ui-button-text").html(this.options.label).appendTo(a.empty()).text(),e=this.options.icons,f=e.primary&&e.secondary,d=[];if(e.primary||e.secondary){if(this.options.text)d.push("ui-button-text-icon"+(f?"s":e.primary?"-primary":"-secondary"));e.primary&&a.prepend("<span class='ui-button-icon-primary ui-icon "+e.primary+"'></span>");e.secondary&&a.append("<span class='ui-button-icon-secondary ui-icon "+e.secondary+"'></span>");if(!this.options.text){d.push(f?"ui-button-icons-only":
|
||||
"ui-button-icon-only");this.hasTitle||a.attr("title",c)}}else d.push("ui-button-text-only");a.addClass(d.join(" "))}}});b.widget("ui.buttonset",{options:{items:":button, :submit, :reset, :checkbox, :radio, a, :data(button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(a,c){a==="disabled"&&this.buttons.button("option",a,c);b.Widget.prototype._setOption.apply(this,arguments)},refresh:function(){var a=this.element.css("direction")===
|
||||
"ltr";this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return b(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(a?"ui-corner-left":"ui-corner-right").end().filter(":last").addClass(a?"ui-corner-right":"ui-corner-left").end().end()},destroy:function(){this.element.removeClass("ui-buttonset");this.buttons.map(function(){return b(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy");
|
||||
b.Widget.prototype.destroy.call(this)}})})(jQuery);
|
||||
;/*
|
||||
* jQuery UI Dialog 1.8.12
|
||||
* jQuery UI Dialog 1.8.16
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
|
|
@ -375,12 +381,12 @@ destroy:function(){this.element.removeClass("ui-buttonset");this.buttons.map(fun
|
|||
*/
|
||||
(function(c,l){var m={buttons:true,height:true,maxHeight:true,maxWidth:true,minHeight:true,minWidth:true,width:true},n={maxHeight:true,maxWidth:true,minHeight:true,minWidth:true},o=c.attrFn||{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true,click:true};c.widget("ui.dialog",{options:{autoOpen:true,buttons:{},closeOnEscape:true,closeText:"close",dialogClass:"",draggable:true,hide:null,height:"auto",maxHeight:false,maxWidth:false,minHeight:150,minWidth:150,modal:false,
|
||||
position:{my:"center",at:"center",collision:"fit",using:function(a){var b=c(this).css(a).offset().top;b<0&&c(this).css("top",a.top-b)}},resizable:true,show:null,stack:true,title:"",width:300,zIndex:1E3},_create:function(){this.originalTitle=this.element.attr("title");if(typeof this.originalTitle!=="string")this.originalTitle="";this.options.title=this.options.title||this.originalTitle;var a=this,b=a.options,d=b.title||" ",e=c.ui.dialog.getTitleId(a.element),g=(a.uiDialog=c("<div></div>")).appendTo(document.body).hide().addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+
|
||||
b.dialogClass).css({zIndex:b.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(i){if(b.closeOnEscape&&i.keyCode&&i.keyCode===c.ui.keyCode.ESCAPE){a.close(i);i.preventDefault()}}).attr({role:"dialog","aria-labelledby":e}).mousedown(function(i){a.moveToTop(false,i)});a.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(g);var f=(a.uiDialogTitlebar=c("<div></div>")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(g),
|
||||
b.dialogClass).css({zIndex:b.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(i){if(b.closeOnEscape&&!i.isDefaultPrevented()&&i.keyCode&&i.keyCode===c.ui.keyCode.ESCAPE){a.close(i);i.preventDefault()}}).attr({role:"dialog","aria-labelledby":e}).mousedown(function(i){a.moveToTop(false,i)});a.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(g);var f=(a.uiDialogTitlebar=c("<div></div>")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(g),
|
||||
h=c('<a href="#"></a>').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){h.addClass("ui-state-hover")},function(){h.removeClass("ui-state-hover")}).focus(function(){h.addClass("ui-state-focus")}).blur(function(){h.removeClass("ui-state-focus")}).click(function(i){a.close(i);return false}).appendTo(f);(a.uiDialogTitlebarCloseText=c("<span></span>")).addClass("ui-icon ui-icon-closethick").text(b.closeText).appendTo(h);c("<span></span>").addClass("ui-dialog-title").attr("id",
|
||||
e).html(d).prependTo(f);if(c.isFunction(b.beforeclose)&&!c.isFunction(b.beforeClose))b.beforeClose=b.beforeclose;f.find("*").add(f).disableSelection();b.draggable&&c.fn.draggable&&a._makeDraggable();b.resizable&&c.fn.resizable&&a._makeResizable();a._createButtons(b.buttons);a._isOpen=false;c.fn.bgiframe&&g.bgiframe()},_init:function(){this.options.autoOpen&&this.open()},destroy:function(){var a=this;a.overlay&&a.overlay.destroy();a.uiDialog.hide();a.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body");
|
||||
a.uiDialog.remove();a.originalTitle&&a.element.attr("title",a.originalTitle);return a},widget:function(){return this.uiDialog},close:function(a){var b=this,d,e;if(false!==b._trigger("beforeClose",a)){b.overlay&&b.overlay.destroy();b.uiDialog.unbind("keypress.ui-dialog");b._isOpen=false;if(b.options.hide)b.uiDialog.hide(b.options.hide,function(){b._trigger("close",a)});else{b.uiDialog.hide();b._trigger("close",a)}c.ui.dialog.overlay.resize();if(b.options.modal){d=0;c(".ui-dialog").each(function(){if(this!==
|
||||
b.uiDialog[0]){e=c(this).css("z-index");isNaN(e)||(d=Math.max(d,e))}});c.ui.dialog.maxZ=d}return b}},isOpen:function(){return this._isOpen},moveToTop:function(a,b){var d=this,e=d.options;if(e.modal&&!a||!e.stack&&!e.modal)return d._trigger("focus",b);if(e.zIndex>c.ui.dialog.maxZ)c.ui.dialog.maxZ=e.zIndex;if(d.overlay){c.ui.dialog.maxZ+=1;d.overlay.$el.css("z-index",c.ui.dialog.overlay.maxZ=c.ui.dialog.maxZ)}a={scrollTop:d.element.attr("scrollTop"),scrollLeft:d.element.attr("scrollLeft")};c.ui.dialog.maxZ+=
|
||||
1;d.uiDialog.css("z-index",c.ui.dialog.maxZ);d.element.attr(a);d._trigger("focus",b);return d},open:function(){if(!this._isOpen){var a=this,b=a.options,d=a.uiDialog;a.overlay=b.modal?new c.ui.dialog.overlay(a):null;a._size();a._position(b.position);d.show(b.show);a.moveToTop(true);b.modal&&d.bind("keypress.ui-dialog",function(e){if(e.keyCode===c.ui.keyCode.TAB){var g=c(":tabbable",this),f=g.filter(":first");g=g.filter(":last");if(e.target===g[0]&&!e.shiftKey){f.focus(1);return false}else if(e.target===
|
||||
b.uiDialog[0]){e=c(this).css("z-index");isNaN(e)||(d=Math.max(d,e))}});c.ui.dialog.maxZ=d}return b}},isOpen:function(){return this._isOpen},moveToTop:function(a,b){var d=this,e=d.options;if(e.modal&&!a||!e.stack&&!e.modal)return d._trigger("focus",b);if(e.zIndex>c.ui.dialog.maxZ)c.ui.dialog.maxZ=e.zIndex;if(d.overlay){c.ui.dialog.maxZ+=1;d.overlay.$el.css("z-index",c.ui.dialog.overlay.maxZ=c.ui.dialog.maxZ)}a={scrollTop:d.element.scrollTop(),scrollLeft:d.element.scrollLeft()};c.ui.dialog.maxZ+=1;
|
||||
d.uiDialog.css("z-index",c.ui.dialog.maxZ);d.element.attr(a);d._trigger("focus",b);return d},open:function(){if(!this._isOpen){var a=this,b=a.options,d=a.uiDialog;a.overlay=b.modal?new c.ui.dialog.overlay(a):null;a._size();a._position(b.position);d.show(b.show);a.moveToTop(true);b.modal&&d.bind("keypress.ui-dialog",function(e){if(e.keyCode===c.ui.keyCode.TAB){var g=c(":tabbable",this),f=g.filter(":first");g=g.filter(":last");if(e.target===g[0]&&!e.shiftKey){f.focus(1);return false}else if(e.target===
|
||||
f[0]&&e.shiftKey){g.focus(1);return false}}});c(a.element.find(":tabbable").get().concat(d.find(".ui-dialog-buttonpane :tabbable").get().concat(d.get()))).eq(0).focus();a._isOpen=true;a._trigger("open");return a}},_createButtons:function(a){var b=this,d=false,e=c("<div></div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),g=c("<div></div>").addClass("ui-dialog-buttonset").appendTo(e);b.uiDialog.find(".ui-dialog-buttonpane").remove();typeof a==="object"&&a!==null&&c.each(a,
|
||||
function(){return!(d=true)});if(d){c.each(a,function(f,h){h=c.isFunction(h)?{click:h,text:f}:h;var i=c('<button type="button"></button>').click(function(){h.click.apply(b.element[0],arguments)}).appendTo(g);c.each(h,function(j,k){if(j!=="click")j in o?i[j](k):i.attr(j,k)});c.fn.button&&i.button()});e.appendTo(b.uiDialog)}},_makeDraggable:function(){function a(f){return{position:f.position,offset:f.offset}}var b=this,d=b.options,e=c(document),g;b.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",
|
||||
handle:".ui-dialog-titlebar",containment:"document",start:function(f,h){g=d.height==="auto"?"auto":c(this).height();c(this).height(c(this).height()).addClass("ui-dialog-dragging");b._trigger("dragStart",f,a(h))},drag:function(f,h){b._trigger("drag",f,a(h))},stop:function(f,h){d.position=[h.position.left-e.scrollLeft(),h.position.top-e.scrollTop()];c(this).removeClass("ui-dialog-dragging").height(g);b._trigger("dragStop",f,a(h));c.ui.dialog.overlay.resize()}})},_makeResizable:function(a){function b(f){return{originalPosition:f.originalPosition,
|
||||
|
|
@ -390,13 +396,13 @@ f,b(h))},stop:function(f,h){c(this).removeClass("ui-dialog-resizing");e.height=c
|
|||
if(g in m)e=true;if(g in n)d[g]=f});e&&this._size();this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option",d)},_setOption:function(a,b){var d=this,e=d.uiDialog;switch(a){case "beforeclose":a="beforeClose";break;case "buttons":d._createButtons(b);break;case "closeText":d.uiDialogTitlebarCloseText.text(""+b);break;case "dialogClass":e.removeClass(d.options.dialogClass).addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+b);break;case "disabled":b?e.addClass("ui-dialog-disabled"):
|
||||
e.removeClass("ui-dialog-disabled");break;case "draggable":var g=e.is(":data(draggable)");g&&!b&&e.draggable("destroy");!g&&b&&d._makeDraggable();break;case "position":d._position(b);break;case "resizable":(g=e.is(":data(resizable)"))&&!b&&e.resizable("destroy");g&&typeof b==="string"&&e.resizable("option","handles",b);!g&&b!==false&&d._makeResizable(b);break;case "title":c(".ui-dialog-title",d.uiDialogTitlebar).html(""+(b||" "));break}c.Widget.prototype._setOption.apply(d,arguments)},_size:function(){var a=
|
||||
this.options,b,d,e=this.uiDialog.is(":visible");this.element.show().css({width:"auto",minHeight:0,height:0});if(a.minWidth>a.width)a.width=a.minWidth;b=this.uiDialog.css({height:"auto",width:a.width}).height();d=Math.max(0,a.minHeight-b);if(a.height==="auto")if(c.support.minHeight)this.element.css({minHeight:d,height:"auto"});else{this.uiDialog.show();a=this.element.css("height","auto").height();e||this.uiDialog.hide();this.element.height(Math.max(a,d))}else this.element.height(Math.max(a.height-
|
||||
b,0));this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())}});c.extend(c.ui.dialog,{version:"1.8.12",uuid:0,maxZ:0,getTitleId:function(a){a=a.attr("id");if(!a){this.uuid+=1;a=this.uuid}return"ui-dialog-title-"+a},overlay:function(a){this.$el=c.ui.dialog.overlay.create(a)}});c.extend(c.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:c.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(a){return a+".dialog-overlay"}).join(" "),
|
||||
create:function(a){if(this.instances.length===0){setTimeout(function(){c.ui.dialog.overlay.instances.length&&c(document).bind(c.ui.dialog.overlay.events,function(d){if(c(d.target).zIndex()<c.ui.dialog.overlay.maxZ)return false})},1);c(document).bind("keydown.dialog-overlay",function(d){if(a.options.closeOnEscape&&d.keyCode&&d.keyCode===c.ui.keyCode.ESCAPE){a.close(d);d.preventDefault()}});c(window).bind("resize.dialog-overlay",c.ui.dialog.overlay.resize)}var b=(this.oldInstances.pop()||c("<div></div>").addClass("ui-widget-overlay")).appendTo(document.body).css({width:this.width(),
|
||||
height:this.height()});c.fn.bgiframe&&b.bgiframe();this.instances.push(b);return b},destroy:function(a){var b=c.inArray(a,this.instances);b!=-1&&this.oldInstances.push(this.instances.splice(b,1)[0]);this.instances.length===0&&c([document,window]).unbind(".dialog-overlay");a.remove();var d=0;c.each(this.instances,function(){d=Math.max(d,this.css("z-index"))});this.maxZ=d},height:function(){var a,b;if(c.browser.msie&&c.browser.version<7){a=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);
|
||||
b=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);return a<b?c(window).height()+"px":a+"px"}else return c(document).height()+"px"},width:function(){var a,b;if(c.browser.msie&&c.browser.version<7){a=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth);b=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);return a<b?c(window).width()+"px":a+"px"}else return c(document).width()+"px"},resize:function(){var a=c([]);c.each(c.ui.dialog.overlay.instances,
|
||||
function(){a=a.add(this)});a.css({width:0,height:0}).css({width:c.ui.dialog.overlay.width(),height:c.ui.dialog.overlay.height()})}});c.extend(c.ui.dialog.overlay.prototype,{destroy:function(){c.ui.dialog.overlay.destroy(this.$el)}})})(jQuery);
|
||||
b,0));this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())}});c.extend(c.ui.dialog,{version:"1.8.16",uuid:0,maxZ:0,getTitleId:function(a){a=a.attr("id");if(!a){this.uuid+=1;a=this.uuid}return"ui-dialog-title-"+a},overlay:function(a){this.$el=c.ui.dialog.overlay.create(a)}});c.extend(c.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:c.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(a){return a+".dialog-overlay"}).join(" "),
|
||||
create:function(a){if(this.instances.length===0){setTimeout(function(){c.ui.dialog.overlay.instances.length&&c(document).bind(c.ui.dialog.overlay.events,function(d){if(c(d.target).zIndex()<c.ui.dialog.overlay.maxZ)return false})},1);c(document).bind("keydown.dialog-overlay",function(d){if(a.options.closeOnEscape&&!d.isDefaultPrevented()&&d.keyCode&&d.keyCode===c.ui.keyCode.ESCAPE){a.close(d);d.preventDefault()}});c(window).bind("resize.dialog-overlay",c.ui.dialog.overlay.resize)}var b=(this.oldInstances.pop()||
|
||||
c("<div></div>").addClass("ui-widget-overlay")).appendTo(document.body).css({width:this.width(),height:this.height()});c.fn.bgiframe&&b.bgiframe();this.instances.push(b);return b},destroy:function(a){var b=c.inArray(a,this.instances);b!=-1&&this.oldInstances.push(this.instances.splice(b,1)[0]);this.instances.length===0&&c([document,window]).unbind(".dialog-overlay");a.remove();var d=0;c.each(this.instances,function(){d=Math.max(d,this.css("z-index"))});this.maxZ=d},height:function(){var a,b;if(c.browser.msie&&
|
||||
c.browser.version<7){a=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);b=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);return a<b?c(window).height()+"px":a+"px"}else return c(document).height()+"px"},width:function(){var a,b;if(c.browser.msie){a=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth);b=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);return a<b?c(window).width()+"px":a+"px"}else return c(document).width()+
|
||||
"px"},resize:function(){var a=c([]);c.each(c.ui.dialog.overlay.instances,function(){a=a.add(this)});a.css({width:0,height:0}).css({width:c.ui.dialog.overlay.width(),height:c.ui.dialog.overlay.height()})}});c.extend(c.ui.dialog.overlay.prototype,{destroy:function(){c.ui.dialog.overlay.destroy(this.$el)}})})(jQuery);
|
||||
;/*
|
||||
* jQuery UI Slider 1.8.12
|
||||
* jQuery UI Slider 1.8.16
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
|
|
@ -409,27 +415,27 @@ function(){a=a.add(this)});a.css({width:0,height:0}).css({width:c.ui.dialog.over
|
|||
* jquery.ui.mouse.js
|
||||
* jquery.ui.widget.js
|
||||
*/
|
||||
(function(d){d.widget("ui.slider",d.ui.mouse,{widgetEventPrefix:"slide",options:{animate:false,distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null},_create:function(){var b=this,a=this.options;this._mouseSliding=this._keySliding=false;this._animateOff=true;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all");a.disabled&&this.element.addClass("ui-slider-disabled ui-disabled");
|
||||
this.range=d([]);if(a.range){if(a.range===true){this.range=d("<div></div>");if(!a.values)a.values=[this._valueMin(),this._valueMin()];if(a.values.length&&a.values.length!==2)a.values=[a.values[0],a.values[0]]}else this.range=d("<div></div>");this.range.appendTo(this.element).addClass("ui-slider-range");if(a.range==="min"||a.range==="max")this.range.addClass("ui-slider-range-"+a.range);this.range.addClass("ui-widget-header")}d(".ui-slider-handle",this.element).length===0&&d("<a href='#'></a>").appendTo(this.element).addClass("ui-slider-handle");
|
||||
if(a.values&&a.values.length)for(;d(".ui-slider-handle",this.element).length<a.values.length;)d("<a href='#'></a>").appendTo(this.element).addClass("ui-slider-handle");this.handles=d(".ui-slider-handle",this.element).addClass("ui-state-default ui-corner-all");this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(c){c.preventDefault()}).hover(function(){a.disabled||d(this).addClass("ui-state-hover")},function(){d(this).removeClass("ui-state-hover")}).focus(function(){if(a.disabled)d(this).blur();
|
||||
else{d(".ui-slider .ui-state-focus").removeClass("ui-state-focus");d(this).addClass("ui-state-focus")}}).blur(function(){d(this).removeClass("ui-state-focus")});this.handles.each(function(c){d(this).data("index.ui-slider-handle",c)});this.handles.keydown(function(c){var e=true,f=d(this).data("index.ui-slider-handle"),h,g,i;if(!b.options.disabled){switch(c.keyCode){case d.ui.keyCode.HOME:case d.ui.keyCode.END:case d.ui.keyCode.PAGE_UP:case d.ui.keyCode.PAGE_DOWN:case d.ui.keyCode.UP:case d.ui.keyCode.RIGHT:case d.ui.keyCode.DOWN:case d.ui.keyCode.LEFT:e=
|
||||
false;if(!b._keySliding){b._keySliding=true;d(this).addClass("ui-state-active");h=b._start(c,f);if(h===false)return}break}i=b.options.step;h=b.options.values&&b.options.values.length?(g=b.values(f)):(g=b.value());switch(c.keyCode){case d.ui.keyCode.HOME:g=b._valueMin();break;case d.ui.keyCode.END:g=b._valueMax();break;case d.ui.keyCode.PAGE_UP:g=b._trimAlignValue(h+(b._valueMax()-b._valueMin())/5);break;case d.ui.keyCode.PAGE_DOWN:g=b._trimAlignValue(h-(b._valueMax()-b._valueMin())/5);break;case d.ui.keyCode.UP:case d.ui.keyCode.RIGHT:if(h===
|
||||
b._valueMax())return;g=b._trimAlignValue(h+i);break;case d.ui.keyCode.DOWN:case d.ui.keyCode.LEFT:if(h===b._valueMin())return;g=b._trimAlignValue(h-i);break}b._slide(c,f,g);return e}}).keyup(function(c){var e=d(this).data("index.ui-slider-handle");if(b._keySliding){b._keySliding=false;b._stop(c,e);b._change(c,e);d(this).removeClass("ui-state-active")}});this._refreshValue();this._animateOff=false},destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider");
|
||||
this._mouseDestroy();return this},_mouseCapture:function(b){var a=this.options,c,e,f,h,g;if(a.disabled)return false;this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();c=this._normValueFromMouse({x:b.pageX,y:b.pageY});e=this._valueMax()-this._valueMin()+1;h=this;this.handles.each(function(i){var j=Math.abs(c-h.values(i));if(e>j){e=j;f=d(this);g=i}});if(a.range===true&&this.values(1)===a.min){g+=1;f=d(this.handles[g])}if(this._start(b,
|
||||
g)===false)return false;this._mouseSliding=true;h._handleIndex=g;f.addClass("ui-state-active").focus();a=f.offset();this._clickOffset=!d(b.target).parents().andSelf().is(".ui-slider-handle")?{left:0,top:0}:{left:b.pageX-a.left-f.width()/2,top:b.pageY-a.top-f.height()/2-(parseInt(f.css("borderTopWidth"),10)||0)-(parseInt(f.css("borderBottomWidth"),10)||0)+(parseInt(f.css("marginTop"),10)||0)};this.handles.hasClass("ui-state-hover")||this._slide(b,g,c);return this._animateOff=true},_mouseStart:function(){return true},
|
||||
_mouseDrag:function(b){var a=this._normValueFromMouse({x:b.pageX,y:b.pageY});this._slide(b,this._handleIndex,a);return false},_mouseStop:function(b){this.handles.removeClass("ui-state-active");this._mouseSliding=false;this._stop(b,this._handleIndex);this._change(b,this._handleIndex);this._clickOffset=this._handleIndex=null;return this._animateOff=false},_detectOrientation:function(){this.orientation=this.options.orientation==="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(b){var a;
|
||||
if(this.orientation==="horizontal"){a=this.elementSize.width;b=b.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{a=this.elementSize.height;b=b.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}a=b/a;if(a>1)a=1;if(a<0)a=0;if(this.orientation==="vertical")a=1-a;b=this._valueMax()-this._valueMin();return this._trimAlignValue(this._valueMin()+a*b)},_start:function(b,a){var c={handle:this.handles[a],value:this.value()};if(this.options.values&&this.options.values.length){c.value=
|
||||
this.values(a);c.values=this.values()}return this._trigger("start",b,c)},_slide:function(b,a,c){var e;if(this.options.values&&this.options.values.length){e=this.values(a?0:1);if(this.options.values.length===2&&this.options.range===true&&(a===0&&c>e||a===1&&c<e))c=e;if(c!==this.values(a)){e=this.values();e[a]=c;b=this._trigger("slide",b,{handle:this.handles[a],value:c,values:e});this.values(a?0:1);b!==false&&this.values(a,c,true)}}else if(c!==this.value()){b=this._trigger("slide",b,{handle:this.handles[a],
|
||||
value:c});b!==false&&this.value(c)}},_stop:function(b,a){var c={handle:this.handles[a],value:this.value()};if(this.options.values&&this.options.values.length){c.value=this.values(a);c.values=this.values()}this._trigger("stop",b,c)},_change:function(b,a){if(!this._keySliding&&!this._mouseSliding){var c={handle:this.handles[a],value:this.value()};if(this.options.values&&this.options.values.length){c.value=this.values(a);c.values=this.values()}this._trigger("change",b,c)}},value:function(b){if(arguments.length){this.options.value=
|
||||
this._trimAlignValue(b);this._refreshValue();this._change(null,0)}else return this._value()},values:function(b,a){var c,e,f;if(arguments.length>1){this.options.values[b]=this._trimAlignValue(a);this._refreshValue();this._change(null,b)}else if(arguments.length)if(d.isArray(arguments[0])){c=this.options.values;e=arguments[0];for(f=0;f<c.length;f+=1){c[f]=this._trimAlignValue(e[f]);this._change(null,f)}this._refreshValue()}else return this.options.values&&this.options.values.length?this._values(b):
|
||||
this.value();else return this._values()},_setOption:function(b,a){var c,e=0;if(d.isArray(this.options.values))e=this.options.values.length;d.Widget.prototype._setOption.apply(this,arguments);switch(b){case "disabled":if(a){this.handles.filter(".ui-state-focus").blur();this.handles.removeClass("ui-state-hover");this.handles.attr("disabled","disabled");this.element.addClass("ui-disabled")}else{this.handles.removeAttr("disabled");this.element.removeClass("ui-disabled")}break;case "orientation":this._detectOrientation();
|
||||
this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation);this._refreshValue();break;case "value":this._animateOff=true;this._refreshValue();this._change(null,0);this._animateOff=false;break;case "values":this._animateOff=true;this._refreshValue();for(c=0;c<e;c+=1)this._change(null,c);this._animateOff=false;break}},_value:function(){var b=this.options.value;return b=this._trimAlignValue(b)},_values:function(b){var a,c;if(arguments.length){a=this.options.values[b];
|
||||
return a=this._trimAlignValue(a)}else{a=this.options.values.slice();for(c=0;c<a.length;c+=1)a[c]=this._trimAlignValue(a[c]);return a}},_trimAlignValue:function(b){if(b<=this._valueMin())return this._valueMin();if(b>=this._valueMax())return this._valueMax();var a=this.options.step>0?this.options.step:1,c=(b-this._valueMin())%a;alignValue=b-c;if(Math.abs(c)*2>=a)alignValue+=c>0?a:-a;return parseFloat(alignValue.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},
|
||||
_refreshValue:function(){var b=this.options.range,a=this.options,c=this,e=!this._animateOff?a.animate:false,f,h={},g,i,j,l;if(this.options.values&&this.options.values.length)this.handles.each(function(k){f=(c.values(k)-c._valueMin())/(c._valueMax()-c._valueMin())*100;h[c.orientation==="horizontal"?"left":"bottom"]=f+"%";d(this).stop(1,1)[e?"animate":"css"](h,a.animate);if(c.options.range===true)if(c.orientation==="horizontal"){if(k===0)c.range.stop(1,1)[e?"animate":"css"]({left:f+"%"},a.animate);
|
||||
if(k===1)c.range[e?"animate":"css"]({width:f-g+"%"},{queue:false,duration:a.animate})}else{if(k===0)c.range.stop(1,1)[e?"animate":"css"]({bottom:f+"%"},a.animate);if(k===1)c.range[e?"animate":"css"]({height:f-g+"%"},{queue:false,duration:a.animate})}g=f});else{i=this.value();j=this._valueMin();l=this._valueMax();f=l!==j?(i-j)/(l-j)*100:0;h[c.orientation==="horizontal"?"left":"bottom"]=f+"%";this.handle.stop(1,1)[e?"animate":"css"](h,a.animate);if(b==="min"&&this.orientation==="horizontal")this.range.stop(1,
|
||||
1)[e?"animate":"css"]({width:f+"%"},a.animate);if(b==="max"&&this.orientation==="horizontal")this.range[e?"animate":"css"]({width:100-f+"%"},{queue:false,duration:a.animate});if(b==="min"&&this.orientation==="vertical")this.range.stop(1,1)[e?"animate":"css"]({height:f+"%"},a.animate);if(b==="max"&&this.orientation==="vertical")this.range[e?"animate":"css"]({height:100-f+"%"},{queue:false,duration:a.animate})}}});d.extend(d.ui.slider,{version:"1.8.12"})})(jQuery);
|
||||
(function(d){d.widget("ui.slider",d.ui.mouse,{widgetEventPrefix:"slide",options:{animate:false,distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null},_create:function(){var a=this,b=this.options,c=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),f=b.values&&b.values.length||1,e=[];this._mouseSliding=this._keySliding=false;this._animateOff=true;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider ui-slider-"+
|
||||
this.orientation+" ui-widget ui-widget-content ui-corner-all"+(b.disabled?" ui-slider-disabled ui-disabled":""));this.range=d([]);if(b.range){if(b.range===true){if(!b.values)b.values=[this._valueMin(),this._valueMin()];if(b.values.length&&b.values.length!==2)b.values=[b.values[0],b.values[0]]}this.range=d("<div></div>").appendTo(this.element).addClass("ui-slider-range ui-widget-header"+(b.range==="min"||b.range==="max"?" ui-slider-range-"+b.range:""))}for(var j=c.length;j<f;j+=1)e.push("<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>");
|
||||
this.handles=c.add(d(e.join("")).appendTo(a.element));this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(g){g.preventDefault()}).hover(function(){b.disabled||d(this).addClass("ui-state-hover")},function(){d(this).removeClass("ui-state-hover")}).focus(function(){if(b.disabled)d(this).blur();else{d(".ui-slider .ui-state-focus").removeClass("ui-state-focus");d(this).addClass("ui-state-focus")}}).blur(function(){d(this).removeClass("ui-state-focus")});this.handles.each(function(g){d(this).data("index.ui-slider-handle",
|
||||
g)});this.handles.keydown(function(g){var k=true,l=d(this).data("index.ui-slider-handle"),i,h,m;if(!a.options.disabled){switch(g.keyCode){case d.ui.keyCode.HOME:case d.ui.keyCode.END:case d.ui.keyCode.PAGE_UP:case d.ui.keyCode.PAGE_DOWN:case d.ui.keyCode.UP:case d.ui.keyCode.RIGHT:case d.ui.keyCode.DOWN:case d.ui.keyCode.LEFT:k=false;if(!a._keySliding){a._keySliding=true;d(this).addClass("ui-state-active");i=a._start(g,l);if(i===false)return}break}m=a.options.step;i=a.options.values&&a.options.values.length?
|
||||
(h=a.values(l)):(h=a.value());switch(g.keyCode){case d.ui.keyCode.HOME:h=a._valueMin();break;case d.ui.keyCode.END:h=a._valueMax();break;case d.ui.keyCode.PAGE_UP:h=a._trimAlignValue(i+(a._valueMax()-a._valueMin())/5);break;case d.ui.keyCode.PAGE_DOWN:h=a._trimAlignValue(i-(a._valueMax()-a._valueMin())/5);break;case d.ui.keyCode.UP:case d.ui.keyCode.RIGHT:if(i===a._valueMax())return;h=a._trimAlignValue(i+m);break;case d.ui.keyCode.DOWN:case d.ui.keyCode.LEFT:if(i===a._valueMin())return;h=a._trimAlignValue(i-
|
||||
m);break}a._slide(g,l,h);return k}}).keyup(function(g){var k=d(this).data("index.ui-slider-handle");if(a._keySliding){a._keySliding=false;a._stop(g,k);a._change(g,k);d(this).removeClass("ui-state-active")}});this._refreshValue();this._animateOff=false},destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider");this._mouseDestroy();
|
||||
return this},_mouseCapture:function(a){var b=this.options,c,f,e,j,g;if(b.disabled)return false;this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();c=this._normValueFromMouse({x:a.pageX,y:a.pageY});f=this._valueMax()-this._valueMin()+1;j=this;this.handles.each(function(k){var l=Math.abs(c-j.values(k));if(f>l){f=l;e=d(this);g=k}});if(b.range===true&&this.values(1)===b.min){g+=1;e=d(this.handles[g])}if(this._start(a,g)===false)return false;
|
||||
this._mouseSliding=true;j._handleIndex=g;e.addClass("ui-state-active").focus();b=e.offset();this._clickOffset=!d(a.target).parents().andSelf().is(".ui-slider-handle")?{left:0,top:0}:{left:a.pageX-b.left-e.width()/2,top:a.pageY-b.top-e.height()/2-(parseInt(e.css("borderTopWidth"),10)||0)-(parseInt(e.css("borderBottomWidth"),10)||0)+(parseInt(e.css("marginTop"),10)||0)};this.handles.hasClass("ui-state-hover")||this._slide(a,g,c);return this._animateOff=true},_mouseStart:function(){return true},_mouseDrag:function(a){var b=
|
||||
this._normValueFromMouse({x:a.pageX,y:a.pageY});this._slide(a,this._handleIndex,b);return false},_mouseStop:function(a){this.handles.removeClass("ui-state-active");this._mouseSliding=false;this._stop(a,this._handleIndex);this._change(a,this._handleIndex);this._clickOffset=this._handleIndex=null;return this._animateOff=false},_detectOrientation:function(){this.orientation=this.options.orientation==="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(a){var b;if(this.orientation==="horizontal"){b=
|
||||
this.elementSize.width;a=a.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{b=this.elementSize.height;a=a.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}b=a/b;if(b>1)b=1;if(b<0)b=0;if(this.orientation==="vertical")b=1-b;a=this._valueMax()-this._valueMin();return this._trimAlignValue(this._valueMin()+b*a)},_start:function(a,b){var c={handle:this.handles[b],value:this.value()};if(this.options.values&&this.options.values.length){c.value=this.values(b);
|
||||
c.values=this.values()}return this._trigger("start",a,c)},_slide:function(a,b,c){var f;if(this.options.values&&this.options.values.length){f=this.values(b?0:1);if(this.options.values.length===2&&this.options.range===true&&(b===0&&c>f||b===1&&c<f))c=f;if(c!==this.values(b)){f=this.values();f[b]=c;a=this._trigger("slide",a,{handle:this.handles[b],value:c,values:f});this.values(b?0:1);a!==false&&this.values(b,c,true)}}else if(c!==this.value()){a=this._trigger("slide",a,{handle:this.handles[b],value:c});
|
||||
a!==false&&this.value(c)}},_stop:function(a,b){var c={handle:this.handles[b],value:this.value()};if(this.options.values&&this.options.values.length){c.value=this.values(b);c.values=this.values()}this._trigger("stop",a,c)},_change:function(a,b){if(!this._keySliding&&!this._mouseSliding){var c={handle:this.handles[b],value:this.value()};if(this.options.values&&this.options.values.length){c.value=this.values(b);c.values=this.values()}this._trigger("change",a,c)}},value:function(a){if(arguments.length){this.options.value=
|
||||
this._trimAlignValue(a);this._refreshValue();this._change(null,0)}else return this._value()},values:function(a,b){var c,f,e;if(arguments.length>1){this.options.values[a]=this._trimAlignValue(b);this._refreshValue();this._change(null,a)}else if(arguments.length)if(d.isArray(arguments[0])){c=this.options.values;f=arguments[0];for(e=0;e<c.length;e+=1){c[e]=this._trimAlignValue(f[e]);this._change(null,e)}this._refreshValue()}else return this.options.values&&this.options.values.length?this._values(a):
|
||||
this.value();else return this._values()},_setOption:function(a,b){var c,f=0;if(d.isArray(this.options.values))f=this.options.values.length;d.Widget.prototype._setOption.apply(this,arguments);switch(a){case "disabled":if(b){this.handles.filter(".ui-state-focus").blur();this.handles.removeClass("ui-state-hover");this.handles.propAttr("disabled",true);this.element.addClass("ui-disabled")}else{this.handles.propAttr("disabled",false);this.element.removeClass("ui-disabled")}break;case "orientation":this._detectOrientation();
|
||||
this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation);this._refreshValue();break;case "value":this._animateOff=true;this._refreshValue();this._change(null,0);this._animateOff=false;break;case "values":this._animateOff=true;this._refreshValue();for(c=0;c<f;c+=1)this._change(null,c);this._animateOff=false;break}},_value:function(){var a=this.options.value;return a=this._trimAlignValue(a)},_values:function(a){var b,c;if(arguments.length){b=this.options.values[a];
|
||||
return b=this._trimAlignValue(b)}else{b=this.options.values.slice();for(c=0;c<b.length;c+=1)b[c]=this._trimAlignValue(b[c]);return b}},_trimAlignValue:function(a){if(a<=this._valueMin())return this._valueMin();if(a>=this._valueMax())return this._valueMax();var b=this.options.step>0?this.options.step:1,c=(a-this._valueMin())%b;a=a-c;if(Math.abs(c)*2>=b)a+=c>0?b:-b;return parseFloat(a.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var a=
|
||||
this.options.range,b=this.options,c=this,f=!this._animateOff?b.animate:false,e,j={},g,k,l,i;if(this.options.values&&this.options.values.length)this.handles.each(function(h){e=(c.values(h)-c._valueMin())/(c._valueMax()-c._valueMin())*100;j[c.orientation==="horizontal"?"left":"bottom"]=e+"%";d(this).stop(1,1)[f?"animate":"css"](j,b.animate);if(c.options.range===true)if(c.orientation==="horizontal"){if(h===0)c.range.stop(1,1)[f?"animate":"css"]({left:e+"%"},b.animate);if(h===1)c.range[f?"animate":"css"]({width:e-
|
||||
g+"%"},{queue:false,duration:b.animate})}else{if(h===0)c.range.stop(1,1)[f?"animate":"css"]({bottom:e+"%"},b.animate);if(h===1)c.range[f?"animate":"css"]({height:e-g+"%"},{queue:false,duration:b.animate})}g=e});else{k=this.value();l=this._valueMin();i=this._valueMax();e=i!==l?(k-l)/(i-l)*100:0;j[c.orientation==="horizontal"?"left":"bottom"]=e+"%";this.handle.stop(1,1)[f?"animate":"css"](j,b.animate);if(a==="min"&&this.orientation==="horizontal")this.range.stop(1,1)[f?"animate":"css"]({width:e+"%"},
|
||||
b.animate);if(a==="max"&&this.orientation==="horizontal")this.range[f?"animate":"css"]({width:100-e+"%"},{queue:false,duration:b.animate});if(a==="min"&&this.orientation==="vertical")this.range.stop(1,1)[f?"animate":"css"]({height:e+"%"},b.animate);if(a==="max"&&this.orientation==="vertical")this.range[f?"animate":"css"]({height:100-e+"%"},{queue:false,duration:b.animate})}}});d.extend(d.ui.slider,{version:"1.8.16"})})(jQuery);
|
||||
;/*
|
||||
* jQuery UI Tabs 1.8.12
|
||||
* jQuery UI Tabs 1.8.16
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
|
|
@ -461,10 +467,10 @@ if(a.hasClass("ui-tabs-selected")&&this.anchors.length>1)this.select(b+(b+1<this
|
|||
this._ui(this.anchors[b],this.panels[b]));return this}},disable:function(b){b=this._getIndex(b);var e=this.options;if(b!=e.selected){this.lis.eq(b).addClass("ui-state-disabled");e.disabled.push(b);e.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[b],this.panels[b]))}return this},select:function(b){b=this._getIndex(b);if(b==-1)if(this.options.collapsible&&this.options.selected!=-1)b=this.options.selected;else return this;this.anchors.eq(b).trigger(this.options.event+".tabs");return this},
|
||||
load:function(b){b=this._getIndex(b);var e=this,a=this.options,c=this.anchors.eq(b)[0],h=d.data(c,"load.tabs");this.abort();if(!h||this.element.queue("tabs").length!==0&&d.data(c,"cache.tabs"))this.element.dequeue("tabs");else{this.lis.eq(b).addClass("ui-state-processing");if(a.spinner){var j=d("span",c);j.data("label.tabs",j.html()).html(a.spinner)}this.xhr=d.ajax(d.extend({},a.ajaxOptions,{url:h,success:function(k,n){e.element.find(e._sanitizeSelector(c.hash)).html(k);e._cleanup();a.cache&&d.data(c,
|
||||
"cache.tabs",true);e._trigger("load",null,e._ui(e.anchors[b],e.panels[b]));try{a.ajaxOptions.success(k,n)}catch(m){}},error:function(k,n){e._cleanup();e._trigger("load",null,e._ui(e.anchors[b],e.panels[b]));try{a.ajaxOptions.error(k,n,b,c)}catch(m){}}}));e.element.dequeue("tabs");return this}},abort:function(){this.element.queue([]);this.panels.stop(false,true);this.element.queue("tabs",this.element.queue("tabs").splice(-2,2));if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup();return this},
|
||||
url:function(b,e){this.anchors.eq(b).removeData("cache.tabs").data("load.tabs",e);return this},length:function(){return this.anchors.length}});d.extend(d.ui.tabs,{version:"1.8.12"});d.extend(d.ui.tabs.prototype,{rotation:null,rotate:function(b,e){var a=this,c=this.options,h=a._rotate||(a._rotate=function(j){clearTimeout(a.rotation);a.rotation=setTimeout(function(){var k=c.selected;a.select(++k<a.anchors.length?k:0)},b);j&&j.stopPropagation()});e=a._unrotate||(a._unrotate=!e?function(j){j.clientX&&
|
||||
url:function(b,e){this.anchors.eq(b).removeData("cache.tabs").data("load.tabs",e);return this},length:function(){return this.anchors.length}});d.extend(d.ui.tabs,{version:"1.8.16"});d.extend(d.ui.tabs.prototype,{rotation:null,rotate:function(b,e){var a=this,c=this.options,h=a._rotate||(a._rotate=function(j){clearTimeout(a.rotation);a.rotation=setTimeout(function(){var k=c.selected;a.select(++k<a.anchors.length?k:0)},b);j&&j.stopPropagation()});e=a._unrotate||(a._unrotate=!e?function(j){j.clientX&&
|
||||
a.rotate(null)}:function(){t=c.selected;h()});if(b){this.element.bind("tabsshow",h);this.anchors.bind(c.event+".tabs",e);h()}else{clearTimeout(a.rotation);this.element.unbind("tabsshow",h);this.anchors.unbind(c.event+".tabs",e);delete this._rotate;delete this._unrotate}return this}})})(jQuery);
|
||||
;/*
|
||||
* jQuery UI Datepicker 1.8.12
|
||||
* jQuery UI Datepicker 1.8.16
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
|
|
@ -475,78 +481,79 @@ a.rotate(null)}:function(){t=c.selected;h()});if(b){this.element.bind("tabsshow"
|
|||
* Depends:
|
||||
* jquery.ui.core.js
|
||||
*/
|
||||
(function(d,A){function K(){this.debug=false;this._curInst=null;this._keyEvent=false;this._disabledInputs=[];this._inDialog=this._datepickerShowing=false;this._mainDivId="ui-datepicker-div";this._inlineClass="ui-datepicker-inline";this._appendClass="ui-datepicker-append";this._triggerClass="ui-datepicker-trigger";this._dialogClass="ui-datepicker-dialog";this._disableClass="ui-datepicker-disabled";this._unselectableClass="ui-datepicker-unselectable";this._currentClass="ui-datepicker-current-day";this._dayOverClass=
|
||||
(function(d,C){function M(){this.debug=false;this._curInst=null;this._keyEvent=false;this._disabledInputs=[];this._inDialog=this._datepickerShowing=false;this._mainDivId="ui-datepicker-div";this._inlineClass="ui-datepicker-inline";this._appendClass="ui-datepicker-append";this._triggerClass="ui-datepicker-trigger";this._dialogClass="ui-datepicker-dialog";this._disableClass="ui-datepicker-disabled";this._unselectableClass="ui-datepicker-unselectable";this._currentClass="ui-datepicker-current-day";this._dayOverClass=
|
||||
"ui-datepicker-days-cell-over";this.regional=[];this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su",
|
||||
"Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:false,showMonthAfterYear:false,yearSuffix:""};this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:false,hideIfNoPrevNext:false,navigationAsDateFormat:false,gotoCurrent:false,changeMonth:false,changeYear:false,yearRange:"c-10:c+10",showOtherMonths:false,selectOtherMonths:false,showWeek:false,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",
|
||||
minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:true,showButtonPanel:false,autoSize:false};d.extend(this._defaults,this.regional[""]);this.dpDiv=d('<div id="'+this._mainDivId+'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>')}function F(a,b){d.extend(a,b);for(var c in b)if(b[c]==
|
||||
null||b[c]==A)a[c]=b[c];return a}d.extend(d.ui,{datepicker:{version:"1.8.12"}});var y=(new Date).getTime();d.extend(K.prototype,{markerClassName:"hasDatepicker",log:function(){this.debug&&console.log.apply("",arguments)},_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(a){F(this._defaults,a||{});return this},_attachDatepicker:function(a,b){var c=null;for(var e in this._defaults){var f=a.getAttribute("date:"+e);if(f){c=c||{};try{c[e]=eval(f)}catch(h){c[e]=f}}}e=a.nodeName.toLowerCase();
|
||||
f=e=="div"||e=="span";if(!a.id){this.uuid+=1;a.id="dp"+this.uuid}var i=this._newInst(d(a),f);i.settings=d.extend({},b||{},c||{});if(e=="input")this._connectDatepicker(a,i);else f&&this._inlineDatepicker(a,i)},_newInst:function(a,b){return{id:a[0].id.replace(/([^A-Za-z0-9_-])/g,"\\\\$1"),input:a,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:b,dpDiv:!b?this.dpDiv:d('<div class="'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>')}},
|
||||
_connectDatepicker:function(a,b){var c=d(a);b.append=d([]);b.trigger=d([]);if(!c.hasClass(this.markerClassName)){this._attachments(c,b);c.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker",function(e,f,h){b.settings[f]=h}).bind("getData.datepicker",function(e,f){return this._get(b,f)});this._autoSize(b);d.data(a,"datepicker",b)}},_attachments:function(a,b){var c=this._get(b,"appendText"),e=this._get(b,"isRTL");b.append&&
|
||||
b.append.remove();if(c){b.append=d('<span class="'+this._appendClass+'">'+c+"</span>");a[e?"before":"after"](b.append)}a.unbind("focus",this._showDatepicker);b.trigger&&b.trigger.remove();c=this._get(b,"showOn");if(c=="focus"||c=="both")a.focus(this._showDatepicker);if(c=="button"||c=="both"){c=this._get(b,"buttonText");var f=this._get(b,"buttonImage");b.trigger=d(this._get(b,"buttonImageOnly")?d("<img/>").addClass(this._triggerClass).attr({src:f,alt:c,title:c}):d('<button type="button"></button>').addClass(this._triggerClass).html(f==
|
||||
""?c:d("<img/>").attr({src:f,alt:c,title:c})));a[e?"before":"after"](b.trigger);b.trigger.click(function(){d.datepicker._datepickerShowing&&d.datepicker._lastInput==a[0]?d.datepicker._hideDatepicker():d.datepicker._showDatepicker(a[0]);return false})}},_autoSize:function(a){if(this._get(a,"autoSize")&&!a.inline){var b=new Date(2009,11,20),c=this._get(a,"dateFormat");if(c.match(/[DM]/)){var e=function(f){for(var h=0,i=0,g=0;g<f.length;g++)if(f[g].length>h){h=f[g].length;i=g}return i};b.setMonth(e(this._get(a,
|
||||
c.match(/MM/)?"monthNames":"monthNamesShort")));b.setDate(e(this._get(a,c.match(/DD/)?"dayNames":"dayNamesShort"))+20-b.getDay())}a.input.attr("size",this._formatDate(a,b).length)}},_inlineDatepicker:function(a,b){var c=d(a);if(!c.hasClass(this.markerClassName)){c.addClass(this.markerClassName).append(b.dpDiv).bind("setData.datepicker",function(e,f,h){b.settings[f]=h}).bind("getData.datepicker",function(e,f){return this._get(b,f)});d.data(a,"datepicker",b);this._setDate(b,this._getDefaultDate(b),
|
||||
true);this._updateDatepicker(b);this._updateAlternate(b);b.dpDiv.show()}},_dialogDatepicker:function(a,b,c,e,f){a=this._dialogInst;if(!a){this.uuid+=1;this._dialogInput=d('<input type="text" id="'+("dp"+this.uuid)+'" style="position: absolute; top: -100px; width: 0px; z-index: -10;"/>');this._dialogInput.keydown(this._doKeyDown);d("body").append(this._dialogInput);a=this._dialogInst=this._newInst(this._dialogInput,false);a.settings={};d.data(this._dialogInput[0],"datepicker",a)}F(a.settings,e||{});
|
||||
b=b&&b.constructor==Date?this._formatDate(a,b):b;this._dialogInput.val(b);this._pos=f?f.length?f:[f.pageX,f.pageY]:null;if(!this._pos)this._pos=[document.documentElement.clientWidth/2-100+(document.documentElement.scrollLeft||document.body.scrollLeft),document.documentElement.clientHeight/2-150+(document.documentElement.scrollTop||document.body.scrollTop)];this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px");a.settings.onSelect=c;this._inDialog=true;this.dpDiv.addClass(this._dialogClass);
|
||||
this._showDatepicker(this._dialogInput[0]);d.blockUI&&d.blockUI(this.dpDiv);d.data(this._dialogInput[0],"datepicker",a);return this},_destroyDatepicker:function(a){var b=d(a),c=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var e=a.nodeName.toLowerCase();d.removeData(a,"datepicker");if(e=="input"){c.append.remove();c.trigger.remove();b.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",
|
||||
this._doKeyUp)}else if(e=="div"||e=="span")b.removeClass(this.markerClassName).empty()}},_enableDatepicker:function(a){var b=d(a),c=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var e=a.nodeName.toLowerCase();if(e=="input"){a.disabled=false;c.trigger.filter("button").each(function(){this.disabled=false}).end().filter("img").css({opacity:"1.0",cursor:""})}else if(e=="div"||e=="span")b.children("."+this._inlineClass).children().removeClass("ui-state-disabled");this._disabledInputs=d.map(this._disabledInputs,
|
||||
function(f){return f==a?null:f})}},_disableDatepicker:function(a){var b=d(a),c=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var e=a.nodeName.toLowerCase();if(e=="input"){a.disabled=true;c.trigger.filter("button").each(function(){this.disabled=true}).end().filter("img").css({opacity:"0.5",cursor:"default"})}else if(e=="div"||e=="span")b.children("."+this._inlineClass).children().addClass("ui-state-disabled");this._disabledInputs=d.map(this._disabledInputs,function(f){return f==a?null:
|
||||
f});this._disabledInputs[this._disabledInputs.length]=a}},_isDisabledDatepicker:function(a){if(!a)return false;for(var b=0;b<this._disabledInputs.length;b++)if(this._disabledInputs[b]==a)return true;return false},_getInst:function(a){try{return d.data(a,"datepicker")}catch(b){throw"Missing instance data for this datepicker";}},_optionDatepicker:function(a,b,c){var e=this._getInst(a);if(arguments.length==2&&typeof b=="string")return b=="defaults"?d.extend({},d.datepicker._defaults):e?b=="all"?d.extend({},
|
||||
e.settings):this._get(e,b):null;var f=b||{};if(typeof b=="string"){f={};f[b]=c}if(e){this._curInst==e&&this._hideDatepicker();var h=this._getDateDatepicker(a,true),i=this._getMinMaxDate(e,"min"),g=this._getMinMaxDate(e,"max");F(e.settings,f);if(i!==null&&f.dateFormat!==A&&f.minDate===A)e.settings.minDate=this._formatDate(e,i);if(g!==null&&f.dateFormat!==A&&f.maxDate===A)e.settings.maxDate=this._formatDate(e,g);this._attachments(d(a),e);this._autoSize(e);this._setDateDatepicker(a,h);this._updateDatepicker(e)}},
|
||||
_changeDatepicker:function(a,b,c){this._optionDatepicker(a,b,c)},_refreshDatepicker:function(a){(a=this._getInst(a))&&this._updateDatepicker(a)},_setDateDatepicker:function(a,b){if(a=this._getInst(a)){this._setDate(a,b);this._updateDatepicker(a);this._updateAlternate(a)}},_getDateDatepicker:function(a,b){(a=this._getInst(a))&&!a.inline&&this._setDateFromField(a,b);return a?this._getDate(a):null},_doKeyDown:function(a){var b=d.datepicker._getInst(a.target),c=true,e=b.dpDiv.is(".ui-datepicker-rtl");
|
||||
b._keyEvent=true;if(d.datepicker._datepickerShowing)switch(a.keyCode){case 9:d.datepicker._hideDatepicker();c=false;break;case 13:c=d("td."+d.datepicker._dayOverClass+":not(."+d.datepicker._currentClass+")",b.dpDiv);c[0]?d.datepicker._selectDay(a.target,b.selectedMonth,b.selectedYear,c[0]):d.datepicker._hideDatepicker();return false;case 27:d.datepicker._hideDatepicker();break;case 33:d.datepicker._adjustDate(a.target,a.ctrlKey?-d.datepicker._get(b,"stepBigMonths"):-d.datepicker._get(b,"stepMonths"),
|
||||
"M");break;case 34:d.datepicker._adjustDate(a.target,a.ctrlKey?+d.datepicker._get(b,"stepBigMonths"):+d.datepicker._get(b,"stepMonths"),"M");break;case 35:if(a.ctrlKey||a.metaKey)d.datepicker._clearDate(a.target);c=a.ctrlKey||a.metaKey;break;case 36:if(a.ctrlKey||a.metaKey)d.datepicker._gotoToday(a.target);c=a.ctrlKey||a.metaKey;break;case 37:if(a.ctrlKey||a.metaKey)d.datepicker._adjustDate(a.target,e?+1:-1,"D");c=a.ctrlKey||a.metaKey;if(a.originalEvent.altKey)d.datepicker._adjustDate(a.target,a.ctrlKey?
|
||||
-d.datepicker._get(b,"stepBigMonths"):-d.datepicker._get(b,"stepMonths"),"M");break;case 38:if(a.ctrlKey||a.metaKey)d.datepicker._adjustDate(a.target,-7,"D");c=a.ctrlKey||a.metaKey;break;case 39:if(a.ctrlKey||a.metaKey)d.datepicker._adjustDate(a.target,e?-1:+1,"D");c=a.ctrlKey||a.metaKey;if(a.originalEvent.altKey)d.datepicker._adjustDate(a.target,a.ctrlKey?+d.datepicker._get(b,"stepBigMonths"):+d.datepicker._get(b,"stepMonths"),"M");break;case 40:if(a.ctrlKey||a.metaKey)d.datepicker._adjustDate(a.target,
|
||||
+7,"D");c=a.ctrlKey||a.metaKey;break;default:c=false}else if(a.keyCode==36&&a.ctrlKey)d.datepicker._showDatepicker(this);else c=false;if(c){a.preventDefault();a.stopPropagation()}},_doKeyPress:function(a){var b=d.datepicker._getInst(a.target);if(d.datepicker._get(b,"constrainInput")){b=d.datepicker._possibleChars(d.datepicker._get(b,"dateFormat"));var c=String.fromCharCode(a.charCode==A?a.keyCode:a.charCode);return a.ctrlKey||a.metaKey||c<" "||!b||b.indexOf(c)>-1}},_doKeyUp:function(a){a=d.datepicker._getInst(a.target);
|
||||
if(a.input.val()!=a.lastVal)try{if(d.datepicker.parseDate(d.datepicker._get(a,"dateFormat"),a.input?a.input.val():null,d.datepicker._getFormatConfig(a))){d.datepicker._setDateFromField(a);d.datepicker._updateAlternate(a);d.datepicker._updateDatepicker(a)}}catch(b){d.datepicker.log(b)}return true},_showDatepicker:function(a){a=a.target||a;if(a.nodeName.toLowerCase()!="input")a=d("input",a.parentNode)[0];if(!(d.datepicker._isDisabledDatepicker(a)||d.datepicker._lastInput==a)){var b=d.datepicker._getInst(a);
|
||||
d.datepicker._curInst&&d.datepicker._curInst!=b&&d.datepicker._curInst.dpDiv.stop(true,true);var c=d.datepicker._get(b,"beforeShow");F(b.settings,c?c.apply(a,[a,b]):{});b.lastVal=null;d.datepicker._lastInput=a;d.datepicker._setDateFromField(b);if(d.datepicker._inDialog)a.value="";if(!d.datepicker._pos){d.datepicker._pos=d.datepicker._findPos(a);d.datepicker._pos[1]+=a.offsetHeight}var e=false;d(a).parents().each(function(){e|=d(this).css("position")=="fixed";return!e});if(e&&d.browser.opera){d.datepicker._pos[0]-=
|
||||
document.documentElement.scrollLeft;d.datepicker._pos[1]-=document.documentElement.scrollTop}c={left:d.datepicker._pos[0],top:d.datepicker._pos[1]};d.datepicker._pos=null;b.dpDiv.empty();b.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});d.datepicker._updateDatepicker(b);c=d.datepicker._checkOffset(b,c,e);b.dpDiv.css({position:d.datepicker._inDialog&&d.blockUI?"static":e?"fixed":"absolute",display:"none",left:c.left+"px",top:c.top+"px"});if(!b.inline){c=d.datepicker._get(b,"showAnim");
|
||||
var f=d.datepicker._get(b,"duration"),h=function(){d.datepicker._datepickerShowing=true;var i=b.dpDiv.find("iframe.ui-datepicker-cover");if(i.length){var g=d.datepicker._getBorders(b.dpDiv);i.css({left:-g[0],top:-g[1],width:b.dpDiv.outerWidth(),height:b.dpDiv.outerHeight()})}};b.dpDiv.zIndex(d(a).zIndex()+1);d.effects&&d.effects[c]?b.dpDiv.show(c,d.datepicker._get(b,"showOptions"),f,h):b.dpDiv[c||"show"](c?f:null,h);if(!c||!f)h();b.input.is(":visible")&&!b.input.is(":disabled")&&b.input.focus();d.datepicker._curInst=
|
||||
b}}},_updateDatepicker:function(a){var b=this,c=d.datepicker._getBorders(a.dpDiv);a.dpDiv.empty().append(this._generateHTML(a));var e=a.dpDiv.find("iframe.ui-datepicker-cover");e.length&&e.css({left:-c[0],top:-c[1],width:a.dpDiv.outerWidth(),height:a.dpDiv.outerHeight()});a.dpDiv.find("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a").bind("mouseout",function(){d(this).removeClass("ui-state-hover");this.className.indexOf("ui-datepicker-prev")!=-1&&d(this).removeClass("ui-datepicker-prev-hover");
|
||||
this.className.indexOf("ui-datepicker-next")!=-1&&d(this).removeClass("ui-datepicker-next-hover")}).bind("mouseover",function(){if(!b._isDisabledDatepicker(a.inline?a.dpDiv.parent()[0]:a.input[0])){d(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");d(this).addClass("ui-state-hover");this.className.indexOf("ui-datepicker-prev")!=-1&&d(this).addClass("ui-datepicker-prev-hover");this.className.indexOf("ui-datepicker-next")!=-1&&d(this).addClass("ui-datepicker-next-hover")}}).end().find("."+
|
||||
this._dayOverClass+" a").trigger("mouseover").end();c=this._getNumberOfMonths(a);e=c[1];e>1?a.dpDiv.addClass("ui-datepicker-multi-"+e).css("width",17*e+"em"):a.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");a.dpDiv[(c[0]!=1||c[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi");a.dpDiv[(this._get(a,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");a==d.datepicker._curInst&&d.datepicker._datepickerShowing&&a.input&&a.input.is(":visible")&&!a.input.is(":disabled")&&
|
||||
a.input[0]!=document.activeElement&&a.input.focus();if(a.yearshtml){var f=a.yearshtml;setTimeout(function(){f===a.yearshtml&&a.dpDiv.find("select.ui-datepicker-year:first").replaceWith(a.yearshtml);f=a.yearshtml=null},0)}},_getBorders:function(a){var b=function(c){return{thin:1,medium:2,thick:3}[c]||c};return[parseFloat(b(a.css("border-left-width"))),parseFloat(b(a.css("border-top-width")))]},_checkOffset:function(a,b,c){var e=a.dpDiv.outerWidth(),f=a.dpDiv.outerHeight(),h=a.input?a.input.outerWidth():
|
||||
0,i=a.input?a.input.outerHeight():0,g=document.documentElement.clientWidth+d(document).scrollLeft(),j=document.documentElement.clientHeight+d(document).scrollTop();b.left-=this._get(a,"isRTL")?e-h:0;b.left-=c&&b.left==a.input.offset().left?d(document).scrollLeft():0;b.top-=c&&b.top==a.input.offset().top+i?d(document).scrollTop():0;b.left-=Math.min(b.left,b.left+e>g&&g>e?Math.abs(b.left+e-g):0);b.top-=Math.min(b.top,b.top+f>j&&j>f?Math.abs(f+i):0);return b},_findPos:function(a){for(var b=this._get(this._getInst(a),
|
||||
"isRTL");a&&(a.type=="hidden"||a.nodeType!=1||d.expr.filters.hidden(a));)a=a[b?"previousSibling":"nextSibling"];a=d(a).offset();return[a.left,a.top]},_hideDatepicker:function(a){var b=this._curInst;if(!(!b||a&&b!=d.data(a,"datepicker")))if(this._datepickerShowing){a=this._get(b,"showAnim");var c=this._get(b,"duration"),e=function(){d.datepicker._tidyDialog(b);this._curInst=null};d.effects&&d.effects[a]?b.dpDiv.hide(a,d.datepicker._get(b,"showOptions"),c,e):b.dpDiv[a=="slideDown"?"slideUp":a=="fadeIn"?
|
||||
"fadeOut":"hide"](a?c:null,e);a||e();if(a=this._get(b,"onClose"))a.apply(b.input?b.input[0]:null,[b.input?b.input.val():"",b]);this._datepickerShowing=false;this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if(d.blockUI){d.unblockUI();d("body").append(this.dpDiv)}}this._inDialog=false}},_tidyDialog:function(a){a.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(a){if(d.datepicker._curInst){a=
|
||||
d(a.target);a[0].id!=d.datepicker._mainDivId&&a.parents("#"+d.datepicker._mainDivId).length==0&&!a.hasClass(d.datepicker.markerClassName)&&!a.hasClass(d.datepicker._triggerClass)&&d.datepicker._datepickerShowing&&!(d.datepicker._inDialog&&d.blockUI)&&d.datepicker._hideDatepicker()}},_adjustDate:function(a,b,c){a=d(a);var e=this._getInst(a[0]);if(!this._isDisabledDatepicker(a[0])){this._adjustInstDate(e,b+(c=="M"?this._get(e,"showCurrentAtPos"):0),c);this._updateDatepicker(e)}},_gotoToday:function(a){a=
|
||||
d(a);var b=this._getInst(a[0]);if(this._get(b,"gotoCurrent")&&b.currentDay){b.selectedDay=b.currentDay;b.drawMonth=b.selectedMonth=b.currentMonth;b.drawYear=b.selectedYear=b.currentYear}else{var c=new Date;b.selectedDay=c.getDate();b.drawMonth=b.selectedMonth=c.getMonth();b.drawYear=b.selectedYear=c.getFullYear()}this._notifyChange(b);this._adjustDate(a)},_selectMonthYear:function(a,b,c){a=d(a);var e=this._getInst(a[0]);e._selectingMonthYear=false;e["selected"+(c=="M"?"Month":"Year")]=e["draw"+(c==
|
||||
"M"?"Month":"Year")]=parseInt(b.options[b.selectedIndex].value,10);this._notifyChange(e);this._adjustDate(a)},_clickMonthYear:function(a){var b=this._getInst(d(a)[0]);b.input&&b._selectingMonthYear&&setTimeout(function(){b.input.focus()},0);b._selectingMonthYear=!b._selectingMonthYear},_selectDay:function(a,b,c,e){var f=d(a);if(!(d(e).hasClass(this._unselectableClass)||this._isDisabledDatepicker(f[0]))){f=this._getInst(f[0]);f.selectedDay=f.currentDay=d("a",e).html();f.selectedMonth=f.currentMonth=
|
||||
b;f.selectedYear=f.currentYear=c;this._selectDate(a,this._formatDate(f,f.currentDay,f.currentMonth,f.currentYear))}},_clearDate:function(a){a=d(a);this._getInst(a[0]);this._selectDate(a,"")},_selectDate:function(a,b){a=this._getInst(d(a)[0]);b=b!=null?b:this._formatDate(a);a.input&&a.input.val(b);this._updateAlternate(a);var c=this._get(a,"onSelect");if(c)c.apply(a.input?a.input[0]:null,[b,a]);else a.input&&a.input.trigger("change");if(a.inline)this._updateDatepicker(a);else{this._hideDatepicker();
|
||||
this._lastInput=a.input[0];typeof a.input[0]!="object"&&a.input.focus();this._lastInput=null}},_updateAlternate:function(a){var b=this._get(a,"altField");if(b){var c=this._get(a,"altFormat")||this._get(a,"dateFormat"),e=this._getDate(a),f=this.formatDate(c,e,this._getFormatConfig(a));d(b).each(function(){d(this).val(f)})}},noWeekends:function(a){a=a.getDay();return[a>0&&a<6,""]},iso8601Week:function(a){a=new Date(a.getTime());a.setDate(a.getDate()+4-(a.getDay()||7));var b=a.getTime();a.setMonth(0);
|
||||
a.setDate(1);return Math.floor(Math.round((b-a)/864E5)/7)+1},parseDate:function(a,b,c){if(a==null||b==null)throw"Invalid arguments";b=typeof b=="object"?b.toString():b+"";if(b=="")return null;var e=(c?c.shortYearCutoff:null)||this._defaults.shortYearCutoff;e=typeof e!="string"?e:(new Date).getFullYear()%100+parseInt(e,10);for(var f=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,h=(c?c.dayNames:null)||this._defaults.dayNames,i=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort,g=(c?
|
||||
c.monthNames:null)||this._defaults.monthNames,j=c=-1,l=-1,u=-1,k=false,o=function(p){(p=z+1<a.length&&a.charAt(z+1)==p)&&z++;return p},m=function(p){var v=o(p);p=new RegExp("^\\d{1,"+(p=="@"?14:p=="!"?20:p=="y"&&v?4:p=="o"?3:2)+"}");p=b.substring(s).match(p);if(!p)throw"Missing number at position "+s;s+=p[0].length;return parseInt(p[0],10)},n=function(p,v,H){p=o(p)?H:v;for(v=0;v<p.length;v++)if(b.substr(s,p[v].length).toLowerCase()==p[v].toLowerCase()){s+=p[v].length;return v+1}throw"Unknown name at position "+
|
||||
s;},r=function(){if(b.charAt(s)!=a.charAt(z))throw"Unexpected literal at position "+s;s++},s=0,z=0;z<a.length;z++)if(k)if(a.charAt(z)=="'"&&!o("'"))k=false;else r();else switch(a.charAt(z)){case "d":l=m("d");break;case "D":n("D",f,h);break;case "o":u=m("o");break;case "m":j=m("m");break;case "M":j=n("M",i,g);break;case "y":c=m("y");break;case "@":var w=new Date(m("@"));c=w.getFullYear();j=w.getMonth()+1;l=w.getDate();break;case "!":w=new Date((m("!")-this._ticksTo1970)/1E4);c=w.getFullYear();j=w.getMonth()+
|
||||
1;l=w.getDate();break;case "'":if(o("'"))r();else k=true;break;default:r()}if(c==-1)c=(new Date).getFullYear();else if(c<100)c+=(new Date).getFullYear()-(new Date).getFullYear()%100+(c<=e?0:-100);if(u>-1){j=1;l=u;do{e=this._getDaysInMonth(c,j-1);if(l<=e)break;j++;l-=e}while(1)}w=this._daylightSavingAdjust(new Date(c,j-1,l));if(w.getFullYear()!=c||w.getMonth()+1!=j||w.getDate()!=l)throw"Invalid date";return w},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",
|
||||
RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*24*60*60*1E7,formatDate:function(a,b,c){if(!b)return"";var e=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,f=(c?c.dayNames:null)||this._defaults.dayNames,h=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort;c=(c?c.monthNames:null)||this._defaults.monthNames;var i=function(o){(o=k+1<a.length&&
|
||||
a.charAt(k+1)==o)&&k++;return o},g=function(o,m,n){m=""+m;if(i(o))for(;m.length<n;)m="0"+m;return m},j=function(o,m,n,r){return i(o)?r[m]:n[m]},l="",u=false;if(b)for(var k=0;k<a.length;k++)if(u)if(a.charAt(k)=="'"&&!i("'"))u=false;else l+=a.charAt(k);else switch(a.charAt(k)){case "d":l+=g("d",b.getDate(),2);break;case "D":l+=j("D",b.getDay(),e,f);break;case "o":l+=g("o",(b.getTime()-(new Date(b.getFullYear(),0,0)).getTime())/864E5,3);break;case "m":l+=g("m",b.getMonth()+1,2);break;case "M":l+=j("M",
|
||||
b.getMonth(),h,c);break;case "y":l+=i("y")?b.getFullYear():(b.getYear()%100<10?"0":"")+b.getYear()%100;break;case "@":l+=b.getTime();break;case "!":l+=b.getTime()*1E4+this._ticksTo1970;break;case "'":if(i("'"))l+="'";else u=true;break;default:l+=a.charAt(k)}return l},_possibleChars:function(a){for(var b="",c=false,e=function(h){(h=f+1<a.length&&a.charAt(f+1)==h)&&f++;return h},f=0;f<a.length;f++)if(c)if(a.charAt(f)=="'"&&!e("'"))c=false;else b+=a.charAt(f);else switch(a.charAt(f)){case "d":case "m":case "y":case "@":b+=
|
||||
"0123456789";break;case "D":case "M":return null;case "'":if(e("'"))b+="'";else c=true;break;default:b+=a.charAt(f)}return b},_get:function(a,b){return a.settings[b]!==A?a.settings[b]:this._defaults[b]},_setDateFromField:function(a,b){if(a.input.val()!=a.lastVal){var c=this._get(a,"dateFormat"),e=a.lastVal=a.input?a.input.val():null,f,h;f=h=this._getDefaultDate(a);var i=this._getFormatConfig(a);try{f=this.parseDate(c,e,i)||h}catch(g){this.log(g);e=b?"":e}a.selectedDay=f.getDate();a.drawMonth=a.selectedMonth=
|
||||
f.getMonth();a.drawYear=a.selectedYear=f.getFullYear();a.currentDay=e?f.getDate():0;a.currentMonth=e?f.getMonth():0;a.currentYear=e?f.getFullYear():0;this._adjustInstDate(a)}},_getDefaultDate:function(a){return this._restrictMinMax(a,this._determineDate(a,this._get(a,"defaultDate"),new Date))},_determineDate:function(a,b,c){var e=function(h){var i=new Date;i.setDate(i.getDate()+h);return i},f=function(h){try{return d.datepicker.parseDate(d.datepicker._get(a,"dateFormat"),h,d.datepicker._getFormatConfig(a))}catch(i){}var g=
|
||||
(h.toLowerCase().match(/^c/)?d.datepicker._getDate(a):null)||new Date,j=g.getFullYear(),l=g.getMonth();g=g.getDate();for(var u=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,k=u.exec(h);k;){switch(k[2]||"d"){case "d":case "D":g+=parseInt(k[1],10);break;case "w":case "W":g+=parseInt(k[1],10)*7;break;case "m":case "M":l+=parseInt(k[1],10);g=Math.min(g,d.datepicker._getDaysInMonth(j,l));break;case "y":case "Y":j+=parseInt(k[1],10);g=Math.min(g,d.datepicker._getDaysInMonth(j,l));break}k=u.exec(h)}return new Date(j,
|
||||
l,g)};if(b=(b=b==null||b===""?c:typeof b=="string"?f(b):typeof b=="number"?isNaN(b)?c:e(b):new Date(b.getTime()))&&b.toString()=="Invalid Date"?c:b){b.setHours(0);b.setMinutes(0);b.setSeconds(0);b.setMilliseconds(0)}return this._daylightSavingAdjust(b)},_daylightSavingAdjust:function(a){if(!a)return null;a.setHours(a.getHours()>12?a.getHours()+2:0);return a},_setDate:function(a,b,c){var e=!b,f=a.selectedMonth,h=a.selectedYear;b=this._restrictMinMax(a,this._determineDate(a,b,new Date));a.selectedDay=
|
||||
a.currentDay=b.getDate();a.drawMonth=a.selectedMonth=a.currentMonth=b.getMonth();a.drawYear=a.selectedYear=a.currentYear=b.getFullYear();if((f!=a.selectedMonth||h!=a.selectedYear)&&!c)this._notifyChange(a);this._adjustInstDate(a);if(a.input)a.input.val(e?"":this._formatDate(a))},_getDate:function(a){return!a.currentYear||a.input&&a.input.val()==""?null:this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay))},_generateHTML:function(a){var b=new Date;b=this._daylightSavingAdjust(new Date(b.getFullYear(),
|
||||
b.getMonth(),b.getDate()));var c=this._get(a,"isRTL"),e=this._get(a,"showButtonPanel"),f=this._get(a,"hideIfNoPrevNext"),h=this._get(a,"navigationAsDateFormat"),i=this._getNumberOfMonths(a),g=this._get(a,"showCurrentAtPos"),j=this._get(a,"stepMonths"),l=i[0]!=1||i[1]!=1,u=this._daylightSavingAdjust(!a.currentDay?new Date(9999,9,9):new Date(a.currentYear,a.currentMonth,a.currentDay)),k=this._getMinMaxDate(a,"min"),o=this._getMinMaxDate(a,"max");g=a.drawMonth-g;var m=a.drawYear;if(g<0){g+=12;m--}if(o){var n=
|
||||
this._daylightSavingAdjust(new Date(o.getFullYear(),o.getMonth()-i[0]*i[1]+1,o.getDate()));for(n=k&&n<k?k:n;this._daylightSavingAdjust(new Date(m,g,1))>n;){g--;if(g<0){g=11;m--}}}a.drawMonth=g;a.drawYear=m;n=this._get(a,"prevText");n=!h?n:this.formatDate(n,this._daylightSavingAdjust(new Date(m,g-j,1)),this._getFormatConfig(a));n=this._canAdjustMonth(a,-1,m,g)?'<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery_'+y+".datepicker._adjustDate('#"+a.id+"', -"+j+", 'M');\" title=\""+n+'"><span class="ui-icon ui-icon-circle-triangle-'+
|
||||
(c?"e":"w")+'">'+n+"</span></a>":f?"":'<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+n+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"e":"w")+'">'+n+"</span></a>";var r=this._get(a,"nextText");r=!h?r:this.formatDate(r,this._daylightSavingAdjust(new Date(m,g+j,1)),this._getFormatConfig(a));f=this._canAdjustMonth(a,+1,m,g)?'<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery_'+y+".datepicker._adjustDate('#"+a.id+"', +"+j+", 'M');\" title=\""+r+'"><span class="ui-icon ui-icon-circle-triangle-'+
|
||||
(c?"w":"e")+'">'+r+"</span></a>":f?"":'<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+r+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"w":"e")+'">'+r+"</span></a>";j=this._get(a,"currentText");r=this._get(a,"gotoCurrent")&&a.currentDay?u:b;j=!h?j:this.formatDate(j,r,this._getFormatConfig(a));h=!a.inline?'<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery_'+y+'.datepicker._hideDatepicker();">'+this._get(a,
|
||||
"closeText")+"</button>":"";e=e?'<div class="ui-datepicker-buttonpane ui-widget-content">'+(c?h:"")+(this._isInRange(a,r)?'<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery_'+y+".datepicker._gotoToday('#"+a.id+"');\">"+j+"</button>":"")+(c?"":h)+"</div>":"";h=parseInt(this._get(a,"firstDay"),10);h=isNaN(h)?0:h;j=this._get(a,"showWeek");r=this._get(a,"dayNames");this._get(a,"dayNamesShort");var s=this._get(a,"dayNamesMin"),z=
|
||||
this._get(a,"monthNames"),w=this._get(a,"monthNamesShort"),p=this._get(a,"beforeShowDay"),v=this._get(a,"showOtherMonths"),H=this._get(a,"selectOtherMonths");this._get(a,"calculateWeek");for(var L=this._getDefaultDate(a),I="",D=0;D<i[0];D++){for(var M="",E=0;E<i[1];E++){var N=this._daylightSavingAdjust(new Date(m,g,a.selectedDay)),t=" ui-corner-all",x="";if(l){x+='<div class="ui-datepicker-group';if(i[1]>1)switch(E){case 0:x+=" ui-datepicker-group-first";t=" ui-corner-"+(c?"right":"left");break;case i[1]-
|
||||
1:x+=" ui-datepicker-group-last";t=" ui-corner-"+(c?"left":"right");break;default:x+=" ui-datepicker-group-middle";t="";break}x+='">'}x+='<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+t+'">'+(/all|left/.test(t)&&D==0?c?f:n:"")+(/all|right/.test(t)&&D==0?c?n:f:"")+this._generateMonthYearHeader(a,g,m,k,o,D>0||E>0,z,w)+'</div><table class="ui-datepicker-calendar"><thead><tr>';var B=j?'<th class="ui-datepicker-week-col">'+this._get(a,"weekHeader")+"</th>":"";for(t=0;t<7;t++){var q=
|
||||
(t+h)%7;B+="<th"+((t+h+6)%7>=5?' class="ui-datepicker-week-end"':"")+'><span title="'+r[q]+'">'+s[q]+"</span></th>"}x+=B+"</tr></thead><tbody>";B=this._getDaysInMonth(m,g);if(m==a.selectedYear&&g==a.selectedMonth)a.selectedDay=Math.min(a.selectedDay,B);t=(this._getFirstDayOfMonth(m,g)-h+7)%7;B=l?6:Math.ceil((t+B)/7);q=this._daylightSavingAdjust(new Date(m,g,1-t));for(var O=0;O<B;O++){x+="<tr>";var P=!j?"":'<td class="ui-datepicker-week-col">'+this._get(a,"calculateWeek")(q)+"</td>";for(t=0;t<7;t++){var G=
|
||||
p?p.apply(a.input?a.input[0]:null,[q]):[true,""],C=q.getMonth()!=g,J=C&&!H||!G[0]||k&&q<k||o&&q>o;P+='<td class="'+((t+h+6)%7>=5?" ui-datepicker-week-end":"")+(C?" ui-datepicker-other-month":"")+(q.getTime()==N.getTime()&&g==a.selectedMonth&&a._keyEvent||L.getTime()==q.getTime()&&L.getTime()==N.getTime()?" "+this._dayOverClass:"")+(J?" "+this._unselectableClass+" ui-state-disabled":"")+(C&&!v?"":" "+G[1]+(q.getTime()==u.getTime()?" "+this._currentClass:"")+(q.getTime()==b.getTime()?" ui-datepicker-today":
|
||||
""))+'"'+((!C||v)&&G[2]?' title="'+G[2]+'"':"")+(J?"":' onclick="DP_jQuery_'+y+".datepicker._selectDay('#"+a.id+"',"+q.getMonth()+","+q.getFullYear()+', this);return false;"')+">"+(C&&!v?" ":J?'<span class="ui-state-default">'+q.getDate()+"</span>":'<a class="ui-state-default'+(q.getTime()==b.getTime()?" ui-state-highlight":"")+(q.getTime()==u.getTime()?" ui-state-active":"")+(C?" ui-priority-secondary":"")+'" href="#">'+q.getDate()+"</a>")+"</td>";q.setDate(q.getDate()+1);q=this._daylightSavingAdjust(q)}x+=
|
||||
P+"</tr>"}g++;if(g>11){g=0;m++}x+="</tbody></table>"+(l?"</div>"+(i[0]>0&&E==i[1]-1?'<div class="ui-datepicker-row-break"></div>':""):"");M+=x}I+=M}I+=e+(d.browser.msie&&parseInt(d.browser.version,10)<7&&!a.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>':"");a._keyEvent=false;return I},_generateMonthYearHeader:function(a,b,c,e,f,h,i,g){var j=this._get(a,"changeMonth"),l=this._get(a,"changeYear"),u=this._get(a,"showMonthAfterYear"),k='<div class="ui-datepicker-title">',
|
||||
o="";if(h||!j)o+='<span class="ui-datepicker-month">'+i[b]+"</span>";else{i=e&&e.getFullYear()==c;var m=f&&f.getFullYear()==c;o+='<select class="ui-datepicker-month" onchange="DP_jQuery_'+y+".datepicker._selectMonthYear('#"+a.id+"', this, 'M');\" onclick=\"DP_jQuery_"+y+".datepicker._clickMonthYear('#"+a.id+"');\">";for(var n=0;n<12;n++)if((!i||n>=e.getMonth())&&(!m||n<=f.getMonth()))o+='<option value="'+n+'"'+(n==b?' selected="selected"':"")+">"+g[n]+"</option>";o+="</select>"}u||(k+=o+(h||!(j&&
|
||||
l)?" ":""));if(!a.yearshtml){a.yearshtml="";if(h||!l)k+='<span class="ui-datepicker-year">'+c+"</span>";else{g=this._get(a,"yearRange").split(":");var r=(new Date).getFullYear();i=function(s){s=s.match(/c[+-].*/)?c+parseInt(s.substring(1),10):s.match(/[+-].*/)?r+parseInt(s,10):parseInt(s,10);return isNaN(s)?r:s};b=i(g[0]);g=Math.max(b,i(g[1]||""));b=e?Math.max(b,e.getFullYear()):b;g=f?Math.min(g,f.getFullYear()):g;for(a.yearshtml+='<select class="ui-datepicker-year" onchange="DP_jQuery_'+y+".datepicker._selectMonthYear('#"+
|
||||
a.id+"', this, 'Y');\" onclick=\"DP_jQuery_"+y+".datepicker._clickMonthYear('#"+a.id+"');\">";b<=g;b++)a.yearshtml+='<option value="'+b+'"'+(b==c?' selected="selected"':"")+">"+b+"</option>";a.yearshtml+="</select>";if(d.browser.mozilla)k+='<select class="ui-datepicker-year"><option value="'+c+'" selected="selected">'+c+"</option></select>";else{k+=a.yearshtml;a.yearshtml=null}}}k+=this._get(a,"yearSuffix");if(u)k+=(h||!(j&&l)?" ":"")+o;k+="</div>";return k},_adjustInstDate:function(a,b,c){var e=
|
||||
a.drawYear+(c=="Y"?b:0),f=a.drawMonth+(c=="M"?b:0);b=Math.min(a.selectedDay,this._getDaysInMonth(e,f))+(c=="D"?b:0);e=this._restrictMinMax(a,this._daylightSavingAdjust(new Date(e,f,b)));a.selectedDay=e.getDate();a.drawMonth=a.selectedMonth=e.getMonth();a.drawYear=a.selectedYear=e.getFullYear();if(c=="M"||c=="Y")this._notifyChange(a)},_restrictMinMax:function(a,b){var c=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");b=c&&b<c?c:b;return b=a&&b>a?a:b},_notifyChange:function(a){var b=this._get(a,
|
||||
"onChangeMonthYear");if(b)b.apply(a.input?a.input[0]:null,[a.selectedYear,a.selectedMonth+1,a])},_getNumberOfMonths:function(a){a=this._get(a,"numberOfMonths");return a==null?[1,1]:typeof a=="number"?[1,a]:a},_getMinMaxDate:function(a,b){return this._determineDate(a,this._get(a,b+"Date"),null)},_getDaysInMonth:function(a,b){return 32-this._daylightSavingAdjust(new Date(a,b,32)).getDate()},_getFirstDayOfMonth:function(a,b){return(new Date(a,b,1)).getDay()},_canAdjustMonth:function(a,b,c,e){var f=this._getNumberOfMonths(a);
|
||||
c=this._daylightSavingAdjust(new Date(c,e+(b<0?b:f[0]*f[1]),1));b<0&&c.setDate(this._getDaysInMonth(c.getFullYear(),c.getMonth()));return this._isInRange(a,c)},_isInRange:function(a,b){var c=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");return(!c||b.getTime()>=c.getTime())&&(!a||b.getTime()<=a.getTime())},_getFormatConfig:function(a){var b=this._get(a,"shortYearCutoff");b=typeof b!="string"?b:(new Date).getFullYear()%100+parseInt(b,10);return{shortYearCutoff:b,dayNamesShort:this._get(a,
|
||||
"dayNamesShort"),dayNames:this._get(a,"dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,b,c,e){if(!b){a.currentDay=a.selectedDay;a.currentMonth=a.selectedMonth;a.currentYear=a.selectedYear}b=b?typeof b=="object"?b:this._daylightSavingAdjust(new Date(e,c,b)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return this.formatDate(this._get(a,"dateFormat"),b,this._getFormatConfig(a))}});d.fn.datepicker=
|
||||
function(a){if(!this.length)return this;if(!d.datepicker.initialized){d(document).mousedown(d.datepicker._checkExternalClick).find("body").append(d.datepicker.dpDiv);d.datepicker.initialized=true}var b=Array.prototype.slice.call(arguments,1);if(typeof a=="string"&&(a=="isDisabled"||a=="getDate"||a=="widget"))return d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this[0]].concat(b));if(a=="option"&&arguments.length==2&&typeof arguments[1]=="string")return d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,
|
||||
[this[0]].concat(b));return this.each(function(){typeof a=="string"?d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this].concat(b)):d.datepicker._attachDatepicker(this,a)})};d.datepicker=new K;d.datepicker.initialized=false;d.datepicker.uuid=(new Date).getTime();d.datepicker.version="1.8.12";window["DP_jQuery_"+y]=d})(jQuery);
|
||||
minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:true,showButtonPanel:false,autoSize:false,disabled:false};d.extend(this._defaults,this.regional[""]);this.dpDiv=N(d('<div id="'+this._mainDivId+'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))}function N(a){return a.bind("mouseout",
|
||||
function(b){b=d(b.target).closest("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a");b.length&&b.removeClass("ui-state-hover ui-datepicker-prev-hover ui-datepicker-next-hover")}).bind("mouseover",function(b){b=d(b.target).closest("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a");if(!(d.datepicker._isDisabledDatepicker(J.inline?a.parent()[0]:J.input[0])||!b.length)){b.parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");
|
||||
b.addClass("ui-state-hover");b.hasClass("ui-datepicker-prev")&&b.addClass("ui-datepicker-prev-hover");b.hasClass("ui-datepicker-next")&&b.addClass("ui-datepicker-next-hover")}})}function H(a,b){d.extend(a,b);for(var c in b)if(b[c]==null||b[c]==C)a[c]=b[c];return a}d.extend(d.ui,{datepicker:{version:"1.8.16"}});var B=(new Date).getTime(),J;d.extend(M.prototype,{markerClassName:"hasDatepicker",maxRows:4,log:function(){this.debug&&console.log.apply("",arguments)},_widgetDatepicker:function(){return this.dpDiv},
|
||||
setDefaults:function(a){H(this._defaults,a||{});return this},_attachDatepicker:function(a,b){var c=null;for(var e in this._defaults){var f=a.getAttribute("date:"+e);if(f){c=c||{};try{c[e]=eval(f)}catch(h){c[e]=f}}}e=a.nodeName.toLowerCase();f=e=="div"||e=="span";if(!a.id){this.uuid+=1;a.id="dp"+this.uuid}var i=this._newInst(d(a),f);i.settings=d.extend({},b||{},c||{});if(e=="input")this._connectDatepicker(a,i);else f&&this._inlineDatepicker(a,i)},_newInst:function(a,b){return{id:a[0].id.replace(/([^A-Za-z0-9_-])/g,
|
||||
"\\\\$1"),input:a,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:b,dpDiv:!b?this.dpDiv:N(d('<div class="'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))}},_connectDatepicker:function(a,b){var c=d(a);b.append=d([]);b.trigger=d([]);if(!c.hasClass(this.markerClassName)){this._attachments(c,b);c.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker",
|
||||
function(e,f,h){b.settings[f]=h}).bind("getData.datepicker",function(e,f){return this._get(b,f)});this._autoSize(b);d.data(a,"datepicker",b);b.settings.disabled&&this._disableDatepicker(a)}},_attachments:function(a,b){var c=this._get(b,"appendText"),e=this._get(b,"isRTL");b.append&&b.append.remove();if(c){b.append=d('<span class="'+this._appendClass+'">'+c+"</span>");a[e?"before":"after"](b.append)}a.unbind("focus",this._showDatepicker);b.trigger&&b.trigger.remove();c=this._get(b,"showOn");if(c==
|
||||
"focus"||c=="both")a.focus(this._showDatepicker);if(c=="button"||c=="both"){c=this._get(b,"buttonText");var f=this._get(b,"buttonImage");b.trigger=d(this._get(b,"buttonImageOnly")?d("<img/>").addClass(this._triggerClass).attr({src:f,alt:c,title:c}):d('<button type="button"></button>').addClass(this._triggerClass).html(f==""?c:d("<img/>").attr({src:f,alt:c,title:c})));a[e?"before":"after"](b.trigger);b.trigger.click(function(){d.datepicker._datepickerShowing&&d.datepicker._lastInput==a[0]?d.datepicker._hideDatepicker():
|
||||
d.datepicker._showDatepicker(a[0]);return false})}},_autoSize:function(a){if(this._get(a,"autoSize")&&!a.inline){var b=new Date(2009,11,20),c=this._get(a,"dateFormat");if(c.match(/[DM]/)){var e=function(f){for(var h=0,i=0,g=0;g<f.length;g++)if(f[g].length>h){h=f[g].length;i=g}return i};b.setMonth(e(this._get(a,c.match(/MM/)?"monthNames":"monthNamesShort")));b.setDate(e(this._get(a,c.match(/DD/)?"dayNames":"dayNamesShort"))+20-b.getDay())}a.input.attr("size",this._formatDate(a,b).length)}},_inlineDatepicker:function(a,
|
||||
b){var c=d(a);if(!c.hasClass(this.markerClassName)){c.addClass(this.markerClassName).append(b.dpDiv).bind("setData.datepicker",function(e,f,h){b.settings[f]=h}).bind("getData.datepicker",function(e,f){return this._get(b,f)});d.data(a,"datepicker",b);this._setDate(b,this._getDefaultDate(b),true);this._updateDatepicker(b);this._updateAlternate(b);b.settings.disabled&&this._disableDatepicker(a);b.dpDiv.css("display","block")}},_dialogDatepicker:function(a,b,c,e,f){a=this._dialogInst;if(!a){this.uuid+=
|
||||
1;this._dialogInput=d('<input type="text" id="'+("dp"+this.uuid)+'" style="position: absolute; top: -100px; width: 0px; z-index: -10;"/>');this._dialogInput.keydown(this._doKeyDown);d("body").append(this._dialogInput);a=this._dialogInst=this._newInst(this._dialogInput,false);a.settings={};d.data(this._dialogInput[0],"datepicker",a)}H(a.settings,e||{});b=b&&b.constructor==Date?this._formatDate(a,b):b;this._dialogInput.val(b);this._pos=f?f.length?f:[f.pageX,f.pageY]:null;if(!this._pos)this._pos=[document.documentElement.clientWidth/
|
||||
2-100+(document.documentElement.scrollLeft||document.body.scrollLeft),document.documentElement.clientHeight/2-150+(document.documentElement.scrollTop||document.body.scrollTop)];this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px");a.settings.onSelect=c;this._inDialog=true;this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);d.blockUI&&d.blockUI(this.dpDiv);d.data(this._dialogInput[0],"datepicker",a);return this},_destroyDatepicker:function(a){var b=
|
||||
d(a),c=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var e=a.nodeName.toLowerCase();d.removeData(a,"datepicker");if(e=="input"){c.append.remove();c.trigger.remove();b.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)}else if(e=="div"||e=="span")b.removeClass(this.markerClassName).empty()}},_enableDatepicker:function(a){var b=d(a),c=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var e=
|
||||
a.nodeName.toLowerCase();if(e=="input"){a.disabled=false;c.trigger.filter("button").each(function(){this.disabled=false}).end().filter("img").css({opacity:"1.0",cursor:""})}else if(e=="div"||e=="span"){b=b.children("."+this._inlineClass);b.children().removeClass("ui-state-disabled");b.find("select.ui-datepicker-month, select.ui-datepicker-year").removeAttr("disabled")}this._disabledInputs=d.map(this._disabledInputs,function(f){return f==a?null:f})}},_disableDatepicker:function(a){var b=d(a),c=d.data(a,
|
||||
"datepicker");if(b.hasClass(this.markerClassName)){var e=a.nodeName.toLowerCase();if(e=="input"){a.disabled=true;c.trigger.filter("button").each(function(){this.disabled=true}).end().filter("img").css({opacity:"0.5",cursor:"default"})}else if(e=="div"||e=="span"){b=b.children("."+this._inlineClass);b.children().addClass("ui-state-disabled");b.find("select.ui-datepicker-month, select.ui-datepicker-year").attr("disabled","disabled")}this._disabledInputs=d.map(this._disabledInputs,function(f){return f==
|
||||
a?null:f});this._disabledInputs[this._disabledInputs.length]=a}},_isDisabledDatepicker:function(a){if(!a)return false;for(var b=0;b<this._disabledInputs.length;b++)if(this._disabledInputs[b]==a)return true;return false},_getInst:function(a){try{return d.data(a,"datepicker")}catch(b){throw"Missing instance data for this datepicker";}},_optionDatepicker:function(a,b,c){var e=this._getInst(a);if(arguments.length==2&&typeof b=="string")return b=="defaults"?d.extend({},d.datepicker._defaults):e?b=="all"?
|
||||
d.extend({},e.settings):this._get(e,b):null;var f=b||{};if(typeof b=="string"){f={};f[b]=c}if(e){this._curInst==e&&this._hideDatepicker();var h=this._getDateDatepicker(a,true),i=this._getMinMaxDate(e,"min"),g=this._getMinMaxDate(e,"max");H(e.settings,f);if(i!==null&&f.dateFormat!==C&&f.minDate===C)e.settings.minDate=this._formatDate(e,i);if(g!==null&&f.dateFormat!==C&&f.maxDate===C)e.settings.maxDate=this._formatDate(e,g);this._attachments(d(a),e);this._autoSize(e);this._setDate(e,h);this._updateAlternate(e);
|
||||
this._updateDatepicker(e)}},_changeDatepicker:function(a,b,c){this._optionDatepicker(a,b,c)},_refreshDatepicker:function(a){(a=this._getInst(a))&&this._updateDatepicker(a)},_setDateDatepicker:function(a,b){if(a=this._getInst(a)){this._setDate(a,b);this._updateDatepicker(a);this._updateAlternate(a)}},_getDateDatepicker:function(a,b){(a=this._getInst(a))&&!a.inline&&this._setDateFromField(a,b);return a?this._getDate(a):null},_doKeyDown:function(a){var b=d.datepicker._getInst(a.target),c=true,e=b.dpDiv.is(".ui-datepicker-rtl");
|
||||
b._keyEvent=true;if(d.datepicker._datepickerShowing)switch(a.keyCode){case 9:d.datepicker._hideDatepicker();c=false;break;case 13:c=d("td."+d.datepicker._dayOverClass+":not(."+d.datepicker._currentClass+")",b.dpDiv);c[0]&&d.datepicker._selectDay(a.target,b.selectedMonth,b.selectedYear,c[0]);if(a=d.datepicker._get(b,"onSelect")){c=d.datepicker._formatDate(b);a.apply(b.input?b.input[0]:null,[c,b])}else d.datepicker._hideDatepicker();return false;case 27:d.datepicker._hideDatepicker();break;case 33:d.datepicker._adjustDate(a.target,
|
||||
a.ctrlKey?-d.datepicker._get(b,"stepBigMonths"):-d.datepicker._get(b,"stepMonths"),"M");break;case 34:d.datepicker._adjustDate(a.target,a.ctrlKey?+d.datepicker._get(b,"stepBigMonths"):+d.datepicker._get(b,"stepMonths"),"M");break;case 35:if(a.ctrlKey||a.metaKey)d.datepicker._clearDate(a.target);c=a.ctrlKey||a.metaKey;break;case 36:if(a.ctrlKey||a.metaKey)d.datepicker._gotoToday(a.target);c=a.ctrlKey||a.metaKey;break;case 37:if(a.ctrlKey||a.metaKey)d.datepicker._adjustDate(a.target,e?+1:-1,"D");c=
|
||||
a.ctrlKey||a.metaKey;if(a.originalEvent.altKey)d.datepicker._adjustDate(a.target,a.ctrlKey?-d.datepicker._get(b,"stepBigMonths"):-d.datepicker._get(b,"stepMonths"),"M");break;case 38:if(a.ctrlKey||a.metaKey)d.datepicker._adjustDate(a.target,-7,"D");c=a.ctrlKey||a.metaKey;break;case 39:if(a.ctrlKey||a.metaKey)d.datepicker._adjustDate(a.target,e?-1:+1,"D");c=a.ctrlKey||a.metaKey;if(a.originalEvent.altKey)d.datepicker._adjustDate(a.target,a.ctrlKey?+d.datepicker._get(b,"stepBigMonths"):+d.datepicker._get(b,
|
||||
"stepMonths"),"M");break;case 40:if(a.ctrlKey||a.metaKey)d.datepicker._adjustDate(a.target,+7,"D");c=a.ctrlKey||a.metaKey;break;default:c=false}else if(a.keyCode==36&&a.ctrlKey)d.datepicker._showDatepicker(this);else c=false;if(c){a.preventDefault();a.stopPropagation()}},_doKeyPress:function(a){var b=d.datepicker._getInst(a.target);if(d.datepicker._get(b,"constrainInput")){b=d.datepicker._possibleChars(d.datepicker._get(b,"dateFormat"));var c=String.fromCharCode(a.charCode==C?a.keyCode:a.charCode);
|
||||
return a.ctrlKey||a.metaKey||c<" "||!b||b.indexOf(c)>-1}},_doKeyUp:function(a){a=d.datepicker._getInst(a.target);if(a.input.val()!=a.lastVal)try{if(d.datepicker.parseDate(d.datepicker._get(a,"dateFormat"),a.input?a.input.val():null,d.datepicker._getFormatConfig(a))){d.datepicker._setDateFromField(a);d.datepicker._updateAlternate(a);d.datepicker._updateDatepicker(a)}}catch(b){d.datepicker.log(b)}return true},_showDatepicker:function(a){a=a.target||a;if(a.nodeName.toLowerCase()!="input")a=d("input",
|
||||
a.parentNode)[0];if(!(d.datepicker._isDisabledDatepicker(a)||d.datepicker._lastInput==a)){var b=d.datepicker._getInst(a);if(d.datepicker._curInst&&d.datepicker._curInst!=b){d.datepicker._datepickerShowing&&d.datepicker._triggerOnClose(d.datepicker._curInst);d.datepicker._curInst.dpDiv.stop(true,true)}var c=d.datepicker._get(b,"beforeShow");c=c?c.apply(a,[a,b]):{};if(c!==false){H(b.settings,c);b.lastVal=null;d.datepicker._lastInput=a;d.datepicker._setDateFromField(b);if(d.datepicker._inDialog)a.value=
|
||||
"";if(!d.datepicker._pos){d.datepicker._pos=d.datepicker._findPos(a);d.datepicker._pos[1]+=a.offsetHeight}var e=false;d(a).parents().each(function(){e|=d(this).css("position")=="fixed";return!e});if(e&&d.browser.opera){d.datepicker._pos[0]-=document.documentElement.scrollLeft;d.datepicker._pos[1]-=document.documentElement.scrollTop}c={left:d.datepicker._pos[0],top:d.datepicker._pos[1]};d.datepicker._pos=null;b.dpDiv.empty();b.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});d.datepicker._updateDatepicker(b);
|
||||
c=d.datepicker._checkOffset(b,c,e);b.dpDiv.css({position:d.datepicker._inDialog&&d.blockUI?"static":e?"fixed":"absolute",display:"none",left:c.left+"px",top:c.top+"px"});if(!b.inline){c=d.datepicker._get(b,"showAnim");var f=d.datepicker._get(b,"duration"),h=function(){var i=b.dpDiv.find("iframe.ui-datepicker-cover");if(i.length){var g=d.datepicker._getBorders(b.dpDiv);i.css({left:-g[0],top:-g[1],width:b.dpDiv.outerWidth(),height:b.dpDiv.outerHeight()})}};b.dpDiv.zIndex(d(a).zIndex()+1);d.datepicker._datepickerShowing=
|
||||
true;d.effects&&d.effects[c]?b.dpDiv.show(c,d.datepicker._get(b,"showOptions"),f,h):b.dpDiv[c||"show"](c?f:null,h);if(!c||!f)h();b.input.is(":visible")&&!b.input.is(":disabled")&&b.input.focus();d.datepicker._curInst=b}}}},_updateDatepicker:function(a){this.maxRows=4;var b=d.datepicker._getBorders(a.dpDiv);J=a;a.dpDiv.empty().append(this._generateHTML(a));var c=a.dpDiv.find("iframe.ui-datepicker-cover");c.length&&c.css({left:-b[0],top:-b[1],width:a.dpDiv.outerWidth(),height:a.dpDiv.outerHeight()});
|
||||
a.dpDiv.find("."+this._dayOverClass+" a").mouseover();b=this._getNumberOfMonths(a);c=b[1];a.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");c>1&&a.dpDiv.addClass("ui-datepicker-multi-"+c).css("width",17*c+"em");a.dpDiv[(b[0]!=1||b[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi");a.dpDiv[(this._get(a,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");a==d.datepicker._curInst&&d.datepicker._datepickerShowing&&a.input&&a.input.is(":visible")&&
|
||||
!a.input.is(":disabled")&&a.input[0]!=document.activeElement&&a.input.focus();if(a.yearshtml){var e=a.yearshtml;setTimeout(function(){e===a.yearshtml&&a.yearshtml&&a.dpDiv.find("select.ui-datepicker-year:first").replaceWith(a.yearshtml);e=a.yearshtml=null},0)}},_getBorders:function(a){var b=function(c){return{thin:1,medium:2,thick:3}[c]||c};return[parseFloat(b(a.css("border-left-width"))),parseFloat(b(a.css("border-top-width")))]},_checkOffset:function(a,b,c){var e=a.dpDiv.outerWidth(),f=a.dpDiv.outerHeight(),
|
||||
h=a.input?a.input.outerWidth():0,i=a.input?a.input.outerHeight():0,g=document.documentElement.clientWidth+d(document).scrollLeft(),j=document.documentElement.clientHeight+d(document).scrollTop();b.left-=this._get(a,"isRTL")?e-h:0;b.left-=c&&b.left==a.input.offset().left?d(document).scrollLeft():0;b.top-=c&&b.top==a.input.offset().top+i?d(document).scrollTop():0;b.left-=Math.min(b.left,b.left+e>g&&g>e?Math.abs(b.left+e-g):0);b.top-=Math.min(b.top,b.top+f>j&&j>f?Math.abs(f+i):0);return b},_findPos:function(a){for(var b=
|
||||
this._get(this._getInst(a),"isRTL");a&&(a.type=="hidden"||a.nodeType!=1||d.expr.filters.hidden(a));)a=a[b?"previousSibling":"nextSibling"];a=d(a).offset();return[a.left,a.top]},_triggerOnClose:function(a){var b=this._get(a,"onClose");if(b)b.apply(a.input?a.input[0]:null,[a.input?a.input.val():"",a])},_hideDatepicker:function(a){var b=this._curInst;if(!(!b||a&&b!=d.data(a,"datepicker")))if(this._datepickerShowing){a=this._get(b,"showAnim");var c=this._get(b,"duration"),e=function(){d.datepicker._tidyDialog(b);
|
||||
this._curInst=null};d.effects&&d.effects[a]?b.dpDiv.hide(a,d.datepicker._get(b,"showOptions"),c,e):b.dpDiv[a=="slideDown"?"slideUp":a=="fadeIn"?"fadeOut":"hide"](a?c:null,e);a||e();d.datepicker._triggerOnClose(b);this._datepickerShowing=false;this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if(d.blockUI){d.unblockUI();d("body").append(this.dpDiv)}}this._inDialog=false}},_tidyDialog:function(a){a.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},
|
||||
_checkExternalClick:function(a){if(d.datepicker._curInst){a=d(a.target);a[0].id!=d.datepicker._mainDivId&&a.parents("#"+d.datepicker._mainDivId).length==0&&!a.hasClass(d.datepicker.markerClassName)&&!a.hasClass(d.datepicker._triggerClass)&&d.datepicker._datepickerShowing&&!(d.datepicker._inDialog&&d.blockUI)&&d.datepicker._hideDatepicker()}},_adjustDate:function(a,b,c){a=d(a);var e=this._getInst(a[0]);if(!this._isDisabledDatepicker(a[0])){this._adjustInstDate(e,b+(c=="M"?this._get(e,"showCurrentAtPos"):
|
||||
0),c);this._updateDatepicker(e)}},_gotoToday:function(a){a=d(a);var b=this._getInst(a[0]);if(this._get(b,"gotoCurrent")&&b.currentDay){b.selectedDay=b.currentDay;b.drawMonth=b.selectedMonth=b.currentMonth;b.drawYear=b.selectedYear=b.currentYear}else{var c=new Date;b.selectedDay=c.getDate();b.drawMonth=b.selectedMonth=c.getMonth();b.drawYear=b.selectedYear=c.getFullYear()}this._notifyChange(b);this._adjustDate(a)},_selectMonthYear:function(a,b,c){a=d(a);var e=this._getInst(a[0]);e["selected"+(c=="M"?
|
||||
"Month":"Year")]=e["draw"+(c=="M"?"Month":"Year")]=parseInt(b.options[b.selectedIndex].value,10);this._notifyChange(e);this._adjustDate(a)},_selectDay:function(a,b,c,e){var f=d(a);if(!(d(e).hasClass(this._unselectableClass)||this._isDisabledDatepicker(f[0]))){f=this._getInst(f[0]);f.selectedDay=f.currentDay=d("a",e).html();f.selectedMonth=f.currentMonth=b;f.selectedYear=f.currentYear=c;this._selectDate(a,this._formatDate(f,f.currentDay,f.currentMonth,f.currentYear))}},_clearDate:function(a){a=d(a);
|
||||
this._getInst(a[0]);this._selectDate(a,"")},_selectDate:function(a,b){a=this._getInst(d(a)[0]);b=b!=null?b:this._formatDate(a);a.input&&a.input.val(b);this._updateAlternate(a);var c=this._get(a,"onSelect");if(c)c.apply(a.input?a.input[0]:null,[b,a]);else a.input&&a.input.trigger("change");if(a.inline)this._updateDatepicker(a);else{this._hideDatepicker();this._lastInput=a.input[0];typeof a.input[0]!="object"&&a.input.focus();this._lastInput=null}},_updateAlternate:function(a){var b=this._get(a,"altField");
|
||||
if(b){var c=this._get(a,"altFormat")||this._get(a,"dateFormat"),e=this._getDate(a),f=this.formatDate(c,e,this._getFormatConfig(a));d(b).each(function(){d(this).val(f)})}},noWeekends:function(a){a=a.getDay();return[a>0&&a<6,""]},iso8601Week:function(a){a=new Date(a.getTime());a.setDate(a.getDate()+4-(a.getDay()||7));var b=a.getTime();a.setMonth(0);a.setDate(1);return Math.floor(Math.round((b-a)/864E5)/7)+1},parseDate:function(a,b,c){if(a==null||b==null)throw"Invalid arguments";b=typeof b=="object"?
|
||||
b.toString():b+"";if(b=="")return null;var e=(c?c.shortYearCutoff:null)||this._defaults.shortYearCutoff;e=typeof e!="string"?e:(new Date).getFullYear()%100+parseInt(e,10);for(var f=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,h=(c?c.dayNames:null)||this._defaults.dayNames,i=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort,g=(c?c.monthNames:null)||this._defaults.monthNames,j=c=-1,l=-1,u=-1,k=false,o=function(p){(p=A+1<a.length&&a.charAt(A+1)==p)&&A++;return p},m=function(p){var D=
|
||||
o(p);p=new RegExp("^\\d{1,"+(p=="@"?14:p=="!"?20:p=="y"&&D?4:p=="o"?3:2)+"}");p=b.substring(q).match(p);if(!p)throw"Missing number at position "+q;q+=p[0].length;return parseInt(p[0],10)},n=function(p,D,K){p=d.map(o(p)?K:D,function(w,x){return[[x,w]]}).sort(function(w,x){return-(w[1].length-x[1].length)});var E=-1;d.each(p,function(w,x){w=x[1];if(b.substr(q,w.length).toLowerCase()==w.toLowerCase()){E=x[0];q+=w.length;return false}});if(E!=-1)return E+1;else throw"Unknown name at position "+q;},s=
|
||||
function(){if(b.charAt(q)!=a.charAt(A))throw"Unexpected literal at position "+q;q++},q=0,A=0;A<a.length;A++)if(k)if(a.charAt(A)=="'"&&!o("'"))k=false;else s();else switch(a.charAt(A)){case "d":l=m("d");break;case "D":n("D",f,h);break;case "o":u=m("o");break;case "m":j=m("m");break;case "M":j=n("M",i,g);break;case "y":c=m("y");break;case "@":var v=new Date(m("@"));c=v.getFullYear();j=v.getMonth()+1;l=v.getDate();break;case "!":v=new Date((m("!")-this._ticksTo1970)/1E4);c=v.getFullYear();j=v.getMonth()+
|
||||
1;l=v.getDate();break;case "'":if(o("'"))s();else k=true;break;default:s()}if(q<b.length)throw"Extra/unparsed characters found in date: "+b.substring(q);if(c==-1)c=(new Date).getFullYear();else if(c<100)c+=(new Date).getFullYear()-(new Date).getFullYear()%100+(c<=e?0:-100);if(u>-1){j=1;l=u;do{e=this._getDaysInMonth(c,j-1);if(l<=e)break;j++;l-=e}while(1)}v=this._daylightSavingAdjust(new Date(c,j-1,l));if(v.getFullYear()!=c||v.getMonth()+1!=j||v.getDate()!=l)throw"Invalid date";return v},ATOM:"yy-mm-dd",
|
||||
COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*24*60*60*1E7,formatDate:function(a,b,c){if(!b)return"";var e=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,f=(c?c.dayNames:null)||this._defaults.dayNames,h=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort;c=(c?c.monthNames:
|
||||
null)||this._defaults.monthNames;var i=function(o){(o=k+1<a.length&&a.charAt(k+1)==o)&&k++;return o},g=function(o,m,n){m=""+m;if(i(o))for(;m.length<n;)m="0"+m;return m},j=function(o,m,n,s){return i(o)?s[m]:n[m]},l="",u=false;if(b)for(var k=0;k<a.length;k++)if(u)if(a.charAt(k)=="'"&&!i("'"))u=false;else l+=a.charAt(k);else switch(a.charAt(k)){case "d":l+=g("d",b.getDate(),2);break;case "D":l+=j("D",b.getDay(),e,f);break;case "o":l+=g("o",Math.round(((new Date(b.getFullYear(),b.getMonth(),b.getDate())).getTime()-
|
||||
(new Date(b.getFullYear(),0,0)).getTime())/864E5),3);break;case "m":l+=g("m",b.getMonth()+1,2);break;case "M":l+=j("M",b.getMonth(),h,c);break;case "y":l+=i("y")?b.getFullYear():(b.getYear()%100<10?"0":"")+b.getYear()%100;break;case "@":l+=b.getTime();break;case "!":l+=b.getTime()*1E4+this._ticksTo1970;break;case "'":if(i("'"))l+="'";else u=true;break;default:l+=a.charAt(k)}return l},_possibleChars:function(a){for(var b="",c=false,e=function(h){(h=f+1<a.length&&a.charAt(f+1)==h)&&f++;return h},f=
|
||||
0;f<a.length;f++)if(c)if(a.charAt(f)=="'"&&!e("'"))c=false;else b+=a.charAt(f);else switch(a.charAt(f)){case "d":case "m":case "y":case "@":b+="0123456789";break;case "D":case "M":return null;case "'":if(e("'"))b+="'";else c=true;break;default:b+=a.charAt(f)}return b},_get:function(a,b){return a.settings[b]!==C?a.settings[b]:this._defaults[b]},_setDateFromField:function(a,b){if(a.input.val()!=a.lastVal){var c=this._get(a,"dateFormat"),e=a.lastVal=a.input?a.input.val():null,f,h;f=h=this._getDefaultDate(a);
|
||||
var i=this._getFormatConfig(a);try{f=this.parseDate(c,e,i)||h}catch(g){this.log(g);e=b?"":e}a.selectedDay=f.getDate();a.drawMonth=a.selectedMonth=f.getMonth();a.drawYear=a.selectedYear=f.getFullYear();a.currentDay=e?f.getDate():0;a.currentMonth=e?f.getMonth():0;a.currentYear=e?f.getFullYear():0;this._adjustInstDate(a)}},_getDefaultDate:function(a){return this._restrictMinMax(a,this._determineDate(a,this._get(a,"defaultDate"),new Date))},_determineDate:function(a,b,c){var e=function(h){var i=new Date;
|
||||
i.setDate(i.getDate()+h);return i},f=function(h){try{return d.datepicker.parseDate(d.datepicker._get(a,"dateFormat"),h,d.datepicker._getFormatConfig(a))}catch(i){}var g=(h.toLowerCase().match(/^c/)?d.datepicker._getDate(a):null)||new Date,j=g.getFullYear(),l=g.getMonth();g=g.getDate();for(var u=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,k=u.exec(h);k;){switch(k[2]||"d"){case "d":case "D":g+=parseInt(k[1],10);break;case "w":case "W":g+=parseInt(k[1],10)*7;break;case "m":case "M":l+=parseInt(k[1],10);g=
|
||||
Math.min(g,d.datepicker._getDaysInMonth(j,l));break;case "y":case "Y":j+=parseInt(k[1],10);g=Math.min(g,d.datepicker._getDaysInMonth(j,l));break}k=u.exec(h)}return new Date(j,l,g)};if(b=(b=b==null||b===""?c:typeof b=="string"?f(b):typeof b=="number"?isNaN(b)?c:e(b):new Date(b.getTime()))&&b.toString()=="Invalid Date"?c:b){b.setHours(0);b.setMinutes(0);b.setSeconds(0);b.setMilliseconds(0)}return this._daylightSavingAdjust(b)},_daylightSavingAdjust:function(a){if(!a)return null;a.setHours(a.getHours()>
|
||||
12?a.getHours()+2:0);return a},_setDate:function(a,b,c){var e=!b,f=a.selectedMonth,h=a.selectedYear;b=this._restrictMinMax(a,this._determineDate(a,b,new Date));a.selectedDay=a.currentDay=b.getDate();a.drawMonth=a.selectedMonth=a.currentMonth=b.getMonth();a.drawYear=a.selectedYear=a.currentYear=b.getFullYear();if((f!=a.selectedMonth||h!=a.selectedYear)&&!c)this._notifyChange(a);this._adjustInstDate(a);if(a.input)a.input.val(e?"":this._formatDate(a))},_getDate:function(a){return!a.currentYear||a.input&&
|
||||
a.input.val()==""?null:this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay))},_generateHTML:function(a){var b=new Date;b=this._daylightSavingAdjust(new Date(b.getFullYear(),b.getMonth(),b.getDate()));var c=this._get(a,"isRTL"),e=this._get(a,"showButtonPanel"),f=this._get(a,"hideIfNoPrevNext"),h=this._get(a,"navigationAsDateFormat"),i=this._getNumberOfMonths(a),g=this._get(a,"showCurrentAtPos"),j=this._get(a,"stepMonths"),l=i[0]!=1||i[1]!=1,u=this._daylightSavingAdjust(!a.currentDay?
|
||||
new Date(9999,9,9):new Date(a.currentYear,a.currentMonth,a.currentDay)),k=this._getMinMaxDate(a,"min"),o=this._getMinMaxDate(a,"max");g=a.drawMonth-g;var m=a.drawYear;if(g<0){g+=12;m--}if(o){var n=this._daylightSavingAdjust(new Date(o.getFullYear(),o.getMonth()-i[0]*i[1]+1,o.getDate()));for(n=k&&n<k?k:n;this._daylightSavingAdjust(new Date(m,g,1))>n;){g--;if(g<0){g=11;m--}}}a.drawMonth=g;a.drawYear=m;n=this._get(a,"prevText");n=!h?n:this.formatDate(n,this._daylightSavingAdjust(new Date(m,g-j,1)),this._getFormatConfig(a));
|
||||
n=this._canAdjustMonth(a,-1,m,g)?'<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery_'+B+".datepicker._adjustDate('#"+a.id+"', -"+j+", 'M');\" title=\""+n+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"e":"w")+'">'+n+"</span></a>":f?"":'<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+n+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"e":"w")+'">'+n+"</span></a>";var s=this._get(a,"nextText");s=!h?s:this.formatDate(s,this._daylightSavingAdjust(new Date(m,
|
||||
g+j,1)),this._getFormatConfig(a));f=this._canAdjustMonth(a,+1,m,g)?'<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery_'+B+".datepicker._adjustDate('#"+a.id+"', +"+j+", 'M');\" title=\""+s+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"w":"e")+'">'+s+"</span></a>":f?"":'<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+s+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"w":"e")+'">'+s+"</span></a>";j=this._get(a,"currentText");s=this._get(a,"gotoCurrent")&&
|
||||
a.currentDay?u:b;j=!h?j:this.formatDate(j,s,this._getFormatConfig(a));h=!a.inline?'<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery_'+B+'.datepicker._hideDatepicker();">'+this._get(a,"closeText")+"</button>":"";e=e?'<div class="ui-datepicker-buttonpane ui-widget-content">'+(c?h:"")+(this._isInRange(a,s)?'<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery_'+
|
||||
B+".datepicker._gotoToday('#"+a.id+"');\">"+j+"</button>":"")+(c?"":h)+"</div>":"";h=parseInt(this._get(a,"firstDay"),10);h=isNaN(h)?0:h;j=this._get(a,"showWeek");s=this._get(a,"dayNames");this._get(a,"dayNamesShort");var q=this._get(a,"dayNamesMin"),A=this._get(a,"monthNames"),v=this._get(a,"monthNamesShort"),p=this._get(a,"beforeShowDay"),D=this._get(a,"showOtherMonths"),K=this._get(a,"selectOtherMonths");this._get(a,"calculateWeek");for(var E=this._getDefaultDate(a),w="",x=0;x<i[0];x++){var O=
|
||||
"";this.maxRows=4;for(var G=0;G<i[1];G++){var P=this._daylightSavingAdjust(new Date(m,g,a.selectedDay)),t=" ui-corner-all",y="";if(l){y+='<div class="ui-datepicker-group';if(i[1]>1)switch(G){case 0:y+=" ui-datepicker-group-first";t=" ui-corner-"+(c?"right":"left");break;case i[1]-1:y+=" ui-datepicker-group-last";t=" ui-corner-"+(c?"left":"right");break;default:y+=" ui-datepicker-group-middle";t="";break}y+='">'}y+='<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+t+'">'+(/all|left/.test(t)&&
|
||||
x==0?c?f:n:"")+(/all|right/.test(t)&&x==0?c?n:f:"")+this._generateMonthYearHeader(a,g,m,k,o,x>0||G>0,A,v)+'</div><table class="ui-datepicker-calendar"><thead><tr>';var z=j?'<th class="ui-datepicker-week-col">'+this._get(a,"weekHeader")+"</th>":"";for(t=0;t<7;t++){var r=(t+h)%7;z+="<th"+((t+h+6)%7>=5?' class="ui-datepicker-week-end"':"")+'><span title="'+s[r]+'">'+q[r]+"</span></th>"}y+=z+"</tr></thead><tbody>";z=this._getDaysInMonth(m,g);if(m==a.selectedYear&&g==a.selectedMonth)a.selectedDay=Math.min(a.selectedDay,
|
||||
z);t=(this._getFirstDayOfMonth(m,g)-h+7)%7;z=Math.ceil((t+z)/7);this.maxRows=z=l?this.maxRows>z?this.maxRows:z:z;r=this._daylightSavingAdjust(new Date(m,g,1-t));for(var Q=0;Q<z;Q++){y+="<tr>";var R=!j?"":'<td class="ui-datepicker-week-col">'+this._get(a,"calculateWeek")(r)+"</td>";for(t=0;t<7;t++){var I=p?p.apply(a.input?a.input[0]:null,[r]):[true,""],F=r.getMonth()!=g,L=F&&!K||!I[0]||k&&r<k||o&&r>o;R+='<td class="'+((t+h+6)%7>=5?" ui-datepicker-week-end":"")+(F?" ui-datepicker-other-month":"")+(r.getTime()==
|
||||
P.getTime()&&g==a.selectedMonth&&a._keyEvent||E.getTime()==r.getTime()&&E.getTime()==P.getTime()?" "+this._dayOverClass:"")+(L?" "+this._unselectableClass+" ui-state-disabled":"")+(F&&!D?"":" "+I[1]+(r.getTime()==u.getTime()?" "+this._currentClass:"")+(r.getTime()==b.getTime()?" ui-datepicker-today":""))+'"'+((!F||D)&&I[2]?' title="'+I[2]+'"':"")+(L?"":' onclick="DP_jQuery_'+B+".datepicker._selectDay('#"+a.id+"',"+r.getMonth()+","+r.getFullYear()+', this);return false;"')+">"+(F&&!D?" ":L?'<span class="ui-state-default">'+
|
||||
r.getDate()+"</span>":'<a class="ui-state-default'+(r.getTime()==b.getTime()?" ui-state-highlight":"")+(r.getTime()==u.getTime()?" ui-state-active":"")+(F?" ui-priority-secondary":"")+'" href="#">'+r.getDate()+"</a>")+"</td>";r.setDate(r.getDate()+1);r=this._daylightSavingAdjust(r)}y+=R+"</tr>"}g++;if(g>11){g=0;m++}y+="</tbody></table>"+(l?"</div>"+(i[0]>0&&G==i[1]-1?'<div class="ui-datepicker-row-break"></div>':""):"");O+=y}w+=O}w+=e+(d.browser.msie&&parseInt(d.browser.version,10)<7&&!a.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>':
|
||||
"");a._keyEvent=false;return w},_generateMonthYearHeader:function(a,b,c,e,f,h,i,g){var j=this._get(a,"changeMonth"),l=this._get(a,"changeYear"),u=this._get(a,"showMonthAfterYear"),k='<div class="ui-datepicker-title">',o="";if(h||!j)o+='<span class="ui-datepicker-month">'+i[b]+"</span>";else{i=e&&e.getFullYear()==c;var m=f&&f.getFullYear()==c;o+='<select class="ui-datepicker-month" onchange="DP_jQuery_'+B+".datepicker._selectMonthYear('#"+a.id+"', this, 'M');\" >";for(var n=0;n<12;n++)if((!i||n>=e.getMonth())&&
|
||||
(!m||n<=f.getMonth()))o+='<option value="'+n+'"'+(n==b?' selected="selected"':"")+">"+g[n]+"</option>";o+="</select>"}u||(k+=o+(h||!(j&&l)?" ":""));if(!a.yearshtml){a.yearshtml="";if(h||!l)k+='<span class="ui-datepicker-year">'+c+"</span>";else{g=this._get(a,"yearRange").split(":");var s=(new Date).getFullYear();i=function(q){q=q.match(/c[+-].*/)?c+parseInt(q.substring(1),10):q.match(/[+-].*/)?s+parseInt(q,10):parseInt(q,10);return isNaN(q)?s:q};b=i(g[0]);g=Math.max(b,i(g[1]||""));b=e?Math.max(b,
|
||||
e.getFullYear()):b;g=f?Math.min(g,f.getFullYear()):g;for(a.yearshtml+='<select class="ui-datepicker-year" onchange="DP_jQuery_'+B+".datepicker._selectMonthYear('#"+a.id+"', this, 'Y');\" >";b<=g;b++)a.yearshtml+='<option value="'+b+'"'+(b==c?' selected="selected"':"")+">"+b+"</option>";a.yearshtml+="</select>";k+=a.yearshtml;a.yearshtml=null}}k+=this._get(a,"yearSuffix");if(u)k+=(h||!(j&&l)?" ":"")+o;k+="</div>";return k},_adjustInstDate:function(a,b,c){var e=a.drawYear+(c=="Y"?b:0),f=a.drawMonth+
|
||||
(c=="M"?b:0);b=Math.min(a.selectedDay,this._getDaysInMonth(e,f))+(c=="D"?b:0);e=this._restrictMinMax(a,this._daylightSavingAdjust(new Date(e,f,b)));a.selectedDay=e.getDate();a.drawMonth=a.selectedMonth=e.getMonth();a.drawYear=a.selectedYear=e.getFullYear();if(c=="M"||c=="Y")this._notifyChange(a)},_restrictMinMax:function(a,b){var c=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");b=c&&b<c?c:b;return b=a&&b>a?a:b},_notifyChange:function(a){var b=this._get(a,"onChangeMonthYear");if(b)b.apply(a.input?
|
||||
a.input[0]:null,[a.selectedYear,a.selectedMonth+1,a])},_getNumberOfMonths:function(a){a=this._get(a,"numberOfMonths");return a==null?[1,1]:typeof a=="number"?[1,a]:a},_getMinMaxDate:function(a,b){return this._determineDate(a,this._get(a,b+"Date"),null)},_getDaysInMonth:function(a,b){return 32-this._daylightSavingAdjust(new Date(a,b,32)).getDate()},_getFirstDayOfMonth:function(a,b){return(new Date(a,b,1)).getDay()},_canAdjustMonth:function(a,b,c,e){var f=this._getNumberOfMonths(a);c=this._daylightSavingAdjust(new Date(c,
|
||||
e+(b<0?b:f[0]*f[1]),1));b<0&&c.setDate(this._getDaysInMonth(c.getFullYear(),c.getMonth()));return this._isInRange(a,c)},_isInRange:function(a,b){var c=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");return(!c||b.getTime()>=c.getTime())&&(!a||b.getTime()<=a.getTime())},_getFormatConfig:function(a){var b=this._get(a,"shortYearCutoff");b=typeof b!="string"?b:(new Date).getFullYear()%100+parseInt(b,10);return{shortYearCutoff:b,dayNamesShort:this._get(a,"dayNamesShort"),dayNames:this._get(a,
|
||||
"dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,b,c,e){if(!b){a.currentDay=a.selectedDay;a.currentMonth=a.selectedMonth;a.currentYear=a.selectedYear}b=b?typeof b=="object"?b:this._daylightSavingAdjust(new Date(e,c,b)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return this.formatDate(this._get(a,"dateFormat"),b,this._getFormatConfig(a))}});d.fn.datepicker=function(a){if(!this.length)return this;
|
||||
if(!d.datepicker.initialized){d(document).mousedown(d.datepicker._checkExternalClick).find("body").append(d.datepicker.dpDiv);d.datepicker.initialized=true}var b=Array.prototype.slice.call(arguments,1);if(typeof a=="string"&&(a=="isDisabled"||a=="getDate"||a=="widget"))return d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this[0]].concat(b));if(a=="option"&&arguments.length==2&&typeof arguments[1]=="string")return d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this[0]].concat(b));return this.each(function(){typeof a==
|
||||
"string"?d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this].concat(b)):d.datepicker._attachDatepicker(this,a)})};d.datepicker=new M;d.datepicker.initialized=false;d.datepicker.uuid=(new Date).getTime();d.datepicker.version="1.8.16";window["DP_jQuery_"+B]=d})(jQuery);
|
||||
;/*
|
||||
* jQuery UI Progressbar 1.8.12
|
||||
* jQuery UI Progressbar 1.8.16
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
|
|
@ -560,9 +567,9 @@ function(a){if(!this.length)return this;if(!d.datepicker.initialized){d(document
|
|||
*/
|
||||
(function(b,d){b.widget("ui.progressbar",{options:{value:0,max:100},min:0,_create:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min,"aria-valuemax":this.options.max,"aria-valuenow":this._value()});this.valueDiv=b("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element);this.oldValue=this._value();this._refreshValue()},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow");
|
||||
this.valueDiv.remove();b.Widget.prototype.destroy.apply(this,arguments)},value:function(a){if(a===d)return this._value();this._setOption("value",a);return this},_setOption:function(a,c){if(a==="value"){this.options.value=c;this._refreshValue();this._value()===this.options.max&&this._trigger("complete")}b.Widget.prototype._setOption.apply(this,arguments)},_value:function(){var a=this.options.value;if(typeof a!=="number")a=0;return Math.min(this.options.max,Math.max(this.min,a))},_percentage:function(){return 100*
|
||||
this._value()/this.options.max},_refreshValue:function(){var a=this.value(),c=this._percentage();if(this.oldValue!==a){this.oldValue=a;this._trigger("change")}this.valueDiv.toggle(a>this.min).toggleClass("ui-corner-right",a===this.options.max).width(c.toFixed(0)+"%");this.element.attr("aria-valuenow",a)}});b.extend(b.ui.progressbar,{version:"1.8.12"})})(jQuery);
|
||||
this._value()/this.options.max},_refreshValue:function(){var a=this.value(),c=this._percentage();if(this.oldValue!==a){this.oldValue=a;this._trigger("change")}this.valueDiv.toggle(a>this.min).toggleClass("ui-corner-right",a===this.options.max).width(c.toFixed(0)+"%");this.element.attr("aria-valuenow",a)}});b.extend(b.ui.progressbar,{version:"1.8.16"})})(jQuery);
|
||||
;/*
|
||||
* jQuery UI Effects 1.8.12
|
||||
* jQuery UI Effects 1.8.16
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
|
|
@ -570,29 +577,30 @@ this._value()/this.options.max},_refreshValue:function(){var a=this.value(),c=th
|
|||
*
|
||||
* http://docs.jquery.com/UI/Effects/
|
||||
*/
|
||||
jQuery.effects||function(f,j){function n(c){var a;if(c&&c.constructor==Array&&c.length==3)return c;if(a=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(c))return[parseInt(a[1],10),parseInt(a[2],10),parseInt(a[3],10)];if(a=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(c))return[parseFloat(a[1])*2.55,parseFloat(a[2])*2.55,parseFloat(a[3])*2.55];if(a=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(c))return[parseInt(a[1],
|
||||
16),parseInt(a[2],16),parseInt(a[3],16)];if(a=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(c))return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)];if(/rgba\(0, 0, 0, 0\)/.exec(c))return o.transparent;return o[f.trim(c).toLowerCase()]}function s(c,a){var b;do{b=f.curCSS(c,a);if(b!=""&&b!="transparent"||f.nodeName(c,"body"))break;a="backgroundColor"}while(c=c.parentNode);return n(b)}function p(){var c=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle,
|
||||
a={},b,d;if(c&&c.length&&c[0]&&c[c[0]])for(var e=c.length;e--;){b=c[e];if(typeof c[b]=="string"){d=b.replace(/\-(\w)/g,function(g,h){return h.toUpperCase()});a[d]=c[b]}}else for(b in c)if(typeof c[b]==="string")a[b]=c[b];return a}function q(c){var a,b;for(a in c){b=c[a];if(b==null||f.isFunction(b)||a in t||/scrollbar/.test(a)||!/color/i.test(a)&&isNaN(parseFloat(b)))delete c[a]}return c}function u(c,a){var b={_:0},d;for(d in a)if(c[d]!=a[d])b[d]=a[d];return b}function k(c,a,b,d){if(typeof c=="object"){d=
|
||||
a;b=null;a=c;c=a.effect}if(f.isFunction(a)){d=a;b=null;a={}}if(typeof a=="number"||f.fx.speeds[a]){d=b;b=a;a={}}if(f.isFunction(b)){d=b;b=null}a=a||{};b=b||a.duration;b=f.fx.off?0:typeof b=="number"?b:b in f.fx.speeds?f.fx.speeds[b]:f.fx.speeds._default;d=d||a.complete;return[c,a,b,d]}function m(c){if(!c||typeof c==="number"||f.fx.speeds[c])return true;if(typeof c==="string"&&!f.effects[c])return true;return false}f.effects={};f.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor",
|
||||
"borderTopColor","borderColor","color","outlineColor"],function(c,a){f.fx.step[a]=function(b){if(!b.colorInit){b.start=s(b.elem,a);b.end=n(b.end);b.colorInit=true}b.elem.style[a]="rgb("+Math.max(Math.min(parseInt(b.pos*(b.end[0]-b.start[0])+b.start[0],10),255),0)+","+Math.max(Math.min(parseInt(b.pos*(b.end[1]-b.start[1])+b.start[1],10),255),0)+","+Math.max(Math.min(parseInt(b.pos*(b.end[2]-b.start[2])+b.start[2],10),255),0)+")"}});var o={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,
|
||||
jQuery.effects||function(f,j){function m(c){var a;if(c&&c.constructor==Array&&c.length==3)return c;if(a=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(c))return[parseInt(a[1],10),parseInt(a[2],10),parseInt(a[3],10)];if(a=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(c))return[parseFloat(a[1])*2.55,parseFloat(a[2])*2.55,parseFloat(a[3])*2.55];if(a=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(c))return[parseInt(a[1],
|
||||
16),parseInt(a[2],16),parseInt(a[3],16)];if(a=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(c))return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)];if(/rgba\(0, 0, 0, 0\)/.exec(c))return n.transparent;return n[f.trim(c).toLowerCase()]}function s(c,a){var b;do{b=f.curCSS(c,a);if(b!=""&&b!="transparent"||f.nodeName(c,"body"))break;a="backgroundColor"}while(c=c.parentNode);return m(b)}function o(){var c=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle,
|
||||
a={},b,d;if(c&&c.length&&c[0]&&c[c[0]])for(var e=c.length;e--;){b=c[e];if(typeof c[b]=="string"){d=b.replace(/\-(\w)/g,function(g,h){return h.toUpperCase()});a[d]=c[b]}}else for(b in c)if(typeof c[b]==="string")a[b]=c[b];return a}function p(c){var a,b;for(a in c){b=c[a];if(b==null||f.isFunction(b)||a in t||/scrollbar/.test(a)||!/color/i.test(a)&&isNaN(parseFloat(b)))delete c[a]}return c}function u(c,a){var b={_:0},d;for(d in a)if(c[d]!=a[d])b[d]=a[d];return b}function k(c,a,b,d){if(typeof c=="object"){d=
|
||||
a;b=null;a=c;c=a.effect}if(f.isFunction(a)){d=a;b=null;a={}}if(typeof a=="number"||f.fx.speeds[a]){d=b;b=a;a={}}if(f.isFunction(b)){d=b;b=null}a=a||{};b=b||a.duration;b=f.fx.off?0:typeof b=="number"?b:b in f.fx.speeds?f.fx.speeds[b]:f.fx.speeds._default;d=d||a.complete;return[c,a,b,d]}function l(c){if(!c||typeof c==="number"||f.fx.speeds[c])return true;if(typeof c==="string"&&!f.effects[c])return true;return false}f.effects={};f.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor",
|
||||
"borderTopColor","borderColor","color","outlineColor"],function(c,a){f.fx.step[a]=function(b){if(!b.colorInit){b.start=s(b.elem,a);b.end=m(b.end);b.colorInit=true}b.elem.style[a]="rgb("+Math.max(Math.min(parseInt(b.pos*(b.end[0]-b.start[0])+b.start[0],10),255),0)+","+Math.max(Math.min(parseInt(b.pos*(b.end[1]-b.start[1])+b.start[1],10),255),0)+","+Math.max(Math.min(parseInt(b.pos*(b.end[2]-b.start[2])+b.start[2],10),255),0)+")"}});var n={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,
|
||||
0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,
|
||||
211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]},r=["add","remove","toggle"],t={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};f.effects.animateClass=function(c,a,b,
|
||||
d){if(f.isFunction(b)){d=b;b=null}return this.queue("fx",function(){var e=f(this),g=e.attr("style")||" ",h=q(p.call(this)),l,v=e.attr("className");f.each(r,function(w,i){c[i]&&e[i+"Class"](c[i])});l=q(p.call(this));e.attr("className",v);e.animate(u(h,l),a,b,function(){f.each(r,function(w,i){c[i]&&e[i+"Class"](c[i])});if(typeof e.attr("style")=="object"){e.attr("style").cssText="";e.attr("style").cssText=g}else e.attr("style",g);d&&d.apply(this,arguments)});h=f.queue(this);l=h.splice(h.length-1,1)[0];
|
||||
h.splice(1,0,l);f.dequeue(this)})};f.fn.extend({_addClass:f.fn.addClass,addClass:function(c,a,b,d){return a?f.effects.animateClass.apply(this,[{add:c},a,b,d]):this._addClass(c)},_removeClass:f.fn.removeClass,removeClass:function(c,a,b,d){return a?f.effects.animateClass.apply(this,[{remove:c},a,b,d]):this._removeClass(c)},_toggleClass:f.fn.toggleClass,toggleClass:function(c,a,b,d,e){return typeof a=="boolean"||a===j?b?f.effects.animateClass.apply(this,[a?{add:c}:{remove:c},b,d,e]):this._toggleClass(c,
|
||||
a):f.effects.animateClass.apply(this,[{toggle:c},a,b,d])},switchClass:function(c,a,b,d,e){return f.effects.animateClass.apply(this,[{add:a,remove:c},b,d,e])}});f.extend(f.effects,{version:"1.8.12",save:function(c,a){for(var b=0;b<a.length;b++)a[b]!==null&&c.data("ec.storage."+a[b],c[0].style[a[b]])},restore:function(c,a){for(var b=0;b<a.length;b++)a[b]!==null&&c.css(a[b],c.data("ec.storage."+a[b]))},setMode:function(c,a){if(a=="toggle")a=c.is(":hidden")?"show":"hide";return a},getBaseline:function(c,
|
||||
a){var b;switch(c[0]){case "top":b=0;break;case "middle":b=0.5;break;case "bottom":b=1;break;default:b=c[0]/a.height}switch(c[1]){case "left":c=0;break;case "center":c=0.5;break;case "right":c=1;break;default:c=c[1]/a.width}return{x:c,y:b}},createWrapper:function(c){if(c.parent().is(".ui-effects-wrapper"))return c.parent();var a={width:c.outerWidth(true),height:c.outerHeight(true),"float":c.css("float")},b=f("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",
|
||||
border:"none",margin:0,padding:0});c.wrap(b);b=c.parent();if(c.css("position")=="static"){b.css({position:"relative"});c.css({position:"relative"})}else{f.extend(a,{position:c.css("position"),zIndex:c.css("z-index")});f.each(["top","left","bottom","right"],function(d,e){a[e]=c.css(e);if(isNaN(parseInt(a[e],10)))a[e]="auto"});c.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})}return b.css(a).show()},removeWrapper:function(c){if(c.parent().is(".ui-effects-wrapper"))return c.parent().replaceWith(c);
|
||||
return c},setTransition:function(c,a,b,d){d=d||{};f.each(a,function(e,g){unit=c.cssUnit(g);if(unit[0]>0)d[g]=unit[0]*b+unit[1]});return d}});f.fn.extend({effect:function(c){var a=k.apply(this,arguments),b={options:a[1],duration:a[2],callback:a[3]};a=b.options.mode;var d=f.effects[c];if(f.fx.off||!d)return a?this[a](b.duration,b.callback):this.each(function(){b.callback&&b.callback.call(this)});return d.call(this,b)},_show:f.fn.show,show:function(c){if(m(c))return this._show.apply(this,arguments);
|
||||
else{var a=k.apply(this,arguments);a[1].mode="show";return this.effect.apply(this,a)}},_hide:f.fn.hide,hide:function(c){if(m(c))return this._hide.apply(this,arguments);else{var a=k.apply(this,arguments);a[1].mode="hide";return this.effect.apply(this,a)}},__toggle:f.fn.toggle,toggle:function(c){if(m(c)||typeof c==="boolean"||f.isFunction(c))return this.__toggle.apply(this,arguments);else{var a=k.apply(this,arguments);a[1].mode="toggle";return this.effect.apply(this,a)}},cssUnit:function(c){var a=this.css(c),
|
||||
b=[];f.each(["em","px","%","pt"],function(d,e){if(a.indexOf(e)>0)b=[parseFloat(a),e]});return b}});f.easing.jswing=f.easing.swing;f.extend(f.easing,{def:"easeOutQuad",swing:function(c,a,b,d,e){return f.easing[f.easing.def](c,a,b,d,e)},easeInQuad:function(c,a,b,d,e){return d*(a/=e)*a+b},easeOutQuad:function(c,a,b,d,e){return-d*(a/=e)*(a-2)+b},easeInOutQuad:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a+b;return-d/2*(--a*(a-2)-1)+b},easeInCubic:function(c,a,b,d,e){return d*(a/=e)*a*a+b},easeOutCubic:function(c,
|
||||
a,b,d,e){return d*((a=a/e-1)*a*a+1)+b},easeInOutCubic:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a+b;return d/2*((a-=2)*a*a+2)+b},easeInQuart:function(c,a,b,d,e){return d*(a/=e)*a*a*a+b},easeOutQuart:function(c,a,b,d,e){return-d*((a=a/e-1)*a*a*a-1)+b},easeInOutQuart:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a*a+b;return-d/2*((a-=2)*a*a*a-2)+b},easeInQuint:function(c,a,b,d,e){return d*(a/=e)*a*a*a*a+b},easeOutQuint:function(c,a,b,d,e){return d*((a=a/e-1)*a*a*a*a+1)+b},easeInOutQuint:function(c,
|
||||
a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a*a*a+b;return d/2*((a-=2)*a*a*a*a+2)+b},easeInSine:function(c,a,b,d,e){return-d*Math.cos(a/e*(Math.PI/2))+d+b},easeOutSine:function(c,a,b,d,e){return d*Math.sin(a/e*(Math.PI/2))+b},easeInOutSine:function(c,a,b,d,e){return-d/2*(Math.cos(Math.PI*a/e)-1)+b},easeInExpo:function(c,a,b,d,e){return a==0?b:d*Math.pow(2,10*(a/e-1))+b},easeOutExpo:function(c,a,b,d,e){return a==e?b+d:d*(-Math.pow(2,-10*a/e)+1)+b},easeInOutExpo:function(c,a,b,d,e){if(a==0)return b;if(a==
|
||||
e)return b+d;if((a/=e/2)<1)return d/2*Math.pow(2,10*(a-1))+b;return d/2*(-Math.pow(2,-10*--a)+2)+b},easeInCirc:function(c,a,b,d,e){return-d*(Math.sqrt(1-(a/=e)*a)-1)+b},easeOutCirc:function(c,a,b,d,e){return d*Math.sqrt(1-(a=a/e-1)*a)+b},easeInOutCirc:function(c,a,b,d,e){if((a/=e/2)<1)return-d/2*(Math.sqrt(1-a*a)-1)+b;return d/2*(Math.sqrt(1-(a-=2)*a)+1)+b},easeInElastic:function(c,a,b,d,e){c=1.70158;var g=0,h=d;if(a==0)return b;if((a/=e)==1)return b+d;g||(g=e*0.3);if(h<Math.abs(d)){h=d;c=g/4}else c=
|
||||
g/(2*Math.PI)*Math.asin(d/h);return-(h*Math.pow(2,10*(a-=1))*Math.sin((a*e-c)*2*Math.PI/g))+b},easeOutElastic:function(c,a,b,d,e){c=1.70158;var g=0,h=d;if(a==0)return b;if((a/=e)==1)return b+d;g||(g=e*0.3);if(h<Math.abs(d)){h=d;c=g/4}else c=g/(2*Math.PI)*Math.asin(d/h);return h*Math.pow(2,-10*a)*Math.sin((a*e-c)*2*Math.PI/g)+d+b},easeInOutElastic:function(c,a,b,d,e){c=1.70158;var g=0,h=d;if(a==0)return b;if((a/=e/2)==2)return b+d;g||(g=e*0.3*1.5);if(h<Math.abs(d)){h=d;c=g/4}else c=g/(2*Math.PI)*Math.asin(d/
|
||||
h);if(a<1)return-0.5*h*Math.pow(2,10*(a-=1))*Math.sin((a*e-c)*2*Math.PI/g)+b;return h*Math.pow(2,-10*(a-=1))*Math.sin((a*e-c)*2*Math.PI/g)*0.5+d+b},easeInBack:function(c,a,b,d,e,g){if(g==j)g=1.70158;return d*(a/=e)*a*((g+1)*a-g)+b},easeOutBack:function(c,a,b,d,e,g){if(g==j)g=1.70158;return d*((a=a/e-1)*a*((g+1)*a+g)+1)+b},easeInOutBack:function(c,a,b,d,e,g){if(g==j)g=1.70158;if((a/=e/2)<1)return d/2*a*a*(((g*=1.525)+1)*a-g)+b;return d/2*((a-=2)*a*(((g*=1.525)+1)*a+g)+2)+b},easeInBounce:function(c,
|
||||
a,b,d,e){return d-f.easing.easeOutBounce(c,e-a,0,d,e)+b},easeOutBounce:function(c,a,b,d,e){return(a/=e)<1/2.75?d*7.5625*a*a+b:a<2/2.75?d*(7.5625*(a-=1.5/2.75)*a+0.75)+b:a<2.5/2.75?d*(7.5625*(a-=2.25/2.75)*a+0.9375)+b:d*(7.5625*(a-=2.625/2.75)*a+0.984375)+b},easeInOutBounce:function(c,a,b,d,e){if(a<e/2)return f.easing.easeInBounce(c,a*2,0,d,e)*0.5+b;return f.easing.easeOutBounce(c,a*2-e,0,d,e)*0.5+d*0.5+b}})}(jQuery);
|
||||
211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]},q=["add","remove","toggle"],t={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};f.effects.animateClass=function(c,a,b,
|
||||
d){if(f.isFunction(b)){d=b;b=null}return this.queue(function(){var e=f(this),g=e.attr("style")||" ",h=p(o.call(this)),r,v=e.attr("class");f.each(q,function(w,i){c[i]&&e[i+"Class"](c[i])});r=p(o.call(this));e.attr("class",v);e.animate(u(h,r),{queue:false,duration:a,easing:b,complete:function(){f.each(q,function(w,i){c[i]&&e[i+"Class"](c[i])});if(typeof e.attr("style")=="object"){e.attr("style").cssText="";e.attr("style").cssText=g}else e.attr("style",g);d&&d.apply(this,arguments);f.dequeue(this)}})})};
|
||||
f.fn.extend({_addClass:f.fn.addClass,addClass:function(c,a,b,d){return a?f.effects.animateClass.apply(this,[{add:c},a,b,d]):this._addClass(c)},_removeClass:f.fn.removeClass,removeClass:function(c,a,b,d){return a?f.effects.animateClass.apply(this,[{remove:c},a,b,d]):this._removeClass(c)},_toggleClass:f.fn.toggleClass,toggleClass:function(c,a,b,d,e){return typeof a=="boolean"||a===j?b?f.effects.animateClass.apply(this,[a?{add:c}:{remove:c},b,d,e]):this._toggleClass(c,a):f.effects.animateClass.apply(this,
|
||||
[{toggle:c},a,b,d])},switchClass:function(c,a,b,d,e){return f.effects.animateClass.apply(this,[{add:a,remove:c},b,d,e])}});f.extend(f.effects,{version:"1.8.16",save:function(c,a){for(var b=0;b<a.length;b++)a[b]!==null&&c.data("ec.storage."+a[b],c[0].style[a[b]])},restore:function(c,a){for(var b=0;b<a.length;b++)a[b]!==null&&c.css(a[b],c.data("ec.storage."+a[b]))},setMode:function(c,a){if(a=="toggle")a=c.is(":hidden")?"show":"hide";return a},getBaseline:function(c,a){var b;switch(c[0]){case "top":b=
|
||||
0;break;case "middle":b=0.5;break;case "bottom":b=1;break;default:b=c[0]/a.height}switch(c[1]){case "left":c=0;break;case "center":c=0.5;break;case "right":c=1;break;default:c=c[1]/a.width}return{x:c,y:b}},createWrapper:function(c){if(c.parent().is(".ui-effects-wrapper"))return c.parent();var a={width:c.outerWidth(true),height:c.outerHeight(true),"float":c.css("float")},b=f("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),
|
||||
d=document.activeElement;c.wrap(b);if(c[0]===d||f.contains(c[0],d))f(d).focus();b=c.parent();if(c.css("position")=="static"){b.css({position:"relative"});c.css({position:"relative"})}else{f.extend(a,{position:c.css("position"),zIndex:c.css("z-index")});f.each(["top","left","bottom","right"],function(e,g){a[g]=c.css(g);if(isNaN(parseInt(a[g],10)))a[g]="auto"});c.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})}return b.css(a).show()},removeWrapper:function(c){var a,b=document.activeElement;
|
||||
if(c.parent().is(".ui-effects-wrapper")){a=c.parent().replaceWith(c);if(c[0]===b||f.contains(c[0],b))f(b).focus();return a}return c},setTransition:function(c,a,b,d){d=d||{};f.each(a,function(e,g){unit=c.cssUnit(g);if(unit[0]>0)d[g]=unit[0]*b+unit[1]});return d}});f.fn.extend({effect:function(c){var a=k.apply(this,arguments),b={options:a[1],duration:a[2],callback:a[3]};a=b.options.mode;var d=f.effects[c];if(f.fx.off||!d)return a?this[a](b.duration,b.callback):this.each(function(){b.callback&&b.callback.call(this)});
|
||||
return d.call(this,b)},_show:f.fn.show,show:function(c){if(l(c))return this._show.apply(this,arguments);else{var a=k.apply(this,arguments);a[1].mode="show";return this.effect.apply(this,a)}},_hide:f.fn.hide,hide:function(c){if(l(c))return this._hide.apply(this,arguments);else{var a=k.apply(this,arguments);a[1].mode="hide";return this.effect.apply(this,a)}},__toggle:f.fn.toggle,toggle:function(c){if(l(c)||typeof c==="boolean"||f.isFunction(c))return this.__toggle.apply(this,arguments);else{var a=k.apply(this,
|
||||
arguments);a[1].mode="toggle";return this.effect.apply(this,a)}},cssUnit:function(c){var a=this.css(c),b=[];f.each(["em","px","%","pt"],function(d,e){if(a.indexOf(e)>0)b=[parseFloat(a),e]});return b}});f.easing.jswing=f.easing.swing;f.extend(f.easing,{def:"easeOutQuad",swing:function(c,a,b,d,e){return f.easing[f.easing.def](c,a,b,d,e)},easeInQuad:function(c,a,b,d,e){return d*(a/=e)*a+b},easeOutQuad:function(c,a,b,d,e){return-d*(a/=e)*(a-2)+b},easeInOutQuad:function(c,a,b,d,e){if((a/=e/2)<1)return d/
|
||||
2*a*a+b;return-d/2*(--a*(a-2)-1)+b},easeInCubic:function(c,a,b,d,e){return d*(a/=e)*a*a+b},easeOutCubic:function(c,a,b,d,e){return d*((a=a/e-1)*a*a+1)+b},easeInOutCubic:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a+b;return d/2*((a-=2)*a*a+2)+b},easeInQuart:function(c,a,b,d,e){return d*(a/=e)*a*a*a+b},easeOutQuart:function(c,a,b,d,e){return-d*((a=a/e-1)*a*a*a-1)+b},easeInOutQuart:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a*a+b;return-d/2*((a-=2)*a*a*a-2)+b},easeInQuint:function(c,a,b,
|
||||
d,e){return d*(a/=e)*a*a*a*a+b},easeOutQuint:function(c,a,b,d,e){return d*((a=a/e-1)*a*a*a*a+1)+b},easeInOutQuint:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a*a*a+b;return d/2*((a-=2)*a*a*a*a+2)+b},easeInSine:function(c,a,b,d,e){return-d*Math.cos(a/e*(Math.PI/2))+d+b},easeOutSine:function(c,a,b,d,e){return d*Math.sin(a/e*(Math.PI/2))+b},easeInOutSine:function(c,a,b,d,e){return-d/2*(Math.cos(Math.PI*a/e)-1)+b},easeInExpo:function(c,a,b,d,e){return a==0?b:d*Math.pow(2,10*(a/e-1))+b},easeOutExpo:function(c,
|
||||
a,b,d,e){return a==e?b+d:d*(-Math.pow(2,-10*a/e)+1)+b},easeInOutExpo:function(c,a,b,d,e){if(a==0)return b;if(a==e)return b+d;if((a/=e/2)<1)return d/2*Math.pow(2,10*(a-1))+b;return d/2*(-Math.pow(2,-10*--a)+2)+b},easeInCirc:function(c,a,b,d,e){return-d*(Math.sqrt(1-(a/=e)*a)-1)+b},easeOutCirc:function(c,a,b,d,e){return d*Math.sqrt(1-(a=a/e-1)*a)+b},easeInOutCirc:function(c,a,b,d,e){if((a/=e/2)<1)return-d/2*(Math.sqrt(1-a*a)-1)+b;return d/2*(Math.sqrt(1-(a-=2)*a)+1)+b},easeInElastic:function(c,a,b,
|
||||
d,e){c=1.70158;var g=0,h=d;if(a==0)return b;if((a/=e)==1)return b+d;g||(g=e*0.3);if(h<Math.abs(d)){h=d;c=g/4}else c=g/(2*Math.PI)*Math.asin(d/h);return-(h*Math.pow(2,10*(a-=1))*Math.sin((a*e-c)*2*Math.PI/g))+b},easeOutElastic:function(c,a,b,d,e){c=1.70158;var g=0,h=d;if(a==0)return b;if((a/=e)==1)return b+d;g||(g=e*0.3);if(h<Math.abs(d)){h=d;c=g/4}else c=g/(2*Math.PI)*Math.asin(d/h);return h*Math.pow(2,-10*a)*Math.sin((a*e-c)*2*Math.PI/g)+d+b},easeInOutElastic:function(c,a,b,d,e){c=1.70158;var g=
|
||||
0,h=d;if(a==0)return b;if((a/=e/2)==2)return b+d;g||(g=e*0.3*1.5);if(h<Math.abs(d)){h=d;c=g/4}else c=g/(2*Math.PI)*Math.asin(d/h);if(a<1)return-0.5*h*Math.pow(2,10*(a-=1))*Math.sin((a*e-c)*2*Math.PI/g)+b;return h*Math.pow(2,-10*(a-=1))*Math.sin((a*e-c)*2*Math.PI/g)*0.5+d+b},easeInBack:function(c,a,b,d,e,g){if(g==j)g=1.70158;return d*(a/=e)*a*((g+1)*a-g)+b},easeOutBack:function(c,a,b,d,e,g){if(g==j)g=1.70158;return d*((a=a/e-1)*a*((g+1)*a+g)+1)+b},easeInOutBack:function(c,a,b,d,e,g){if(g==j)g=1.70158;
|
||||
if((a/=e/2)<1)return d/2*a*a*(((g*=1.525)+1)*a-g)+b;return d/2*((a-=2)*a*(((g*=1.525)+1)*a+g)+2)+b},easeInBounce:function(c,a,b,d,e){return d-f.easing.easeOutBounce(c,e-a,0,d,e)+b},easeOutBounce:function(c,a,b,d,e){return(a/=e)<1/2.75?d*7.5625*a*a+b:a<2/2.75?d*(7.5625*(a-=1.5/2.75)*a+0.75)+b:a<2.5/2.75?d*(7.5625*(a-=2.25/2.75)*a+0.9375)+b:d*(7.5625*(a-=2.625/2.75)*a+0.984375)+b},easeInOutBounce:function(c,a,b,d,e){if(a<e/2)return f.easing.easeInBounce(c,a*2,0,d,e)*0.5+b;return f.easing.easeOutBounce(c,
|
||||
a*2-e,0,d,e)*0.5+d*0.5+b}})}(jQuery);
|
||||
;/*
|
||||
* jQuery UI Effects Blind 1.8.12
|
||||
* jQuery UI Effects Blind 1.8.16
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
|
|
@ -606,7 +614,7 @@ a,b,d,e){return d-f.easing.easeOutBounce(c,e-a,0,d,e)+b},easeOutBounce:function(
|
|||
(function(b){b.effects.blind=function(c){return this.queue(function(){var a=b(this),g=["position","top","bottom","left","right"],f=b.effects.setMode(a,c.options.mode||"hide"),d=c.options.direction||"vertical";b.effects.save(a,g);a.show();var e=b.effects.createWrapper(a).css({overflow:"hidden"}),h=d=="vertical"?"height":"width";d=d=="vertical"?e.height():e.width();f=="show"&&e.css(h,0);var i={};i[h]=f=="show"?d:0;e.animate(i,c.duration,c.options.easing,function(){f=="hide"&&a.hide();b.effects.restore(a,
|
||||
g);b.effects.removeWrapper(a);c.callback&&c.callback.apply(a[0],arguments);a.dequeue()})})}})(jQuery);
|
||||
;/*
|
||||
* jQuery UI Effects Bounce 1.8.12
|
||||
* jQuery UI Effects Bounce 1.8.16
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
|
|
@ -621,7 +629,7 @@ g);b.effects.removeWrapper(a);c.callback&&c.callback.apply(a[0],arguments);a.deq
|
|||
3);if(h=="show")a.css("opacity",0).css(f,d=="pos"?-c:c);if(h=="hide")c/=m*2;h!="hide"&&m--;if(h=="show"){var g={opacity:1};g[f]=(d=="pos"?"+=":"-=")+c;a.animate(g,i/2,b.options.easing);c/=2;m--}for(g=0;g<m;g++){var j={},k={};j[f]=(d=="pos"?"-=":"+=")+c;k[f]=(d=="pos"?"+=":"-=")+c;a.animate(j,i/2,b.options.easing).animate(k,i/2,b.options.easing);c=h=="hide"?c*2:c/2}if(h=="hide"){g={opacity:0};g[f]=(d=="pos"?"-=":"+=")+c;a.animate(g,i/2,b.options.easing,function(){a.hide();e.effects.restore(a,l);e.effects.removeWrapper(a);
|
||||
b.callback&&b.callback.apply(this,arguments)})}else{j={};k={};j[f]=(d=="pos"?"-=":"+=")+c;k[f]=(d=="pos"?"+=":"-=")+c;a.animate(j,i/2,b.options.easing).animate(k,i/2,b.options.easing,function(){e.effects.restore(a,l);e.effects.removeWrapper(a);b.callback&&b.callback.apply(this,arguments)})}a.queue("fx",function(){a.dequeue()});a.dequeue()})}})(jQuery);
|
||||
;/*
|
||||
* jQuery UI Effects Clip 1.8.12
|
||||
* jQuery UI Effects Clip 1.8.16
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
|
|
@ -635,7 +643,7 @@ b.callback&&b.callback.apply(this,arguments)})}else{j={};k={};j[f]=(d=="pos"?"-=
|
|||
(function(b){b.effects.clip=function(e){return this.queue(function(){var a=b(this),i=["position","top","bottom","left","right","height","width"],f=b.effects.setMode(a,e.options.mode||"hide"),c=e.options.direction||"vertical";b.effects.save(a,i);a.show();var d=b.effects.createWrapper(a).css({overflow:"hidden"});d=a[0].tagName=="IMG"?d:a;var g={size:c=="vertical"?"height":"width",position:c=="vertical"?"top":"left"};c=c=="vertical"?d.height():d.width();if(f=="show"){d.css(g.size,0);d.css(g.position,
|
||||
c/2)}var h={};h[g.size]=f=="show"?c:0;h[g.position]=f=="show"?0:c/2;d.animate(h,{queue:false,duration:e.duration,easing:e.options.easing,complete:function(){f=="hide"&&a.hide();b.effects.restore(a,i);b.effects.removeWrapper(a);e.callback&&e.callback.apply(a[0],arguments);a.dequeue()}})})}})(jQuery);
|
||||
;/*
|
||||
* jQuery UI Effects Drop 1.8.12
|
||||
* jQuery UI Effects Drop 1.8.16
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
|
|
@ -649,7 +657,7 @@ c/2)}var h={};h[g.size]=f=="show"?c:0;h[g.position]=f=="show"?0:c/2;d.animate(h,
|
|||
(function(c){c.effects.drop=function(d){return this.queue(function(){var a=c(this),h=["position","top","bottom","left","right","opacity"],e=c.effects.setMode(a,d.options.mode||"hide"),b=d.options.direction||"left";c.effects.save(a,h);a.show();c.effects.createWrapper(a);var f=b=="up"||b=="down"?"top":"left";b=b=="up"||b=="left"?"pos":"neg";var g=d.options.distance||(f=="top"?a.outerHeight({margin:true})/2:a.outerWidth({margin:true})/2);if(e=="show")a.css("opacity",0).css(f,b=="pos"?-g:g);var i={opacity:e==
|
||||
"show"?1:0};i[f]=(e=="show"?b=="pos"?"+=":"-=":b=="pos"?"-=":"+=")+g;a.animate(i,{queue:false,duration:d.duration,easing:d.options.easing,complete:function(){e=="hide"&&a.hide();c.effects.restore(a,h);c.effects.removeWrapper(a);d.callback&&d.callback.apply(this,arguments);a.dequeue()}})})}})(jQuery);
|
||||
;/*
|
||||
* jQuery UI Effects Explode 1.8.12
|
||||
* jQuery UI Effects Explode 1.8.16
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
|
|
@ -664,7 +672,7 @@ c/2)}var h={};h[g.size]=f=="show"?c:0;h[g.position]=f=="show"?0:c/2;d.animate(h,
|
|||
0;f<d;f++)b.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-f*(h/d),top:-e*(i/c)}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:h/d,height:i/c,left:g.left+f*(h/d)+(a.options.mode=="show"?(f-Math.floor(d/2))*(h/d):0),top:g.top+e*(i/c)+(a.options.mode=="show"?(e-Math.floor(c/2))*(i/c):0),opacity:a.options.mode=="show"?0:1}).animate({left:g.left+f*(h/d)+(a.options.mode=="show"?0:(f-Math.floor(d/2))*(h/d)),top:g.top+
|
||||
e*(i/c)+(a.options.mode=="show"?0:(e-Math.floor(c/2))*(i/c)),opacity:a.options.mode=="show"?1:0},a.duration||500);setTimeout(function(){a.options.mode=="show"?b.css({visibility:"visible"}):b.css({visibility:"visible"}).hide();a.callback&&a.callback.apply(b[0]);b.dequeue();j("div.ui-effects-explode").remove()},a.duration||500)})}})(jQuery);
|
||||
;/*
|
||||
* jQuery UI Effects Fade 1.8.12
|
||||
* jQuery UI Effects Fade 1.8.16
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
|
|
@ -677,7 +685,7 @@ e*(i/c)+(a.options.mode=="show"?0:(e-Math.floor(c/2))*(i/c)),opacity:a.options.m
|
|||
*/
|
||||
(function(b){b.effects.fade=function(a){return this.queue(function(){var c=b(this),d=b.effects.setMode(c,a.options.mode||"hide");c.animate({opacity:d},{queue:false,duration:a.duration,easing:a.options.easing,complete:function(){a.callback&&a.callback.apply(this,arguments);c.dequeue()}})})}})(jQuery);
|
||||
;/*
|
||||
* jQuery UI Effects Fold 1.8.12
|
||||
* jQuery UI Effects Fold 1.8.16
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
|
|
@ -691,7 +699,7 @@ e*(i/c)+(a.options.mode=="show"?0:(e-Math.floor(c/2))*(i/c)),opacity:a.options.m
|
|||
(function(c){c.effects.fold=function(a){return this.queue(function(){var b=c(this),j=["position","top","bottom","left","right"],d=c.effects.setMode(b,a.options.mode||"hide"),g=a.options.size||15,h=!!a.options.horizFirst,k=a.duration?a.duration/2:c.fx.speeds._default/2;c.effects.save(b,j);b.show();var e=c.effects.createWrapper(b).css({overflow:"hidden"}),f=d=="show"!=h,l=f?["width","height"]:["height","width"];f=f?[e.width(),e.height()]:[e.height(),e.width()];var i=/([0-9]+)%/.exec(g);if(i)g=parseInt(i[1],
|
||||
10)/100*f[d=="hide"?0:1];if(d=="show")e.css(h?{height:0,width:g}:{height:g,width:0});h={};i={};h[l[0]]=d=="show"?f[0]:g;i[l[1]]=d=="show"?f[1]:0;e.animate(h,k,a.options.easing).animate(i,k,a.options.easing,function(){d=="hide"&&b.hide();c.effects.restore(b,j);c.effects.removeWrapper(b);a.callback&&a.callback.apply(b[0],arguments);b.dequeue()})})}})(jQuery);
|
||||
;/*
|
||||
* jQuery UI Effects Highlight 1.8.12
|
||||
* jQuery UI Effects Highlight 1.8.16
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
|
|
@ -705,7 +713,7 @@ e*(i/c)+(a.options.mode=="show"?0:(e-Math.floor(c/2))*(i/c)),opacity:a.options.m
|
|||
(function(b){b.effects.highlight=function(c){return this.queue(function(){var a=b(this),e=["backgroundImage","backgroundColor","opacity"],d=b.effects.setMode(a,c.options.mode||"show"),f={backgroundColor:a.css("backgroundColor")};if(d=="hide")f.opacity=0;b.effects.save(a,e);a.show().css({backgroundImage:"none",backgroundColor:c.options.color||"#ffff99"}).animate(f,{queue:false,duration:c.duration,easing:c.options.easing,complete:function(){d=="hide"&&a.hide();b.effects.restore(a,e);d=="show"&&!b.support.opacity&&
|
||||
this.style.removeAttribute("filter");c.callback&&c.callback.apply(this,arguments);a.dequeue()}})})}})(jQuery);
|
||||
;/*
|
||||
* jQuery UI Effects Pulsate 1.8.12
|
||||
* jQuery UI Effects Pulsate 1.8.16
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
|
|
@ -719,7 +727,7 @@ this.style.removeAttribute("filter");c.callback&&c.callback.apply(this,arguments
|
|||
(function(d){d.effects.pulsate=function(a){return this.queue(function(){var b=d(this),c=d.effects.setMode(b,a.options.mode||"show");times=(a.options.times||5)*2-1;duration=a.duration?a.duration/2:d.fx.speeds._default/2;isVisible=b.is(":visible");animateTo=0;if(!isVisible){b.css("opacity",0).show();animateTo=1}if(c=="hide"&&isVisible||c=="show"&&!isVisible)times--;for(c=0;c<times;c++){b.animate({opacity:animateTo},duration,a.options.easing);animateTo=(animateTo+1)%2}b.animate({opacity:animateTo},duration,
|
||||
a.options.easing,function(){animateTo==0&&b.hide();a.callback&&a.callback.apply(this,arguments)});b.queue("fx",function(){b.dequeue()}).dequeue()})}})(jQuery);
|
||||
;/*
|
||||
* jQuery UI Effects Scale 1.8.12
|
||||
* jQuery UI Effects Scale 1.8.16
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
|
|
@ -739,7 +747,7 @@ a.css("overflow","hidden").css(a.from);if(m=="content"||m=="both"){f=f.concat(["
|
|||
child.to=c.effects.setTransition(child,f,d.to.y,child.to)}if(d.from.x!=d.to.x){child.from=c.effects.setTransition(child,k,d.from.x,child.from);child.to=c.effects.setTransition(child,k,d.to.x,child.to)}child.css(child.from);child.animate(child.to,b.duration,b.options.easing,function(){n&&c.effects.restore(child,h)})})}a.animate(a.to,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){a.to.opacity===0&&a.css("opacity",a.from.opacity);p=="hide"&&a.hide();c.effects.restore(a,
|
||||
n?e:g);c.effects.removeWrapper(a);b.callback&&b.callback.apply(this,arguments);a.dequeue()}})})}})(jQuery);
|
||||
;/*
|
||||
* jQuery UI Effects Shake 1.8.12
|
||||
* jQuery UI Effects Shake 1.8.16
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
|
|
@ -753,7 +761,7 @@ n?e:g);c.effects.removeWrapper(a);b.callback&&b.callback.apply(this,arguments);a
|
|||
(function(d){d.effects.shake=function(a){return this.queue(function(){var b=d(this),j=["position","top","bottom","left","right"];d.effects.setMode(b,a.options.mode||"effect");var c=a.options.direction||"left",e=a.options.distance||20,l=a.options.times||3,f=a.duration||a.options.duration||140;d.effects.save(b,j);b.show();d.effects.createWrapper(b);var g=c=="up"||c=="down"?"top":"left",h=c=="up"||c=="left"?"pos":"neg";c={};var i={},k={};c[g]=(h=="pos"?"-=":"+=")+e;i[g]=(h=="pos"?"+=":"-=")+e*2;k[g]=
|
||||
(h=="pos"?"-=":"+=")+e*2;b.animate(c,f,a.options.easing);for(e=1;e<l;e++)b.animate(i,f,a.options.easing).animate(k,f,a.options.easing);b.animate(i,f,a.options.easing).animate(c,f/2,a.options.easing,function(){d.effects.restore(b,j);d.effects.removeWrapper(b);a.callback&&a.callback.apply(this,arguments)});b.queue("fx",function(){b.dequeue()});b.dequeue()})}})(jQuery);
|
||||
;/*
|
||||
* jQuery UI Effects Slide 1.8.12
|
||||
* jQuery UI Effects Slide 1.8.16
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
|
|
@ -767,7 +775,7 @@ n?e:g);c.effects.removeWrapper(a);b.callback&&b.callback.apply(this,arguments);a
|
|||
(function(c){c.effects.slide=function(d){return this.queue(function(){var a=c(this),h=["position","top","bottom","left","right"],f=c.effects.setMode(a,d.options.mode||"show"),b=d.options.direction||"left";c.effects.save(a,h);a.show();c.effects.createWrapper(a).css({overflow:"hidden"});var g=b=="up"||b=="down"?"top":"left";b=b=="up"||b=="left"?"pos":"neg";var e=d.options.distance||(g=="top"?a.outerHeight({margin:true}):a.outerWidth({margin:true}));if(f=="show")a.css(g,b=="pos"?isNaN(e)?"-"+e:-e:e);
|
||||
var i={};i[g]=(f=="show"?b=="pos"?"+=":"-=":b=="pos"?"-=":"+=")+e;a.animate(i,{queue:false,duration:d.duration,easing:d.options.easing,complete:function(){f=="hide"&&a.hide();c.effects.restore(a,h);c.effects.removeWrapper(a);d.callback&&d.callback.apply(this,arguments);a.dequeue()}})})}})(jQuery);
|
||||
;/*
|
||||
* jQuery UI Effects Transfer 1.8.12
|
||||
* jQuery UI Effects Transfer 1.8.16
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
/* Korean initialisation for the jQuery calendar extension. */
|
||||
/* Written by DaeKwon Kang (ncrash.dk@gmail.com). */
|
||||
jQuery(function($){
|
||||
$.datepicker.regional['ko'] = {
|
||||
jQuery.datepicker.regional['ko'] = {
|
||||
closeText: '닫기',
|
||||
prevText: '이전달',
|
||||
nextText: '다음달',
|
||||
|
|
@ -19,4 +18,3 @@ jQuery(function($){
|
|||
isRTL: false,
|
||||
showMonthAfterYear: false,
|
||||
yearSuffix: '년'};
|
||||
});
|
||||
|
|
|
|||
|
|
@ -816,7 +816,9 @@ function doDocumentPreview(obj) {
|
|||
).appendTo(document.body);
|
||||
|
||||
dummy_obj = jQuery("#previewDocument")[0];
|
||||
}
|
||||
} else {
|
||||
dummy_obj = dummy_obj[0];
|
||||
}
|
||||
|
||||
if(dummy_obj) {
|
||||
dummy_obj.content.value = content;
|
||||
|
|
@ -1258,6 +1260,13 @@ jQuery(function($){
|
|||
// cancel default action
|
||||
return false;
|
||||
});
|
||||
|
||||
// date picker default settings
|
||||
if($.datepicker) {
|
||||
$.datepicker.setDefaults({
|
||||
dateFormat : 'yy-mm-dd'
|
||||
});
|
||||
}
|
||||
});
|
||||
/**
|
||||
* @file common/js/xml_handler.js
|
||||
|
|
@ -1526,7 +1535,8 @@ $.exec_xml = window.exec_xml = function(module, act, params, callback_func, resp
|
|||
return $.exec_xml.onerror(module, act, ret, callback_func, response_tags, callback_func_arg, fo_obj);
|
||||
}
|
||||
|
||||
alert(ret['message'] || 'error!');
|
||||
alert( (ret['message']||'An unknown error occured while loading ['+module+'.'+act+']').replace(/\\n/g, '\n') );
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
|||
120
common/js/xe.min.js
vendored
120
common/js/xe.min.js
vendored
|
|
@ -3,72 +3,72 @@
|
|||
* @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 true;if(!/^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(a.inArray(g,this._plugins)>=0)return false;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 true},registerHandler:function(g,c){var b=this._messages,g=g.toUpperCase();a.isArray(b[g])||(b[g]=[]);b[g].push(c)},cast:function(a,c){return this._cast(this,
|
||||
a,c||[])},broadcast:function(a,c,b){this.parent&&this.parent._broadcast&&this.parent._broadcast(a,c,b)},_cast:function(g,c,b){var d,e=this._messages,c=c.toUpperCase();if(!e["BEFORE_"+c]&&!this["API_BEFORE_"+c]||this._cast(g,"BEFORE_"+c,b)){var h=[];if(a.isArray(e[c]))for(d=0;d<e[c].length;d++)h.push(e[c][d](g,b));h.length<2&&(h=h[0]);(e["AFTER_"+c]||this["API_AFTER_"+c])&&this._cast(g,"AFTER_"+c,b);return/^(?:AFTER|BEFORE)_/.test(c)?a.isArray(h)?a.inArray(false,h)<0:typeof h=="undefined"?true:!!h:
|
||||
h}}};c={oApp:null,cast:function(a,c){if(this.oApp&&this.oApp._cast)return this.oApp._cast(this,a,c||[])},broadcast:function(a,c){this.oApp&&this.oApp.broadcast&&this.oApp.broadcast(this,mag,c||[])}};window.xe=a.extend(d,{getName:function(){return"Core"},createApp:function(c,e){var l=b();a.extend(l.prototype,d,e);l.prototype.getName=function(){return c};return l},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 typeof e[a]!="undefined"?e[a]:null},registerApp:function(c){var b=c.getName().toLowerCase();e.push(c);a.isArray(e[b])||(e[b]=[]);e[b].push(c);c.parent=this;a.isFunction(c.activate)&&c.activate()},unregisterApp:function(c){var b=c.getName().toLowerCase(),d=a.inArray(c,e);d>=0&&(e=e.splice(d,1));a.isArray(e[b])&&(d=a.inArray(c,e[b]),d>=0&&(e[b]=e[b].splice(d,1)));a.isFunction(c.deactivate)&&c.deactivate()},broadcast:function(a,c){this._broadcast(this,
|
||||
a,c)},_broadcast:function(a,c,b){for(var d=0;d<e.length;d++)e[d]._cast(a,c,b);this._cast(a,c,b)}});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:false};switch(arguments.length){case 1:typeof arguments[0]=="string"?b=arguments[0]:(a.extend(c,arguments[0]||{}),b="cart");break;
|
||||
case 2:b=arguments[0],a.extend(c,arguments[1]||{})}if(c.doClick==true)c.checked=null;if(typeof c.wrap=="string")c.wrap="#"+c.wrap;var e=c.wrap?a(c.wrap).find("input[name="+b+"]:checkbox"):a("input[name="+b+"]:checkbox");c.checked=="toggle"?e.each(function(){a(this).attr("checked",a(this).attr("checked")?false:true)}):c.doClick==true?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(typeof g.length=="undefined"||g.length<1)g=Array(g);if(g.length)for(var j=0;j<g.length;j++){var l=g[j].url,m=g[j].str,k=g[j].icon,h=g[j].target,v="",o="";k&&(v=" style=\"background-image:url('"+k+"')\" ");switch(h){case "popup":o=" onclick=\"popopen(this.href,'"+h+"'); return false;\"";break;case "javascript":o=' onclick="'+l+'; return false; "';l="#";break;default:o=' onclick="window.open(this.href); return false;"'}b+="<li "+v+'><a href="'+l+'"'+o+">"+m+"</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);
|
||||
jQuery(function(a){a.browser.msie&&a("select").each(function(a,b){for(var g=false,d=[],l=0;l<b.options.length;l++)b.options[l].disabled?(b.options[l].style.color="#CCCCCC",g=true):d[a]=d[a]>-1?d[a]:l;if(g&&(b.oldonchange=b.onchange,b.onchange=function(){this.options[this.selectedIndex].disabled?this.selectedIndex=d[a]:this.oldonchange&&this.oldonchange()},b.selectedIndex>=0&&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(b==-1)return null;var d={};this.substr(b+1,this.length).replace(/([^=]+)=([^&]*)(&|$)/g,function(a,b,g){d[b]=g});a=d[a];typeof a=="undefined"&&(a="");return a};
|
||||
String.prototype.setQuery=function(a,b){var d=this.indexOf("?"),c=this.replace(/#$/,"");if(d!=-1){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],typeof http_port!="undefined"&&http_port!=80&&(e+=":"+http_port),c=
|
||||
c.replace(d,e);d=false;if(typeof enforce_ssl!="undefined"&&enforce_ssl)d=true;else if(typeof ssl_actions!="undefined"&&typeof ssl_actions.length!="undefined"&&c.getQuery("act")){e=c.getQuery("act");for(i=0;i<ssl_actions.length;i++)if(ssl_actions[i]==e){d=true;break}}if(d&&(d=/http:\/\/([^:\/]+)(:\d+|)/i,e=d.exec(c)))e="https://"+e[1],typeof https_port!="undefined"&&https_port!=443&&(e+=":"+https_port),c=c.replace(d,e);return encodeURI(c)};
|
||||
String.prototype.trim=function(){return this.replace(/(^\s*)|(\s*$)/g,"")};function xSleep(a){a/=1E3;for(var b=new Date,d=new Date;d.getTime()-b.getTime()<a;)d=new Date}function isDef(){for(var a=0;a<arguments.length;++a)if(typeof arguments[a]=="undefined")return false;return true}var winopen_list=[];
|
||||
function winopen(a,b,d){typeof xeVid!="undefined"&&a.indexOf(request_uri)>-1&&!a.getQuery("vid")&&(a=a.setQuery("vid",xeVid));try{b!="_blank"&&winopen_list[b]&&(winopen_list[b].close(),winopen_list[b]=null)}catch(c){}typeof b=="undefined"&&(b="_blank");typeof d=="undefined"&&(d="");a=window.open(a,b,d);a.focus();b!="_blank"&&(winopen_list[b]=a)}
|
||||
function popopen(a,b){typeof b=="undefined"&&(b="_blank");typeof xeVid!="undefined"&&a.indexOf(request_uri)>-1&&!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 false;typeof b=="undefined"&&(b="N");b=b=="N"?false:true;/^\./.test(a)&&(a=request_uri+a);b?winopen(a):location.href=a;return false}
|
||||
(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])?
|
||||
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)},
|
||||
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);
|
||||
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=
|
||||
c.replace(d,e);d=!1;if("undefined"!=typeof enforce_ssl&&enforce_ssl)d=!0;else if("undefined"!=typeof ssl_actions&&"undefined"!=typeof ssl_actions.length&&c.getQuery("act")){e=c.getQuery("act");for(i=0;i<ssl_actions.length;i++)if(ssl_actions[i]==e){d=!0;break}}if(d&&(d=/http:\/\/([^:\/]+)(:\d+|)/i,e=d.exec(c)))e="https://"+e[1],"undefined"!=typeof https_port&&443!=https_port&&(e+=":"+https_port),c=c.replace(d,e);return encodeURI(c)};
|
||||
String.prototype.trim=function(){return this.replace(/(^\s*)|(\s*$)/g,"")};function xSleep(a){for(var a=a/1E3,b=new Date,d=new Date;d.getTime()-b.getTime()<a;)d=new Date}function isDef(){for(var a=0;a<arguments.length;++a)if("undefined"==typeof arguments[a])return!1;return!0}var winopen_list=[];
|
||||
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){a.indexOf("files")==0&&(a=request_uri+a);var c=jQuery.extend({wmode:"transparent",allowScriptAccess:"sameDomain",quality:"high",flashvars:"",autostart:false},c||{}),e=c.autostart&&c.autostart!="false"?"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="'+
|
||||
e+'" width="'+b+'" height="'+d+'" flashvars="&file='+a+"&width="+b+"&height="+d+"&autostart="+e+'" wmode="'+c.wmode+'" />';else if(/\.swf/i.test(a)){g='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="'+(typeof enforce_ssl!="undefined"&&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+='<param name="movie" value="'+a+'" />';for(var j in c)c[j]!="undefined"&&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&&c.autostart!="false"?"1":"0";g='<embed src="'+a+'" autostart="'+e+'" width="'+b+'" height="'+d+'"';c.wmode=="transparent"&&(g+=' windowlessvideo="1"');g+="></embed>"}return g}
|
||||
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="'+
|
||||
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()}
|
||||
function setFixedPopupSize(){var a=jQuery,b=a(window),a=a("body>.popup"),d,c,e,g;g=a.css({overflow:"scroll"}).offset();d=a.width(10).height(1E4).get(0).scrollWidth+g.left*2;c=a.height(10).width(1E4).get(0).scrollHeight+g.top*2;d<600&&(d=600+g.left*2);e=b.width();b=b.height();d!=e&&window.resizeBy(d-e,0);c!=b&&window.resizeBy(0,c-b);a.width(d-g.left*2).css({overflow:"",height:""})}
|
||||
function doCallModuleAction(a,b,d){exec_xml(a,b,{target_srl:d,cur_mid:current_mid,mid:current_mid},completeCallModuleAction)}function completeCallModuleAction(a){a.message!="success"&&alert(a.message);location.reload()}function completeMessage(a){alert(a.message);location.reload()}function doChangeLangType(a){typeof a=="string"?setLangType(a):setLangType(a.options[a.selectedIndex].value);location.href=location.href.setQuery("l","")}
|
||||
function setFixedPopupSize(){var a=jQuery,b=a(window),a=a("body>.popup"),d,c,e,g;g=a.css({overflow:"scroll"}).offset();d=a.width(10).height(1E4).get(0).scrollWidth+2*g.left;c=a.height(10).width(1E4).get(0).scrollHeight+2*g.top;600>d&&(d=600+2*g.left);e=b.width();b=b.height();d!=e&&window.resizeBy(d-e,0);c!=b&&window.resizeBy(0,c-b);a.width(d-2*g.left).css({overflow:"",height:""})}
|
||||
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(;a.nodeName!="FORM";)a=a.parentNode;if(a.nodeName=="FORM"){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||(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=
|
||||
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(typeof b!="undefined"&&b&&typeof editorRelKeys!="undefined"&&typeof editorGetContent=="function"){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 true;if(/\[\]$/.test(b.name))b.name=b.name.replace(/\[\]$/,"");e[b.name]?e[b.name]+="|@|"+c:e[b.name]=b.value});exec_xml("document",
|
||||
"procDocumentTempSave",e,completeDocumentSave,["error","message","document_srl"],e,a.form);editorRelKeys[b].content.value=d;return false}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 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",
|
||||
"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(!(addedDocument.length<1||a!=addedDocument.length))a=[],a.srls=addedDocument.join(","),exec_xml("document","procDocumentAddCart",a,null),addedDocument=[]}
|
||||
function transRGB2Hex(a){if(!a)return a;if(a.indexOf("#")>-1)return a.replace(/^#/,"");if(a.toLowerCase().indexOf("rgb")<0)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);d.length==1&&(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 callAddDocumentCart(a){if(!(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,l,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,l=e&63,isNaN(c)?j=l=64:isNaN(e)&&(l=64),b=b+this._keyStr.charAt(g)+this._keyStr.charAt(d)+this._keyStr.charAt(j)+this._keyStr.charAt(l);return b},decode:function(a){for(var b="",d,c,e,g,j,l=0,a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");l<
|
||||
a.length;)d=this._keyStr.indexOf(a.charAt(l++)),c=this._keyStr.indexOf(a.charAt(l++)),g=this._keyStr.indexOf(a.charAt(l++)),j=this._keyStr.indexOf(a.charAt(l++)),d=d<<2|c>>4,c=(c&15)<<4|g>>2,e=(g&3)<<6|j,b+=String.fromCharCode(d),g!=64&&(b+=String.fromCharCode(c)),j!=64&&(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);c<128?b+=String.fromCharCode(c):(c>127&&c<2048?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),c<128?(b+=String.fromCharCode(c),d++):c>191&&c<224?(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(typeof resizeImageContents=="undefined")var resizeImageContents=function(){};if(typeof activateOptionDisabled=="undefined")var activateOptionDisabled=function(){};objectExtend=jQuery.extend;function toggleDisplay(a){jQuery("#"+a).toggle()}function checkboxSelectAll(a,b,d){var c={};if(typeof a!="undefined")c.wrap=a;if(typeof d!="undefined")c.checked=d;XE.checkboxToggleAll(b,c)}function clickCheckBoxAll(a,b){var d={doClick:true};if(typeof a!="undefined")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){typeof b=="undefined"&&(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;
|
||||
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<
|
||||
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)}
|
||||
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 typeof a!="undefined"}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");typeof d=="undefined"&&(d=b.attr("name"));typeof d!="undefined"&&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));
|
||||
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,
|
||||
e,c);show_waiting_message=false;exec_xml("member",d,c,XE.displayPopupMenu,e,c);show_waiting_message=true}}});a("a._xe_popup").click(function(){var b=a(this),d=b.attr("name"),b=b.attr("href");d||(d="_xe_popup_"+Math.floor(Math.random()*1E3));(d=window.open(b,d,"left=10,top=10,width=10,height=10,resizable=no,scrollbars=no,toolbars=no"))&&d.focus();return false})});var show_waiting_message=true;
|
||||
function xml2json(a,b,d){var c={toObj:function(a){var b={};if(a.nodeType==1){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,k=false,h=a.firstChild;h;h=h.nextSibling)h.nodeType==1?k=true:h.nodeType==3&&h.nodeValue.match(/[^ \f\n\r\t\v]/)?e++:h.nodeType==4&&m++;if(k)if(e<2&&m<2){c.removeWhite(a);for(h=a.firstChild;h;h=h.nextSibling)h.nodeType==3?b=c.escape(h.nodeValue):h.nodeType==
|
||||
4?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(m>1)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 a.nodeType==9?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 k=0,h=a.length;k<h;k++)a[k]=c.toJson(a[k],"",d+"\t");e+=(b?":[":"[")+(a.length>1?"\n"+d+"\t"+a.join(",\n"+d+"\t")+"\n"+d:a.join(""))+"]"}else if(a==null)e+=(b&&":")+"null";else if(typeof a=="object"){k=[];for(h in a)k[k.length]=c.toJson(a[h],h,d+"\t");e+=(b?":{":"{")+(k.length>1?"\n"+d+"\t"+k.join(",\n"+d+"\t")+"\n"+
|
||||
d:k.join(""))+"}"}else e+=typeof a=="string"?(b&&":")+'"'+a.toString()+'"':(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(a.nodeType==1){b+="<"+a.nodeName;for(var 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 a.nodeType==3?b+=a.nodeValue:
|
||||
a.nodeType==4&&(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(b.nodeType==3)if(b.nodeValue.match(/[^ \f\n\r\t\v]/))b=b.nextSibling;else{var d=b.nextSibling;a.removeChild(b);b=d}else b.nodeType==1&&c.removeWhite(b),b=b.nextSibling;return a}};if(a.nodeType==9)a=a.documentElement;
|
||||
var e=c.toObj(c.removeWhite(a));typeof JSON=="object"&&jQuery.isFunction(JSON.stringify);a=c.toJson(e,a.nodeName,"");return"{"+(b?a.replace(/\t/g,b):a.replace(/\t|\n/g,""))+"}"}
|
||||
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(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,l,m,k,h){function v(b){var b=a(b).find("response")[0],d,v="",o=[],j={};d="";s.css("display","none").trigger("cancel_confirm");if(!b)return alert(u.responseText),null;d=xml2json(b,false,false);d=typeof JSON=="object"&&a.isFunction(JSON.parse)?
|
||||
JSON.parse(d):eval("("+d+")");d=d.response;if(typeof d=="undefined"){o.error=-1;o.message="Unexpected error occured.";try{if(typeof(v=b.childNodes[0].firstChild.data)!="undefined")o.message+="\r\n"+v}catch(n){}return o}a.each(m,function(a,b){j[b]=true});j.redirect_url=true;j.act=true;a.each(d,function(a,b){j[a]&&(o[a]=b)});if(o.error!=0){if(a.isFunction(a.exec_xml.onerror))return a.exec_xml.onerror(c,g,o,l,m,k,h);alert(o.message||"error!");return null}if(o.redirect_url)return location.href=o.redirect_url.replace(/&/g,
|
||||
"&"),null;a.isFunction(l)&&l(o,m,k,h)}var o=request_uri+"index.php";j||(j={});a.isArray(j)&&(j=d(j));j.module=c;j.act=g;typeof xeVid!="undefined"&&(j.vid=xeVid);typeof m=="undefined"||m.length<1?m=["error","message"]:m.push("error","message");if(a.isArray(ssl_actions)&&j.act&&a.inArray(j.act,ssl_actions)>=0){var o=window.https_port||443,n=a("<a>").attr("href",default_url||request_uri)[0],w="https://"+n.hostname.replace(/:\d+$/,"");o!=443&&(w+=":"+o);n.pathname[0]!="/"&&(w+="/");w+=n.pathname;o=w.replace(/\/$/,
|
||||
"")+"/index.php"}n=a("<a>").attr("href",location.href)[0];w=a("<a>").attr("href",o)[0];if(n.protocol!=w.protocol||n.port!=w.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&&u.readyState!=0&&u.abort();try{a.ajax({url:o,type:"POST",dataType:"xml",data:x.join("\n"),contentType:"text/plain",beforeSend:function(a){u=
|
||||
a},success:v,error:function(a,b){s.css("display","none");var c="";if(b=="parsererror"){c="The result is not valid XML :\n-------------------------------------\n";if(a.responseText=="")return;c+=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){typeof c=="undefined"&&(c={});b=b.split(".");b.length==2&&(show_waiting_message&&a(".wfsr").html(waiting_message).show(),
|
||||
a.extend(c,{module:b[0],act:b[1]}),typeof xeVid!="undefined"&&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");b.error>0&&alert(b.message);a.isFunction(d)&&d(b)}}))};a.fn.exec_html=function(b,c,d,l,m){typeof c=="undefined"&&(c={});a.inArray(d,["html","append","prepend"])||(d="html");var k=a(this),b=b.split(".");b.length==2&&(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");k[d](b);a.isFunction(l)&&l(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-b*2}var c=[],e=[],g={},j=[],l={},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=
|
||||
"";if(a._filter)b=a._filter.value;a=this.cast("VALIDATE",[a,b]);typeof a=="undefined"&&(a=false);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=true,m=e[0],k=m.elements,p,u,A,s,r,q,B,t,y,z;if(k.ruleset)p=m.elements.ruleset.value;
|
||||
else if(k._filter)p=m.elements._filter.value;if(!p)return true;a.isFunction(j[p])&&(A=j[p]);p=a.extend({},g[p.toLowerCase()]||{},l);s=[];for(q=0,t=m.elements.length;q<t;q++)n=k[q],(r=n.name)&&k[r]&&(!k[r].length||k[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=k[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(k))f[t.attr]=t.value}if(!s)if(f["default"]&&(s=f["default"]),f.required)return this.cast("ALERT",[m,r,"isnull"])&&false;else continue;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",[m,r,"outofrange",n,t])&&false;if(f.equalto&&(t=(q=k[f.equalto])?a.trim(b(a(q))):"",q&&t!==s))return this.cast("ALERT",[m,r,"equalto"])&&false;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]),u.indexOf("not,")>-1&&(n=!n),!n)return this.cast("ALERT",[m,r,"invalid_"+z])&&false}return a.isFunction(A)?A(m):true},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();l[c]=b[1]},API_GET_EXTRA_FIELD:function(a,b){var c=b[0].toLowerCase();return l[c]},API_DEL_EXTRA_FIELD:function(a,b){var c=
|
||||
b[0].toLowerCase();delete l[c]},API_APPLY_RULE:function(b,c){var d=c[0],g=c[1];return typeof e[d]=="undefined"?true:a.isFunction(e[d])?e[d](g):e[d]instanceof RegExp?e[d].test(g):a.isArray(e[d])?a.inArray(g,e[d])>-1:true},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=k.indexOf("%s")<0?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 k=xe.createPlugin("editor_stub",{API_BEFORE_VALIDATE:function(a,b){var c=b[0].getAttribute("editor_sequence");if(c&&typeof c=="object")c=c.value;if(c)try{editorRelKeys[c].content.value=editorRelKeys[c].func(c)||""}catch(d){}}});m.registerPlugin(new k)})(jQuery);
|
||||
function filterAlertMessage(a){var b=a.message,d=a.act,a=a.redirect_url,c=location.href;typeof b!="undefined"&&b&&b!="success"&&alert(b);typeof d!="undefined"&&d?c=current_url.setQuery("act",d):typeof a!="undefined"&&a&&(c=a);c==location.href&&(c=c.replace(/#(.*)$/,""));location.href=c}function procFilter(a,b){b(a);return false}
|
||||
function legacy_filter(a,b,d,c,e,g,j,l){var m=xe.getApp("Validator")[0],k=jQuery,h=[];if(!m)return false;b.elements._filter||k(b).prepend('<input type="hidden" name="_filter" />');b.elements._filter.value=a;h[0]=a;h[1]=function(a){var h={},a=k(a).serializeArray();k.each(a,function(a,b){var c=k.trim(b.value),d=b.name;if(!c||!d)return true;l[d]&&(d=l[d]);/\[\]$/.test(d)&&(d=d.replace(/\[\]$/,""));h[d]?h[d]+="|@|"+c:h[d]=b.value});if(j&&!confirm(j))return false;exec_xml(d,c,h,e,g,h,b)};m.cast("ADD_CALLBACK",
|
||||
h);m.cast("VALIDATE",[b,a]);return false};
|
||||
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(/&/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);
|
||||
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};
|
||||
|
|
|
|||
|
|
@ -265,7 +265,8 @@ $.exec_xml = window.exec_xml = function(module, act, params, callback_func, resp
|
|||
return $.exec_xml.onerror(module, act, ret, callback_func, response_tags, callback_func_arg, fo_obj);
|
||||
}
|
||||
|
||||
alert(ret['message'] || 'error!');
|
||||
alert( (ret['message']||'An unknown error occured while loading ['+module+'.'+act+']').replace(/\\n/g, '\n') );
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1909,6 +1909,10 @@
|
|||
<value xml:lang="vi"><![CDATA[Lượt bình chọn]]></value>
|
||||
<value xml:lang="mn"><![CDATA[vote]]></value>
|
||||
</item>
|
||||
<item name="blamed_count">
|
||||
<value xml:lang="ko"><![CDATA[비추천 수]]></value>
|
||||
<value xml:lang="en"><![CDATA[Blames]]></value>
|
||||
</item>
|
||||
<item name="comment_count">
|
||||
<value xml:lang="ko"><![CDATA[댓글 수]]></value>
|
||||
<value xml:lang="en"><![CDATA[Comments]]></value>
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
* @brief display XE's full version
|
||||
* Even The file should be revised when releasing altough no change is made
|
||||
**/
|
||||
define('__XE_VERSION__', '1.5.1');
|
||||
define('__XE_VERSION__', '1.5.1.2');
|
||||
define('__ZBXE_VERSION__', __XE_VERSION__); // deprecated : __ZBXE_VERSION__ will be removed. Use __XE_VERSION__ instead.
|
||||
|
||||
/**
|
||||
|
|
@ -167,6 +167,7 @@
|
|||
require(_XE_PATH_.'classes/extravar/Extravar.class.php');
|
||||
require(_XE_PATH_.'classes/handler/Handler.class.php');
|
||||
require(_XE_PATH_.'classes/xml/XmlParser.class.php');
|
||||
require(_XE_PATH_.'classes/xml/XmlGenerator.class.php');
|
||||
require(_XE_PATH_.'classes/xml/XmlJsFilter.class.php');
|
||||
require(_XE_PATH_.'classes/xml/XmlLangParser.class.php');
|
||||
require(_XE_PATH_.'classes/cache/CacheHandler.class.php');
|
||||
|
|
|
|||
|
|
@ -356,37 +356,52 @@
|
|||
* @param tail: tail to put in the end of the string after trimming
|
||||
* @return string
|
||||
**/
|
||||
function cut_str($string,$cut_size=0,$tail = '...') {
|
||||
if($cut_size<1 || !$string) return $string;
|
||||
function cut_str($string, $cut_size = 0, $tail = '...')
|
||||
{
|
||||
if($cut_size < 1 || !$string) return $string;
|
||||
|
||||
$chars = Array(12, 4, 3, 5, 7, 7, 11, 8, 4, 5, 5, 6, 6, 4, 6, 4, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 4, 4, 8, 6, 8, 6, 10, 8, 8, 9, 8, 8, 7, 9, 8, 3, 6, 7, 7, 11, 8, 9, 8, 9, 8, 8, 7, 8, 8, 10, 8, 8, 8, 6, 11, 6, 6, 6, 4, 7, 7, 7, 7, 7, 3, 7, 7, 3, 3, 6, 3, 9, 7, 7, 7, 7, 4, 7, 3, 7, 6, 10, 6, 6, 7, 6, 6, 6, 9);
|
||||
$max_width = $cut_size*$chars[0]/2;
|
||||
$char_width = 0;
|
||||
if($GLOBALS['use_mb_strimwidth'] || function_exists('mb_strimwidth'))
|
||||
{
|
||||
$GLOBALS['use_mb_strimwidth'] = TRUE;
|
||||
return mb_strimwidth($string, 0, $cut_size + 4, $tail, 'utf-8');
|
||||
}
|
||||
|
||||
$string_length = strlen($string);
|
||||
$char_count = 0;
|
||||
$chars = array(12, 4, 3, 5, 7, 7, 11, 8, 4, 5, 5, 6, 6, 4, 6, 4, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 4, 4, 8, 6, 8, 6, 10, 8, 8, 9, 8, 8, 7, 9, 8, 3, 6, 7, 7, 11, 8, 9, 8, 9, 8, 8, 7, 8, 8, 10, 8, 8, 8, 6, 11, 6, 6, 6, 4, 7, 7, 7, 7, 7, 3, 7, 7, 3, 3, 6, 3, 9, 7, 7, 7, 7, 4, 7, 3, 7, 6, 10, 6, 6, 7, 6, 6, 6, 9);
|
||||
$max_width = $cut_size*$chars[0]/2;
|
||||
$char_width = 0;
|
||||
|
||||
$idx = 0;
|
||||
while($idx < $string_length && $char_count < $cut_size && $char_width <= $max_width) {
|
||||
$c = ord(substr($string, $idx,1));
|
||||
$char_count++;
|
||||
if($c<128) {
|
||||
$char_width += (int)$chars[$c-32];
|
||||
$idx++;
|
||||
}
|
||||
else if (191<$c && $c < 224) {
|
||||
$char_width += $chars[4];
|
||||
$idx += 2;
|
||||
}
|
||||
else {
|
||||
$char_width += $chars[0];
|
||||
$idx += 3;
|
||||
}
|
||||
}
|
||||
$output = substr($string,0,$idx);
|
||||
if(strlen($output)<$string_length) $output .= $tail;
|
||||
return $output;
|
||||
}
|
||||
$string_length = strlen($string);
|
||||
$char_count = 0;
|
||||
|
||||
$idx = 0;
|
||||
while($idx < $string_length && $char_count < $cut_size && $char_width <= $max_width) {
|
||||
$c = ord(substr($string, $idx,1));
|
||||
$char_count++;
|
||||
if($c < 128)
|
||||
{
|
||||
$char_width += (int)$chars[$c-32];
|
||||
$idx++;
|
||||
}
|
||||
else if(191 < $c && $c < 224)
|
||||
{
|
||||
$char_width += $chars[4];
|
||||
$idx += 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
$char_width += $chars[0];
|
||||
$idx += 3;
|
||||
}
|
||||
}
|
||||
|
||||
$output = substr($string, 0, $idx);
|
||||
if(strlen($output) < $string_length)
|
||||
{
|
||||
$output .= $tail;
|
||||
}
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
function zgap() {
|
||||
$time_zone = $GLOBALS['_time_zone'];
|
||||
|
|
@ -963,18 +978,17 @@ HTMLHEADER;
|
|||
function alertScript($msg)
|
||||
{
|
||||
if(!$msg) return;
|
||||
echo '<script type="text/javascript">alert("'.$msg.'");</script>';
|
||||
echo '<script type="text/javascript">alert("'.$msg.'");</script>';
|
||||
}
|
||||
|
||||
function closePopupScript()
|
||||
{
|
||||
echo '<script type="text/javascript">window.close();</script>';
|
||||
echo '<script type="text/javascript">window.close();</script>';
|
||||
}
|
||||
|
||||
function reload($isOpener = false)
|
||||
{
|
||||
$reloadScript = $isOpener ? 'window.opener.location.reload()' : 'document.location.reload()';
|
||||
|
||||
echo '<script type="text/javascript">'.$reloadScript.'</script>';
|
||||
echo '<script type="text/javascript">'.$reloadScript.'</script>';
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
120
index.php
120
index.php
|
|
@ -1,62 +1,68 @@
|
|||
<?php
|
||||
/**
|
||||
* @file index.php
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief Start page
|
||||
*
|
||||
* Find and create module object by mif, act in Request Argument \n
|
||||
* Set module information
|
||||
*
|
||||
* @mainpage XpressEngine
|
||||
* @section intro introduction
|
||||
* XE is an opensource and being developed in the opensource project. \N
|
||||
* For more information, please see the link below.
|
||||
* - Official website: http://www.xpressengine.com
|
||||
* - SVN Repository : http://svn.xpressengine.net/xe
|
||||
* \n
|
||||
* "XpressEngine (XE)" is free software; you can redistribute it and/or \n
|
||||
* modify it under the terms of the GNU Lesser General Public \n
|
||||
* License as published by the Free Software Foundation; either \n
|
||||
* version 2.1 of the License, or (at your option) any later version. \n
|
||||
* \n
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
* \n
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
**/
|
||||
/**
|
||||
* @file index.php
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief Start page
|
||||
*
|
||||
* Find and create module object by mif, act in Request Argument \n
|
||||
* Set module information
|
||||
*
|
||||
* @mainpage XpressEngine
|
||||
* @section intro introduction
|
||||
* XE is an opensource and being developed in the opensource project. \N
|
||||
* For more information, please see the link below.
|
||||
* - Official website: http://www.xpressengine.com(korean), http://www.xpressengine.org(english)
|
||||
* - SVN Repository: http://xe-core.googlecode.com/svn/
|
||||
* \n
|
||||
* "XpressEngine (XE)" is free software; you can redistribute it and/or \n
|
||||
* modify it under the terms of the GNU Lesser General Public \n
|
||||
* License as published by the Free Software Foundation; either \n
|
||||
* version 2.1 of the License, or (at your option) any later version. \n
|
||||
* \n
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
* \n
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
**/
|
||||
|
||||
/**
|
||||
* @brief Declare constants for generic use and for checking to avoid a direct call from the Web
|
||||
**/
|
||||
define('__XE__', true);
|
||||
define('__ZBXE__', true); // deprecated : __ZBXE__ will be removed. Use __XE__ instead.
|
||||
/**
|
||||
* @brief Declare constants for generic use and for checking to avoid a direct call from the Web
|
||||
**/
|
||||
define('__XE__', TRUE);
|
||||
define('__ZBXE__', TRUE); // deprecated : __ZBXE__ will be removed. Use __XE__ instead.
|
||||
|
||||
/**
|
||||
* @brief Include the necessary configuration files
|
||||
**/
|
||||
require('./config/config.inc.php');
|
||||
/**
|
||||
* @brief Include the necessary configuration files
|
||||
**/
|
||||
require dirname(__FILE__) . '/config/config.inc.php';
|
||||
|
||||
/**
|
||||
* @brief Initialize by creating Context object
|
||||
* Set all Request Argument/Environment variables
|
||||
**/
|
||||
$oContext = &Context::getInstance();
|
||||
$oContext->init();
|
||||
/**
|
||||
* @brief Initialize by creating Context object
|
||||
* Set all Request Argument/Environment variables
|
||||
**/
|
||||
$oContext = &Context::getInstance();
|
||||
$oContext->init();
|
||||
|
||||
/**
|
||||
* @brief If default_url is set and it is different from the current url, attempt to redirect for SSO authentication and then process the module
|
||||
**/
|
||||
if($oContext->checkSSO()) {
|
||||
$oModuleHandler = new ModuleHandler();
|
||||
if($oModuleHandler->init()) {
|
||||
$oModule = &$oModuleHandler->procModule();
|
||||
$oModuleHandler->displayContent($oModule);
|
||||
}
|
||||
}
|
||||
$oContext->close();
|
||||
?>
|
||||
/**
|
||||
* @brief If default_url is set and it is different from the current url, attempt to redirect for SSO authentication and then process the module
|
||||
**/
|
||||
if($oContext->checkSSO())
|
||||
{
|
||||
$oModuleHandler = new ModuleHandler();
|
||||
|
||||
if($oModuleHandler->init())
|
||||
{
|
||||
$oModule = &$oModuleHandler->procModule();
|
||||
$oModuleHandler->displayContent($oModule);
|
||||
}
|
||||
}
|
||||
|
||||
$oContext->close();
|
||||
|
||||
/* End of file index.php */
|
||||
/* Location: ./index.php */
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ body{background:#000}
|
|||
.iSearch .iText:focus{border:1px solid #B0B0AF;background-color:#A9A4A3}
|
||||
.iSearch .submit{vertical-align:middle;_position:relative;_top:-1px}
|
||||
/* Site Layout - Content Body */
|
||||
.body{position:relative;padding-bottom:30px;overflow:hidden;background:url(../images/black/bgContentBody.gif) repeat-y left top;border-bottom:1px solid #515151;zoom:1}
|
||||
.body{position:relative;z-index:1;padding-bottom:30px;overflow:hidden;background:url(../images/black/bgContentBody.gif) repeat-y left top;border-bottom:1px solid #515151;zoom:1}
|
||||
.body:after{content:"";display:block;clear:both}
|
||||
/* Site Layout - Column Left */
|
||||
.lnb{position:relative;width:201px;float:left}
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ body{background:#fff url(../images/default/bgBody.gif) repeat-x left top;font-fa
|
|||
.iSearch .iText:focus{border:1px solid #B0B0AF;background-color:#A9A4A3}
|
||||
.iSearch .submit{vertical-align:middle;_position:relative;_top:-1px}
|
||||
/* Site Layout - Content Body */
|
||||
.body{position:relative;padding-bottom:30px;background:url(../images/default/bgContentBody.gif) repeat-y left top;border-bottom:1px solid #ddd;zoom:1}
|
||||
.body{position:relative;z-index:1;padding-bottom:30px;background:url(../images/default/bgContentBody.gif) repeat-y left top;border-bottom:1px solid #ddd;zoom:1}
|
||||
.body:after{content:"";display:block;clear:both}
|
||||
/* Site Layout - Column Left */
|
||||
.lnb{position:relative;width:201px;float:left}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ body{background:#fff}
|
|||
.iSearch .iText:focus{border:1px solid #8E8E8D;background-color:#fff}
|
||||
.iSearch .submit{vertical-align:middle;_position:relative;_top:-1px}
|
||||
/* Site Layout - Content Body */
|
||||
.body{position:relative;padding-bottom:30px;overflow:hidden;background:url(../images/white/bgContentBody.gif) repeat-y left top;border-bottom:1px solid #ddd;zoom:1}
|
||||
.body{position:relative;z-index:1;padding-bottom:30px;overflow:hidden;background:url(../images/white/bgContentBody.gif) repeat-y left top;border-bottom:1px solid #ddd;zoom:1}
|
||||
.body:after{content:"";display:block;clear:both}
|
||||
/* Site Layout - Column Left */
|
||||
.lnb{position:relative;width:201px;float:left}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<load target="css/white.css" cond="$layout_info->colorset=='white'" />
|
||||
<load target="css/black.css" cond="$layout_info->colorset=='black'" />
|
||||
<style type="text/css" cond="$layout_info->background_image">
|
||||
body{background:url({getUrl()}{$layout_info->background_image}) repeat-x left top;}
|
||||
body{background:url({$layout_info->background_image}) repeat-x left top;}
|
||||
</style>
|
||||
<!--@if(!$layout_info->colorset)-->{@$layout_info->colorset = "default"}<!--@end-->
|
||||
<div class="xe">
|
||||
|
|
|
|||
|
|
@ -61,6 +61,10 @@
|
|||
|
||||
if($ftp_info->sftp == 'Y')
|
||||
{
|
||||
if(!function_exists(ssh2_sftp))
|
||||
{
|
||||
return new Object(-1,'disable_sftp_support');
|
||||
}
|
||||
return $this->getSFTPList();
|
||||
}
|
||||
|
||||
|
|
@ -232,7 +236,7 @@
|
|||
$args->site_srl = (int)$site_module_info->site_srl;
|
||||
$args->layout_srl = getNextSequence();
|
||||
$args->layout = $layout_info->name;
|
||||
$args->title = $layout_info->name.'InTheme';
|
||||
$args->title = $layout_info->name;
|
||||
$args->layout_type = "P";
|
||||
// Insert into the DB
|
||||
$oLayoutAdminController = &getAdminController('layout');
|
||||
|
|
|
|||
|
|
@ -324,7 +324,8 @@
|
|||
Context::set('isUpdated', $isUpdated);
|
||||
|
||||
// gathering enviroment check
|
||||
$path = FileHandler::getRealPath('./files/env/'.__ZBXE_VERSION__);
|
||||
$mainVersion = join('.', array_slice(explode('.', __ZBXE_VERSION__), 0, 2));
|
||||
$path = FileHandler::getRealPath('./files/env/'.$mainVersion);
|
||||
$isEnviromentGatheringAgreement = false;
|
||||
if(file_exists($path)) $isEnviromentGatheringAgreement = true;
|
||||
Context::set('isEnviromentGatheringAgreement', $isEnviromentGatheringAgreement);
|
||||
|
|
@ -342,8 +343,6 @@
|
|||
|
||||
$db_info = Context::getDBInfo();
|
||||
|
||||
Context::set('sftp_support', function_exists(ssh2_sftp));
|
||||
|
||||
Context::set('selected_lang', $db_info->lang_type);
|
||||
|
||||
Context::set('default_url', $db_info->default_url);
|
||||
|
|
@ -391,6 +390,7 @@
|
|||
|
||||
$ftp_info = Context::getFTPInfo();
|
||||
Context::set('ftp_info', $ftp_info);
|
||||
Context::set('sftp_support', function_exists(ssh2_sftp));
|
||||
|
||||
$this->setTemplateFile('config_ftp');
|
||||
|
||||
|
|
@ -424,6 +424,7 @@
|
|||
$server = 'http://collect.xpressengine.com/env/img.php?';
|
||||
$path = './files/env/';
|
||||
$install_env = $path . 'install';
|
||||
$mainVersion = join('.', array_slice(explode('.', __ZBXE_VERSION__), 0, 2));
|
||||
|
||||
if(file_exists(FileHandler::getRealPath($install_env))) {
|
||||
$oAdminAdminModel = &getAdminModel('admin');
|
||||
|
|
@ -432,10 +433,10 @@
|
|||
Context::addHtmlFooter($img);
|
||||
|
||||
FileHandler::removeDir($path);
|
||||
FileHandler::writeFile($path.__ZBXE_VERSION__,'1');
|
||||
FileHandler::writeFile($path.$mainVersion,'1');
|
||||
|
||||
}
|
||||
else if(isset($_SESSION['enviroment_gather']) && !file_exists(FileHandler::getRealPath($path.__ZBXE_VERSION__)))
|
||||
else if(isset($_SESSION['enviroment_gather']) && !file_exists(FileHandler::getRealPath($path.$mainVersion)))
|
||||
{
|
||||
if($_SESSION['enviroment_gather']=='Y')
|
||||
{
|
||||
|
|
@ -446,7 +447,7 @@
|
|||
}
|
||||
|
||||
FileHandler::removeDir($path);
|
||||
FileHandler::writeFile($path.__ZBXE_VERSION__,'1');
|
||||
FileHandler::writeFile($path.$mainVersion,'1');
|
||||
unset($_SESSION['enviroment_gather']);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -735,6 +735,10 @@ Lütfen son sürümü için indirme linkine tıklayınız.]]></value>
|
|||
<value xml:lang="ko"><![CDATA[SFTP 를 사용하시겠습니까?]]></value>
|
||||
<value xml:lang="en"><![CDATA[Use SFTP?]]></value>
|
||||
</item>
|
||||
<item name="disable_sftp_support">
|
||||
<value xml:lang="ko"><![CDATA[SFTP를 사용할 수 있는 환경이 아닙니다.]]></value>
|
||||
<value xml:lang="en"><![CDATA[Does Not Use SFTP]]></value>
|
||||
</item>
|
||||
<item name="msg_self_restart_cache_engine">
|
||||
<value xml:lang="ko"><![CDATA[Memcached 또는 캐쉬데몬을 재시작 해주세요.]]></value>
|
||||
<value xml:lang="en"><![CDATA[Please restart Memcached or cache daemon.]]></value>
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
</div>
|
||||
<div class="footer">
|
||||
<p class="power">Powered by <strong><a href="{_XE_LOCATION_SITE_}">XE</a></strong> (ver. {__ZBXE_VERSION__}).</p>
|
||||
<p class="power">Powered by <strong><a href="{_XE_LOCATION_SITE_}" target="_blank">XE</a></strong> (ver. {__XE_VERSION__}).</p>
|
||||
<p class="cache">
|
||||
<button type="button" class="text" onclick="doResetAdminMenu();">{$lang->cmd_admin_menu_reset}</button>
|
||||
<button type="button" class="text" onclick="doRecompileCacheFile();">{$lang->cmd_remake_cache}</button>
|
||||
<button type="button" class="text" onclick="doClearSession();">{$lang->cmd_clear_session}</button>
|
||||
<a href="http://code.google.com/p/xe-core/issues/entry">{$lang->bug_report}</a>
|
||||
<a href="http://code.google.com/p/xe-core/issues/entry" target="_blank">{$lang->bug_report}</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -37,9 +37,9 @@
|
|||
</p>
|
||||
</li>
|
||||
<li>
|
||||
<p class="q"><label for="sftp">{$lang->about_use_sftp_support}</label></p>
|
||||
<p class="q"><label for="sftp">{$lang->about_use_sftp_support}</label><span cond="!$sftp_support"><label for="sftp"> ({$lang->disable_sftp_support})</label></span></p>
|
||||
<p class="a">
|
||||
<input type="radio" name="sftp" id="sftp_y" value="Y" <!--@if($ftp_info->sftp == 'Y')-->checked="checked" <!--@end-->/> <label for="sftp_y">{$lang->cmd_yes}</label>
|
||||
<input type="radio" name="sftp" id="sftp_y" value="Y" <!--@if($ftp_info->sftp == 'Y')-->checked="checked" <!--@end--> <!--@if(!$sftp_support)-->disabled<!--@end-->/> <label for="sftp_y">{$lang->cmd_yes}</label>
|
||||
<input type="radio" name="sftp" id="sftp_n" value="N" <!--@if($ftp_info->sftp != 'Y')-->checked="checked" <!--@end-->/> <label for="sftp_n">{$lang->cmd_no}</label>
|
||||
</p>
|
||||
</li>
|
||||
|
|
|
|||
2
modules/admin/tpl/css/admin.min.css
vendored
2
modules/admin/tpl/css/admin.min.css
vendored
File diff suppressed because one or more lines are too long
0
modules/admin/tpl/css/admin_en.css
Normal file
0
modules/admin/tpl/css/admin_en.css
Normal file
|
|
@ -4,7 +4,7 @@ jQuery(function($){
|
|||
var ESC_KEY = 27;
|
||||
|
||||
// Overlapping label
|
||||
$('.form li').find('>input:text,>input:password,>textarea')
|
||||
$('.form li').find('>input:text:not(".notmulti"),>input:password,>textarea')
|
||||
.filter('input[value!=""],textarea:not(:empty)').prev('label').css('visibility','hidden').end().end()
|
||||
.prev('label')
|
||||
.addClass('overlap')
|
||||
|
|
@ -1099,9 +1099,19 @@ $('.filebox')
|
|||
|
||||
$list.find('.lined .select')
|
||||
.bind('click', function(event){
|
||||
var selectedImgSrc = $(this).parent().find('img.filebox_item').attr('src');
|
||||
$this.trigger('filebox.selected', [selectedImgSrc]);
|
||||
$this.trigger('close.mw');
|
||||
var selectedImages = $('input.select_checkbox:checked');
|
||||
if(selectedImages.length == 0) {
|
||||
var selectedImgSrc = $(this).parent().find('img.filebox_item').attr('src');
|
||||
if(!selectedImgSrc){
|
||||
alert("None selected!");
|
||||
}else{
|
||||
$this.trigger('filebox.selected', [selectedImgSrc]);
|
||||
$this.trigger('close.mw');
|
||||
}
|
||||
}else {
|
||||
$this.trigger('filebox.selected', [selectedImages]);
|
||||
$this.trigger('close.mw');
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
|
|
|
|||
54
modules/admin/tpl/js/admin.min.js
vendored
54
modules/admin/tpl/js/admin.min.js
vendored
|
|
@ -1,38 +1,38 @@
|
|||
jQuery(function(a){a(".form li").find(">input:text,>input:password,>textarea").filter('input[value!=""],textarea:not(:empty)').prev("label").css("visibility","hidden").end().end().prev("label").addClass("overlap").css({top:"15px",left:"5px"}).next().focus(function(){var b=a(this).prev().stop().animate({opacity:0,left:"25px"},"fast",function(){b.css("visibility","hidden")})}).blur(function(){var b=a(this);a.trim(b.val())==""&&b.prev().stop().css("visibility","visible").animate({opacity:1,left:"5px"},
|
||||
jQuery(function(a){a(".form li").find(">input:text,>input:password,>textarea").filter('input[value!=""],textarea:not(:empty)').prev("label").css("visibility","hidden").end().end().prev("label").addClass("overlap").css({top:"15px",left:"5px"}).next().focus(function(){var b=a(this).prev().stop().animate({opacity:0,left:"25px"},"fast",function(){b.css("visibility","hidden")})}).blur(function(){var b=a(this);""==a.trim(b.val())&&b.prev().stop().css("visibility","visible").animate({opacity:1,left:"5px"},
|
||||
"fast")}).end().parent().css("position","relative");var c=a("input:radio+label,input:checkbox+label").prev("input");c.change(function(){var b=a(this).attr("name");c.filter(function(){return this.name==b}).next("label").css("font-weight","normal").end().filter(":checked").next("label").css("font-weight","bold").end()}).change();a(".form th>input:checkbox").change(function(){var b=a(this),d=b.data("name");b.closest("table").find("input:checkbox").filter(function(){var b=a(this);return!b.prop("disabled")&&
|
||||
(b.attr("name")==d||b.data("name")==d)}).prop("checked",b.prop("checked")).end().end().trigger("update.checkbox",[d,this.checked])});a.fn.xePagination=function(){this.not(".xe-pagination").addClass("xe-pagination").find("span.tgContent").css("whiteSpace","nowrap").end().find("a.tgAnchor").each(function(){var b=a(this);b.after(a(b.attr("href")))}).end();return this};a(".pagination").xePagination();a(".portlet .action").css({display:"none",position:"absolute"}).parent().mouseleave(function(){a(this).find(">.action").fadeOut(100)}).mouseenter(function(){a(this).find(">.action").fadeIn(100)}).focusin(function(){a(this).mouseenter()}).focusout(function(){var b=
|
||||
a(this),d;clearTimeout(b.data("timer"));d=setTimeout(function(){b.find(":focus").length||b.mouseleave()},10);b.data("timer",d)});a(window).resize(function(){a(document).width()<1300?(a(".dashboard>.section>br").remove(),a(".dashboard>.section>.portlet:odd").after('<br style="clear:both" />')):(a(".dashboard>.section>br").remove(),a(".dashboard>.section>.portlet:eq(2),.dashboard>.section>.portlet:eq(5)").after('<br style="clear:both" />'))});a(window).resize();a(".header>.siteTool>a.i").bind("before-open.tc",
|
||||
a(this),d;clearTimeout(b.data("timer"));d=setTimeout(function(){b.find(":focus").length||b.mouseleave()},10);b.data("timer",d)});a(window).resize(function(){1300>a(document).width()?(a(".dashboard>.section>br").remove(),a(".dashboard>.section>.portlet:odd").after('<br style="clear:both" />')):(a(".dashboard>.section>br").remove(),a(".dashboard>.section>.portlet:eq(2),.dashboard>.section>.portlet:eq(5)").after('<br style="clear:both" />'))});a(window).resize();a(".header>.siteTool>a.i").bind("before-open.tc",
|
||||
function(){a(this).addClass("active").next("div.tgContent").find(">.section:gt(0)").hide().end().find(">.btnArea>button").show()}).bind("after-close.tc",function(){a(this).removeClass("active")}).next("#siteMapList").find(">.section:last").after('<p class="btnArea"><button type="button">› more</button></p>').find("+p>button").click(function(){a(this).hide().parent().prevAll(".section").show()});a.fn.xeMask=function(){this.each(function(){var b=a(this),d=b.text();/^([\w\-\.]+?)@(([\w-]+\.)+[a-z]{2,})$/ig.test(d)&&
|
||||
b.html(d.replace(/(@.+)$/,'<span class="ellipsis">...</span><span class="cover">$1</span>')).find(">.ellipsis").css({position:"absolute",zIndex:1}).hover(function(){a(this).next(".cover").mouseover()},function(){a(this).next(".cover").mouseout()}).end().find(">.cover").css({zIndex:2,opacity:0}).hover(function(){a(this).css("opacity",1).prev("span").css("visibility","hidden")},function(){a(this).css("opacity",0).prev("span").css("visibility","visible")}).end()})};a(".masked").xeMask()});
|
||||
jQuery(function(a){a.fn.xeMenu=function(){this.removeClass("jx").attr("role","navigation").find("li").attr("role","menuitem").find(">ul").hide().end().filter(":has(>ul)").attr("aria-haspopup","true").end().end().delegate("li",{mouseover:function(){a(this).addClass("active").find(">ul").show().end().parentsUntil(".gnb").filter("li").addClass("active").end().end()},mouseleave:function(){a(this).removeClass("active").find(">ul").hide()},focusout:function(){var c=a(this);setTimeout(function(){c.find(":focus").length||
|
||||
c.removeClass("active").find(">ul").hide()},1)}}).delegate("a",{focus:function(){a(this).parent("li").mouseover()}})};a("div.gnb").xeMenu()});
|
||||
jQuery(function(a){a.fn.xeModalWindow=function(){this.not(".xe-modal-window").addClass("xe-modal-window").each(function(){a(a(this).attr("href")).addClass("x").hide()}).click(function(){var c=a(this),b,d;b=a(c.attr("href"));b.parent("body").length||(d=a('<button type="button" class="modalClose" title="Close this layer">X</button>'),d.click(function(){b.data("anchor").trigger("close.mw")}),b.prepend('<span class="bg"></span>').append('<\!--[if IE 6]><iframe class="ie6"></iframe><![endif]--\>').find(">.fg").prepend(d).append(d.clone(true)).end().appendTo("body"));
|
||||
b.data("anchor",c);b.data("state")=="showing"?c.trigger("close.mw"):c.trigger("open.mw");return false}).bind("open.mw",function(){var c=a(this),b,d;b=a.Event("before-open.mw");c.trigger(b);if(b.isDefaultPrevented())return false;b=a(c.attr("href"));d=c.data("duration")||"fast";b.data("state","showing");a("html,body").addClass("modalContainer");a(document).bind("keydown.mw",function(a){if(a.which==27)return c.trigger("close.mw"),false});b.fadeIn(d,function(){c.trigger("after-open.mw")}).find(">.bg").height(a(document).height()).end().find("button.modalClose:first").focus()}).bind("close.mw",
|
||||
function(){var c=a(this),b,d;b=a.Event("before-close.mw");c.trigger(b);if(b.isDefaultPrevented())return false;b=a(c.attr("href"));d=c.data("duration")||"fast";b.data("state","hiding");a("html,body").removeClass("modalContainer");b.fadeOut(d,function(){c.trigger("after-close.mw")});c.focus()})};a("a.modalAnchor").xeModalWindow();a("div.modal").addClass("x").hide()});
|
||||
jQuery(function(a){var c=false;a.fn.xeContentToggler=function(){this.not(".xe-content-toggler").addClass("xe-content-toggler").each(function(){var b=a(this);$layer=a(b.attr("href"));$layer.hide().not(".xe-toggling-content").addClass("xe-toggling-content").mousedown(function(){c=true}).focusout(function(){setTimeout(function(){!c&&!$layer.find(":focus").length&&$layer.data("state")=="showing"&&b.trigger("close.tc");c=false},1)})}).click(function(){var b=a(this),d;d=a(b.attr("href"));d.data("anchor",
|
||||
b);d.data("state")=="showing"?b.trigger("close.tc"):b.trigger("open.tc");return false}).bind("open.tc",function(){function b(){d.trigger("after-open.tc")}var d=a(this),g,f,e;g=a(d.attr("href"));f=d.data("effect");e=d.data("duration")||"fast";g.data("state","showing");d.trigger("before-open.tc");c=false;a(document).unbind("mousedown.tc keydown.tc").bind("mousedown.tc keydown.tc",function(b){if(b){if(b.type=="keydown"&&b.which!=27)return true;if(b.type=="mousedown"&&(b=a(b.target),b.is("html,.tgAnchor,.tgContent")||
|
||||
g.has(b).length))return true}d.trigger("close.tc");return false});switch(f){case "slide":g.slideDown(e,b);break;case "slide-h":f=g.css({"overflow-x":"",width:""}).width();g.show().css({"overflow-x":"hidden",width:"0px"}).animate({width:f},e,function(){g.css({"overflow-x":"",width:""});b()});break;case "fade":g.fadeIn(e,b);break;default:g.show(),d.trigger("after-open.tc")}}).bind("close.tc",function(){function b(){d.trigger("after-close.tc")}var d=a(this),c,f,e;a(document).unbind("mousedown.tc keydown.tc");
|
||||
c=a(d.attr("href"));f=d.data("effect");e=d.data("duration")||"fast";c.data("state","hiding");d.trigger("before-close.tc");switch(f){case "slide":c.slideUp(e,b);break;case "slide-h":c.animate({width:0},e,function(){c.hide();b()});break;case "fade":c.fadeOut(e,b);break;default:c.hide(),d.trigger("after-close.tc")}});return this};a("a.tgAnchor").xeContentToggler()});
|
||||
jQuery(function(a){a.fn.xeModalWindow=function(){this.not(".xe-modal-window").addClass("xe-modal-window").each(function(){a(a(this).attr("href")).addClass("x").hide()}).click(function(){var c=a(this),b,d;b=a(c.attr("href"));b.parent("body").length||(d=a('<button type="button" class="modalClose" title="Close this layer">X</button>'),d.click(function(){b.data("anchor").trigger("close.mw")}),b.prepend('<span class="bg"></span>').append('<\!--[if IE 6]><iframe class="ie6"></iframe><![endif]--\>').find(">.fg").prepend(d).append(d.clone(!0)).end().appendTo("body"));
|
||||
b.data("anchor",c);"showing"==b.data("state")?c.trigger("close.mw"):c.trigger("open.mw");return!1}).bind("open.mw",function(){var c=a(this),b,d;b=a.Event("before-open.mw");c.trigger(b);if(b.isDefaultPrevented())return!1;b=a(c.attr("href"));d=c.data("duration")||"fast";b.data("state","showing");a("html,body").addClass("modalContainer");a(document).bind("keydown.mw",function(a){if(27==a.which)return c.trigger("close.mw"),!1});b.fadeIn(d,function(){c.trigger("after-open.mw")}).find(">.bg").height(a(document).height()).end().find("button.modalClose:first").focus()}).bind("close.mw",
|
||||
function(){var c=a(this),b,d;b=a.Event("before-close.mw");c.trigger(b);if(b.isDefaultPrevented())return!1;b=a(c.attr("href"));d=c.data("duration")||"fast";b.data("state","hiding");a("html,body").removeClass("modalContainer");b.fadeOut(d,function(){c.trigger("after-close.mw")});c.focus()})};a("a.modalAnchor").xeModalWindow();a("div.modal").addClass("x").hide()});
|
||||
jQuery(function(a){var c=!1;a.fn.xeContentToggler=function(){this.not(".xe-content-toggler").addClass("xe-content-toggler").each(function(){var b=a(this);$layer=a(b.attr("href"));$layer.hide().not(".xe-toggling-content").addClass("xe-toggling-content").mousedown(function(){c=!0}).focusout(function(){setTimeout(function(){!c&&!$layer.find(":focus").length&&"showing"==$layer.data("state")&&b.trigger("close.tc");c=!1},1)})}).click(function(){var b=a(this),d;d=a(b.attr("href"));d.data("anchor",b);"showing"==
|
||||
d.data("state")?b.trigger("close.tc"):b.trigger("open.tc");return!1}).bind("open.tc",function(){function b(){d.trigger("after-open.tc")}var d=a(this),g,f,e;g=a(d.attr("href"));f=d.data("effect");e=d.data("duration")||"fast";g.data("state","showing");d.trigger("before-open.tc");c=!1;a(document).unbind("mousedown.tc keydown.tc").bind("mousedown.tc keydown.tc",function(b){if(b){if("keydown"==b.type&&27!=b.which)return!0;if("mousedown"==b.type&&(b=a(b.target),b.is("html,.tgAnchor,.tgContent")||g.has(b).length))return!0}d.trigger("close.tc");
|
||||
return!1});switch(f){case "slide":g.slideDown(e,b);break;case "slide-h":f=g.css({"overflow-x":"",width:""}).width();g.show().css({"overflow-x":"hidden",width:"0px"}).animate({width:f},e,function(){g.css({"overflow-x":"",width:""});b()});break;case "fade":g.fadeIn(e,b);break;default:g.show(),d.trigger("after-open.tc")}}).bind("close.tc",function(){function b(){d.trigger("after-close.tc")}var d=a(this),c,f,e;a(document).unbind("mousedown.tc keydown.tc");c=a(d.attr("href"));f=d.data("effect");e=d.data("duration")||
|
||||
"fast";c.data("state","hiding");d.trigger("before-close.tc");switch(f){case "slide":c.slideUp(e,b);break;case "slide-h":c.animate({width:0},e,function(){c.hide();b()});break;case "fade":c.fadeOut(e,b);break;default:c.hide(),d.trigger("after-close.tc")}});return this};a("a.tgAnchor").xeContentToggler()});
|
||||
jQuery(function(a){a.fn.xeModuleFinder=function(){this.not(".xe-module-finder").addClass("xe-module-finder").find("a.tgAnchor.findsite").bind("before-open.tc",function(){var c,b,d;c=a(this);b=a(c.attr("href")).find(">ul");d=c.prev("input:text").val();a.exec_json("admin.getSiteAllList",{domain:d},function(d){var f=d.site_list,e,i;b.empty();c.closest(".modulefinder").find(".moduleList,.moduleIdList").attr("disabled","disabled");if(d.error||!a.isArray(f))c.trigger("close.tc");else for(e=0,i=f.length;e<
|
||||
i;e++)d=a("<li />").appendTo(b),a('<button type="button" />').text(f[e].domain).data("site_srl",f[e].site_srl).appendTo(d)})}).end().find(".tgContent.suggestion").delegate("button","click",function(){var c,b;c=a(this);b=c.closest(".modulefinder");b.find("a.tgAnchor.findsite").trigger("close.tc");a.exec_json("module.procModuleAdminGetList",{site_srl:c.data("site_srl")},function(d){var c=d.module_list,f;if(!d.error&&c){d=b.find(".moduleList").data("module_list",c).removeAttr("disabled").empty();for(f in c)c.hasOwnProperty(f)&&
|
||||
a("<option />").attr("value",f).text(c[f].title).appendTo(d);d.prop("selectedIndex",0).change().focus();d.is(":visible")||d.slideDown(100,function(){b.find(".moduleIdList:not(:visible)").slideDown(100).trigger("show")}).trigger("show")}})}).end().find(".moduleList,.moduleIdList").hide().end().find(".moduleList").change(function(){var c,b,d;c=a(this);b=c.val();d=c.data("module_list");if(d[b]){d=d[b].list;c=c.closest(".modulefinder").find(".moduleIdList").removeAttr("disabled").empty();for(var g in d)d.hasOwnProperty(g)&&
|
||||
a("<option />").attr("value",d[g].module_srl).text(d[g].browser_title).appendTo(c);c.prop("selectedIndex",0).change()}});return this};a(".modulefinder").xeModuleFinder()});
|
||||
jQuery(function(a){function c(a,b){for(var c=0,e=0;a&&a!=b;)c+=a.offsetTop,e+=a.offsetLeft,a=a.offsetParent;return{top:c,left:e}}var b=a('<tr class="placeholder"><td> </td></tr>');a.fn.xeSortableTable=function(){this.not(".xe-sortable-table").addClass("xe-sortable-table").delegate("button.dragBtn","mousedown.st",function(d){var g,f,e,i,k,h,j,m,l,n;if(d.which==1){f=a(this);e=f.closest("tr");i=f.closest("table");n=i.get(0).offsetParent;f=e.height();k=e.width();before_event=a.Event("before-drag.st");
|
||||
i.trigger(before_event);if(before_event.isDefaultPrevented())return false;g=d.pageY;h=c(e.get(0),n);$clone=e.attr("target",true).clone(true).appendTo(i);l=(d=i.find("thead th")).length;d.filter("[colspan]").attr("colspan",function(a,b){l+=b-1});b.find("td").attr("colspan",l);j=[];i.find("tbody>tr:not([target],.sticky,:hidden)").each(function(){var b=a(this),d;d=c(this,n);j.push({top:d.top,bottom:d.top+b.height(),$item:b})});$clone.addClass("draggable").css({position:"absolute",opacity:0.6,width:k,
|
||||
height:f,left:h.left,top:h.top,zIndex:100});b.css({position:"absolute",opacity:0.6,width:k,height:"10px",left:h.left,top:h.top,backgroundColor:"#bbb",overflow:"hidden",zIndex:99}).appendTo(i);e.css("opacity",0.6);a(document).unbind("mousedown.st mouseup.st").bind("mousemove.st",function(a){var d,c,l;m=null;a=h.top-(g-a.pageY);for(d=0,c=j.length;d<c;d++)if(l=j[d],!(d&&l.top>a||d<c-1&&l.bottom<a))m={element:l.$item},l.top>a-12?(m.state="before",b.css("top",l.top-5)):(m.state="after",b.css("top",l.bottom-
|
||||
5));$clone.css({top:a})}).bind("mouseup.st",function(){a(document).unbind("mousemove.st mouseup.st");e.removeAttr("target").css("opacity","");$clone.remove();b.remove();m&&(a(m.element)[m.state](e),i.trigger("after-drag.st"))})}});return this};a("table.sortable").xeSortableTable()});
|
||||
jQuery(function(a){function c(b){function d(){var a=[];f.each(function(){a.push(this.value)});return a.join("\n")}function c(){b.data("multilang-current-name")?b.find("h2").find("strong").text(i==q?h:k).end().find("a").text(i==q?k:h).show().end():b.find("h2").find("strong").text(h).end().find("a").hide()}var e,f,g="",j=0,i,h,k,o=[],q=0,s=1;b.data("init-multilang-editor")||(b.data("init-multilang-editor",true).bind("multilang-reset",function(){b.data("multilang-current-name","").find(".langInput li").find(">input:text,>textarea").val(" ").prev("label").css("visibility",
|
||||
"visible");i=q;c()}).find("h2 a").click(function(){i=!i;c();return false}).end().delegate("a.langItem","click",function(){var f=a(this),r,h,k;h=b.data("multilang-list");k=f.data("multilang-name");if(h&&h[k]){h=h[k];r=b.find(".langInput");b.trigger("multilang-reset").find(".langList li.active").removeClass("active").end().data("multilang-current-name",k);f.parent("li").addClass("active");for(var p in h)h.hasOwnProperty(p)&&r.find("li."+p).find(">input:text,>textarea").data("multilang-value",h[p]).val(h[p]).prev("label").css("visibility",
|
||||
"hidden");g=d();j=0;e.val(o[j]);i=s;c();return false}}).data("layer_index",m).find(".langInput").attr("id","langInput_"+m++),k=b.find("h2 strong").text(),h=b.find("h2 a").text(),f=b.find("input:text,textarea").change(function(){var a=d()==g?0:1;a!=j&&e.val(o[j=a])}),e=b.find("input[type=submit]").click(function(){function c(){b.hide().closest(".multiLangEdit").find(".vLang").eq(0).val("$user_lang->"+h).end().eq(1).val(b.find(".langInput li."+xe.current_lang).find(">input:text,>textarea").val()).end()}
|
||||
function e(){var b={};if(h&&i==s)b.lang_name=h;f.each(function(){var d=a(this);b[d.parent("li").attr("class")]=d.val()});a.exec_json("module.procModuleAdminInsertLang",b,t)}function t(a){if(a&&!a.error&&a.name)h=a.name,c()}var h=b.data("multilang-current-name");d()==g?c():e();return false}),o=e.val().split("|"),e.val(o[0]))}function b(a){var b,d,c={},e;for(b=0,d=a.length;b<d;b++)e=a[b],c[e.name]||(c[e.name]={}),c[e.name][e.lang_code]=e.value;return c}function d(a){var b=0,d;for(d in a)a.hasOwnProperty(d)&&
|
||||
b++;return b}var g=null,f=null,e=0,i=null,k=false,h=false,j;a(".multiLangEdit").delegate("input.vLang:text,textarea.vLang",{textchange:function(){var b=a(this),d=a.trim(b.val()),c;f&&(clearTimeout(f),f=null);b.data("mle-container");c=j.find(">ul");!d||k?(k=false,c.parent().hide(),b.prev("input.vLang").val("")):(b.data("mle-langkey").val(""),b.prev("input.vLang").val(d),f=setTimeout(function(){b.addClass("loading");c.parent().is(":visible")&&c.parent().hide();show_waiting_message=false;a.exec_json("module.getLangListByLangcodeForAutoComplete",
|
||||
{search_keyword:d},function(d){return function(f){var h=f.results,g,n;if(!f.error&&h&&e==d+1){b.removeClass("loading");c.empty();for(g=0,n=h.length;g<n;g++)f=a('<button type="button" class="_btnLang" />').data("langkey",h[g].name).text(h[g].value),a("<li />").append(f).appendTo(c);j.trigger("show")}}}(e++));show_waiting_message=true},100))},keydown:function(b){var d,c,e=b.which;a(this);b=j.find(">ul");if(!j.is(":visible")||a.inArray(e,[38,40,13,27])<0)return true;if(e==27)return j.trigger("hide"),
|
||||
false;d=b.find("button.active");if(e==13)return d.click(),false;if(!d.length)return b.find("li>button:first").addClass("active"),false;e==38?(c=d.parent().prev("li").find(">button"),c.length||(c=b.find(">li:last>button"))):e==40&&(c=d.parent().next("li").find(">button"),c.length||(c=b.find(">li:first>button")));d.removeClass("active");c.addClass("active");return false},focus:function(){var b=a(this),d=a.trim(b.val()),c=b.closest(".multiLangEdit");b.after(j);b.data("mle-container")||b.data("mle-container",
|
||||
c);b.data("mle-langkey")||b.data("mle-langkey",c.find("input.vLang:first"));(function(){var c=a.trim(b.val());c!=d&&(d=c,b.trigger("textchange"));g=setTimeout(arguments.callee,50)})()},blur:function(){clearTimeout(g);g=null;a(this).closest(".multiLangEdit").focusout()},focusout:function(){var b=a(this);clearTimeout(i);i=setTimeout(function(){h?h=false:b.find(":focus").is(".vLang,button._btnLang")||j.trigger("hide")},10)}}).delegate("a.tgAnchor.editUserLang",{"before-open.tc":function(){var e,f,g;
|
||||
e=a(this);f=a(e.attr("href")).insertBefore(e);g=e.closest(".multiLangEdit").find("input.vLang,textarea.vLang");e=g.eq(0).val();g=g.eq(1).val();c(f);f.trigger("multilang-reset").removeClass("showChild").find(".langList").empty().end();f.find(".langInput li."+xe.current_lang).find(">input:text,>textarea").val(g).prev("label").css("visibility","hidden");j.trigger("hide");/^\$user_lang->(.+)$/.test(e)?(e="module.getModuleAdminLangListByName",g={lang_name:RegExp.$1}):(e="module.getModuleAdminLangListByValue",
|
||||
g={value:g});show_waiting_message=false;a.exec_json(e,g,function(c){var e=c.lang_list,g;!c.error&&e&&(e=b(e),f.data("multilang-list",e),g=f.find(".langList"),a.each(e,function(b){var c=a("<li />").appendTo(g),d=f.data("layer_index");a('<a href="#langInput_'+d+'" class="langItem" />').text(this[xe.current_lang]).data("multilang-name",b).appendTo(c)}),d(e)>1&&f.addClass("showChild"),f.find(".langList>li>a:first").click())});show_waiting_message=true}}).delegate("button._btnLang",{click:function(){var b=
|
||||
a(this);k=true;j.trigger("hide");b.closest(".multiLangEdit").find("input.vLang,textarea.vLang").eq(0).val(b.data("langkey")).end().eq(1).val(b.text()).end();return false},mousedown:function(){h=true},focus:function(){a(this).mouseover()},mouseover:function(){a(this).closest("ul").find("button.active").removeClass("active")}});j=a('<div class="suggestion"><ul></ul></div>').bind("show",function(){a(this).show()}).bind("hide",function(){a(this).hide()});var m=0});
|
||||
jQuery(function(a){a(".filebox").bind("before-open.mw",function(){function c(f){d.html(f.html);d.find(".lined .select").bind("click",function(){var c=a(this).parent().find("img.filebox_item").attr("src");b.trigger("filebox.selected",[c]);b.trigger("close.mw");return false});d.find(".pagination").find("a").filter(function(){return a(this).hasClass("tgAnchor")?false:true}).bind("click",function(){var b=a(this).attr("page");a.exec_json("module.getFileBoxListHtml",{page:b},c);a(window).scrollTop(a(g).find(".modalClose").offset().top);
|
||||
return false});a("#FileBoxGoTo").find("button").bind("click",function(){var b=a(this).prev("input").val();a.exec_json("module.getFileBoxListHtml",{page:b},c);a(window).scrollTop(a(g).find(".modalClose").offset().top);return false})}var b,d,g;b=a(this);g=b.attr("href");d=a(g).find(".filebox_list");a.exec_json("module.getFileBoxListHtml",{page:"1"},c)})});
|
||||
jQuery(function(a){function c(a,b){for(var c=0,e=0;a&&a!=b;)c+=a.offsetTop,e+=a.offsetLeft,a=a.offsetParent;return{top:c,left:e}}var b=a('<tr class="placeholder"><td> </td></tr>');a.fn.xeSortableTable=function(){this.not(".xe-sortable-table").addClass("xe-sortable-table").delegate("button.dragBtn","mousedown.st",function(d){var g,f,e,i,k,h,j,m,l,n;if(1==d.which){f=a(this);e=f.closest("tr");i=f.closest("table");n=i.get(0).offsetParent;f=e.height();k=e.width();before_event=a.Event("before-drag.st");
|
||||
i.trigger(before_event);if(before_event.isDefaultPrevented())return!1;g=d.pageY;h=c(e.get(0),n);$clone=e.attr("target",!0).clone(!0).appendTo(i);l=(d=i.find("thead th")).length;d.filter("[colspan]").attr("colspan",function(a,b){l+=b-1});b.find("td").attr("colspan",l);j=[];i.find("tbody>tr:not([target],.sticky,:hidden)").each(function(){var b=a(this),d;d=c(this,n);j.push({top:d.top,bottom:d.top+b.height(),$item:b})});$clone.addClass("draggable").css({position:"absolute",opacity:0.6,width:k,height:f,
|
||||
left:h.left,top:h.top,zIndex:100});b.css({position:"absolute",opacity:0.6,width:k,height:"10px",left:h.left,top:h.top,backgroundColor:"#bbb",overflow:"hidden",zIndex:99}).appendTo(i);e.css("opacity",0.6);a(document).unbind("mousedown.st mouseup.st").bind("mousemove.st",function(a){var d,c,l;m=null;a=h.top-(g-a.pageY);for(d=0,c=j.length;d<c;d++)if(l=j[d],!(d&&l.top>a||d<c-1&&l.bottom<a))m={element:l.$item},l.top>a-12?(m.state="before",b.css("top",l.top-5)):(m.state="after",b.css("top",l.bottom-5));
|
||||
$clone.css({top:a})}).bind("mouseup.st",function(){a(document).unbind("mousemove.st mouseup.st");e.removeAttr("target").css("opacity","");$clone.remove();b.remove();m&&(a(m.element)[m.state](e),i.trigger("after-drag.st"))})}});return this};a("table.sortable").xeSortableTable()});
|
||||
jQuery(function(a){function c(b){function d(){var a=[];f.each(function(){a.push(this.value)});return a.join("\n")}function c(){b.data("multilang-current-name")?b.find("h2").find("strong").text(i==q?h:k).end().find("a").text(i==q?k:h).show().end():b.find("h2").find("strong").text(h).end().find("a").hide()}var e,f,g="",j=0,i,h,k,o=[],q=0,s=1;b.data("init-multilang-editor")||(b.data("init-multilang-editor",!0).bind("multilang-reset",function(){b.data("multilang-current-name","").find(".langInput li").find(">input:text,>textarea").val(" ").prev("label").css("visibility",
|
||||
"visible");i=q;c()}).find("h2 a").click(function(){i=!i;c();return!1}).end().delegate("a.langItem","click",function(){var f=a(this),r,h,k;h=b.data("multilang-list");k=f.data("multilang-name");if(h&&h[k]){h=h[k];r=b.find(".langInput");b.trigger("multilang-reset").find(".langList li.active").removeClass("active").end().data("multilang-current-name",k);f.parent("li").addClass("active");for(var p in h)h.hasOwnProperty(p)&&r.find("li."+p).find(">input:text,>textarea").data("multilang-value",h[p]).val(h[p]).prev("label").css("visibility",
|
||||
"hidden");g=d();j=0;e.val(o[j]);i=s;c();return!1}}).data("layer_index",m).find(".langInput").attr("id","langInput_"+m++),k=b.find("h2 strong").text(),h=b.find("h2 a").text(),f=b.find("input:text,textarea").change(function(){var a=d()==g?0:1;a!=j&&e.val(o[j=a])}),e=b.find("input[type=submit]").click(function(){function c(){b.hide().closest(".multiLangEdit").find(".vLang").eq(0).val("$user_lang->"+h).end().eq(1).val(b.find(".langInput li."+xe.current_lang).find(">input:text,>textarea").val()).end()}
|
||||
function e(){var b={};if(h&&i==s)b.lang_name=h;f.each(function(){var d=a(this);b[d.parent("li").attr("class")]=d.val()});a.exec_json("module.procModuleAdminInsertLang",b,t)}function t(a){if(a&&!a.error&&a.name)h=a.name,c()}var h=b.data("multilang-current-name");d()==g?c():e();return!1}),o=e.val().split("|"),e.val(o[0]))}function b(a){var b,d,c={},e;for(b=0,d=a.length;b<d;b++)e=a[b],c[e.name]||(c[e.name]={}),c[e.name][e.lang_code]=e.value;return c}function d(a){var b=0,d;for(d in a)a.hasOwnProperty(d)&&
|
||||
b++;return b}var g=null,f=null,e=0,i=null,k=!1,h=!1,j;a(".multiLangEdit").delegate("input.vLang:text,textarea.vLang",{textchange:function(){var b=a(this),d=a.trim(b.val()),c;f&&(clearTimeout(f),f=null);b.data("mle-container");c=j.find(">ul");!d||k?(k=!1,c.parent().hide(),b.prev("input.vLang").val("")):(b.data("mle-langkey").val(""),b.prev("input.vLang").val(d),f=setTimeout(function(){b.addClass("loading");c.parent().is(":visible")&&c.parent().hide();show_waiting_message=!1;a.exec_json("module.getLangListByLangcodeForAutoComplete",
|
||||
{search_keyword:d},function(d){return function(f){var h=f.results,g,n;if(!f.error&&h&&e==d+1){b.removeClass("loading");c.empty();for(g=0,n=h.length;g<n;g++)f=a('<button type="button" class="_btnLang" />').data("langkey",h[g].name).text(h[g].value),a("<li />").append(f).appendTo(c);j.trigger("show")}}}(e++));show_waiting_message=!0},100))},keydown:function(b){var d,c,e=b.which;a(this);b=j.find(">ul");if(!j.is(":visible")||0>a.inArray(e,[38,40,13,27]))return!0;if(27==e)return j.trigger("hide"),!1;d=
|
||||
b.find("button.active");if(13==e)return d.click(),!1;if(!d.length)return b.find("li>button:first").addClass("active"),!1;38==e?(c=d.parent().prev("li").find(">button"),c.length||(c=b.find(">li:last>button"))):40==e&&(c=d.parent().next("li").find(">button"),c.length||(c=b.find(">li:first>button")));d.removeClass("active");c.addClass("active");return!1},focus:function(){var b=a(this),d=a.trim(b.val()),c=b.closest(".multiLangEdit");b.after(j);b.data("mle-container")||b.data("mle-container",c);b.data("mle-langkey")||
|
||||
b.data("mle-langkey",c.find("input.vLang:first"));(function(){var c=a.trim(b.val());c!=d&&(d=c,b.trigger("textchange"));g=setTimeout(arguments.callee,50)})()},blur:function(){clearTimeout(g);g=null;a(this).closest(".multiLangEdit").focusout()},focusout:function(){var b=a(this);clearTimeout(i);i=setTimeout(function(){h?h=!1:b.find(":focus").is(".vLang,button._btnLang")||j.trigger("hide")},10)}}).delegate("a.tgAnchor.editUserLang",{"before-open.tc":function(){var e,f,g;e=a(this);f=a(e.attr("href")).insertBefore(e);
|
||||
g=e.closest(".multiLangEdit").find("input.vLang,textarea.vLang");e=g.eq(0).val();g=g.eq(1).val();c(f);f.trigger("multilang-reset").removeClass("showChild").find(".langList").empty().end();f.find(".langInput li."+xe.current_lang).find(">input:text,>textarea").val(g).prev("label").css("visibility","hidden");j.trigger("hide");/^\$user_lang->(.+)$/.test(e)?(e="module.getModuleAdminLangListByName",g={lang_name:RegExp.$1}):(e="module.getModuleAdminLangListByValue",g={value:g});show_waiting_message=!1;a.exec_json(e,
|
||||
g,function(c){var e=c.lang_list,g;!c.error&&e&&(e=b(e),f.data("multilang-list",e),g=f.find(".langList"),a.each(e,function(b){var c=a("<li />").appendTo(g),d=f.data("layer_index");a('<a href="#langInput_'+d+'" class="langItem" />').text(this[xe.current_lang]).data("multilang-name",b).appendTo(c)}),1<d(e)&&f.addClass("showChild"),f.find(".langList>li>a:first").click())});show_waiting_message=!0}}).delegate("button._btnLang",{click:function(){var b=a(this);k=!0;j.trigger("hide");b.closest(".multiLangEdit").find("input.vLang,textarea.vLang").eq(0).val(b.data("langkey")).end().eq(1).val(b.text()).end();
|
||||
return!1},mousedown:function(){h=!0},focus:function(){a(this).mouseover()},mouseover:function(){a(this).closest("ul").find("button.active").removeClass("active")}});j=a('<div class="suggestion"><ul></ul></div>').bind("show",function(){a(this).show()}).bind("hide",function(){a(this).hide()});var m=0});
|
||||
jQuery(function(a){a(".filebox").bind("before-open.mw",function(){function c(f){d.html(f.html);d.find(".lined .select").bind("click",function(){var c=a("input.select_checkbox:checked");0==c.length?(c=a(this).parent().find("img.filebox_item").attr("src"))?(b.trigger("filebox.selected",[c]),b.trigger("close.mw")):alert("None selected!"):(b.trigger("filebox.selected",[c]),b.trigger("close.mw"));return!1});d.find(".pagination").find("a").filter(function(){return a(this).hasClass("tgAnchor")?!1:!0}).bind("click",
|
||||
function(){var b=a(this).attr("page");a.exec_json("module.getFileBoxListHtml",{page:b},c);a(window).scrollTop(a(g).find(".modalClose").offset().top);return!1});a("#FileBoxGoTo").find("button").bind("click",function(){var b=a(this).prev("input").val();a.exec_json("module.getFileBoxListHtml",{page:b},c);a(window).scrollTop(a(g).find(".modalClose").offset().top);return!1})}var b,d,g;b=a(this);g=b.attr("href");d=a(g).find(".filebox_list");a.exec_json("module.getFileBoxListHtml",{page:"1"},c)})});
|
||||
function showWaitingFogLayer(){var a=jQuery('<span class="bg"></span>');a.height(jQuery(window).height());jQuery(".wfsr").wrap('<div class="wfsr_fog" />').before(a)}function hideWaitingFogLayer(){jQuery(".wfsr").prev("span").remove();jQuery(".wfsr").unwrap()}function doInstallModule(a){var c=[];c.module_name=a;exec_xml("install","procInstallAdminInstall",c,completeInstallModule);showWaitingFogLayer()}
|
||||
function doUpdateModule(a){var c=[];c.module_name=a;exec_xml("install","procInstallAdminUpdate",c,completeInstallModule);showWaitingFogLayer()}function completeInstallModule(a){alert(a.message);location.reload()}jQuery(document).ready(function(a){a("body").ajaxComplete(function(){hideWaitingFogLayer()})});jQuery(function(a){a(".x>.body>.lnb").length==0&&a(".x>.body>.content").addClass("single")});
|
||||
function doUpdateModule(a){var c=[];c.module_name=a;exec_xml("install","procInstallAdminUpdate",c,completeInstallModule);showWaitingFogLayer()}function completeInstallModule(a){alert(a.message);location.reload()}jQuery(document).ready(function(a){a("body").ajaxComplete(function(){hideWaitingFogLayer()})});jQuery(function(a){0==a(".x>.body>.lnb").length&&a(".x>.body>.content").addClass("single")});
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ function getFTPList(pwd)
|
|||
params['ftp_host'] = jQuery("#ftp_host").val();
|
||||
params['ftp_port'] = jQuery("#ftp_port").val();
|
||||
params['ftp_root_path'] = jQuery("#ftp_root_path").val();
|
||||
params['sftp'] = jQuery("input[name=sftp]:checked").val();
|
||||
|
||||
exec_xml('admin', 'getAdminFTPList', params, completeGetFtpInfo, ['list', 'error', 'message'], params, form);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,108 +21,108 @@ $('#theme').data('themes', themes);
|
|||
});
|
||||
</script>
|
||||
|
||||
<h1 class="h1">{$lang->menu_gnb_sub['theme']}</h1>
|
||||
<p class="xe_validator_error">{$XE_VALIDATOR_ERROR}</p>
|
||||
<form ruleset="insertThemeInfo" action="./" method="post" class="form">
|
||||
<h1 class="h1">{$lang->menu_gnb_sub['theme']}</h1>
|
||||
<p class="xe_validator_error">{$XE_VALIDATOR_ERROR}</p>
|
||||
<form ruleset="insertThemeInfo" action="./" method="post" class="form">
|
||||
<input type="hidden" name="module" value="admin" />
|
||||
<input type="hidden" name="act" value="procAdminInsertThemeInfo">
|
||||
<fieldset id="theme">
|
||||
<h2 class="h2">{$lang->theme_setting}</h2>
|
||||
<p>{$lang->theme_desc}</p>
|
||||
<ul class="thumbPreview">
|
||||
<li>
|
||||
<p class="q">{$lang->selected_theme}</p>
|
||||
<ul class="a">
|
||||
{@$current_theme = ($theme_info)?$theme_info->theme:'user_define'}
|
||||
<li class="i" loop="$theme_list=>$key,$val">
|
||||
<span class="thumb"><!--@if($val->thumbnail)--><img src="{$val->thumbnail}" alt="" /><!--@else-->{$lang->msg_thumbnail_not_exist}<!--@end--></span>
|
||||
<input type="radio" name="themeItem" id="{$key}" value="{$key}" <!--@if($key == $current_theme)-->checked="checked"<!--@end--> />
|
||||
<label for="{$key}">{$val->title}({$key})</label>
|
||||
<ul>
|
||||
<li>· {$lang->version}: {$val->version}</li>
|
||||
<li>· {$lang->author}:
|
||||
<!--@foreach($val->publisher as $publisher)-->
|
||||
<a href="{$publisher->homepage}" cond="$publisher->homepage">{$publisher->name}</a>
|
||||
<!--@if(!$publisher->homepage)-->{$publisher->name}<!--@end-->
|
||||
<!--@endforeach-->
|
||||
</li>
|
||||
<li>· {$lang->description}: {$val->description}</li>
|
||||
<li>· {$lang->path}: {$val->path}</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="i userDefine">
|
||||
<span class="thumb">{$lang->by_you}</span>
|
||||
<input type="radio" name="themeItem" id="theme_user_define" value="user_define" <!--@if($current_theme == 'user_define')-->checked="checked"<!--@end--> />
|
||||
<label for="theme_user_define">{$lang->user_define}</label>
|
||||
<ul>
|
||||
<li>· {$lang->description}: {$lang->no_selected_theme_desc}</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</fieldset>
|
||||
<fieldset id="skin">
|
||||
<p>{$lang->user_define_skin_select_desc} <button type="button" class="showAll"></button></p>
|
||||
<ul class="thumbPreview jx">
|
||||
<li data-skintype="layout">
|
||||
<p class="q">{$lang->selected_layout}</p>
|
||||
<ul class="a">
|
||||
<li class="i" loop="$layout_list=>$val">
|
||||
<span class="thumb"><span class="frame"><!--@if($val->thumbnail)--><img src="{$val->thumbnail}" alt="" /><!--@else-->{$lang->msg_thumbnail_not_exist}<!--@end--></span></span>
|
||||
<input type="radio" name="layout" id="layout_{$val->layout_srl}" value="{$val->layout_srl}" <!--@if($val->layout_srl == $current_layout)-->checked="checked"<!--@end--> />
|
||||
<label for="layout_{$val->layout_srl}">{$val->layout_title.'('.$val->layout.')'}</label>
|
||||
<ul>
|
||||
<li>· {$lang->version}: {$val->version}</li>
|
||||
<li>· {$lang->author}:
|
||||
<!--@foreach($val->author as $author)-->
|
||||
<a href="{$author->homepage}" cond="$author->homepage">{$author->name}</a>
|
||||
<!--@if(!$author->homepage)-->{$author->name}<!--@end-->
|
||||
<!--@endforeach-->
|
||||
</li>
|
||||
<li>· {$lang->description}: {$val->description}</li>
|
||||
<li>· {$lang->path}: {$val->path}</li>
|
||||
<li>· {$lang->cmd_setup}: <a href="{getUrl('', 'module', 'admin', 'act', 'dispLayoutAdminModify', 'layout', $val->layout,'layout_srl', $val->layout_srl)}">{$lang->cmd_edit}</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li loop="$module_list=>$mkey,$mval" cond="$mkey!='__IS_PARSE__'" data-skintype="{$mkey}">
|
||||
<p class="q">{sprintf($lang->selected_skin, $mval['title'])}</p>
|
||||
<ul class="a">
|
||||
<li class="i noDirection" cond="!$theme_info->skin_info[$mkey]">
|
||||
<span class="thumb"><span class="frame"></span></span>
|
||||
<strong>{sprintf($lang->no_selected_skin, $mval['title'])}</strong>
|
||||
<ul>
|
||||
<li>{$lang->no_selected_skin_desc}</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="i" loop="$mval['skins']=>$skey,$sval">
|
||||
{@ $id = $mkey.'_'.$skey }
|
||||
<span class="thumb"><span class="frame"><!--@if($sval->thumbnail)--><img src="{$sval->thumbnail}" alt="" /><!--@else-->{$lang->msg_thumbnail_not_exist}<!--@end--></span></span>
|
||||
<input type="radio" name="{$mkey}-skin" id="{$id}" value="{$skey}" checked="checked"|cond="$theme_info->skin_info[$mkey]==$skey" />
|
||||
<label for="{$id}">{$sval->title.'('.$skey.')'}</label>
|
||||
<ul>
|
||||
<li>· {$lang->version}: {$sval->version}</li>
|
||||
<li>· {$lang->author}:
|
||||
<!--@foreach($sval->author as $author)-->
|
||||
<a href="{$author->homepage}" cond="$author->homepage">{$author->name}</a>
|
||||
<!--@if(!$author->homepage)-->{$author->name}<!--@end-->
|
||||
<!--@endforeach-->
|
||||
</li>
|
||||
<li>· {$lang->description}: {$sval->description}</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="i">
|
||||
<span class="thumb"><span class="frame">{$lang->msg_thumbnail_not_exist}</span></span>
|
||||
<input type="radio" name="{$mkey}-skin" id="{$mkey}_none" value="" checked="checked"|cond="!$theme_info->skin_info[$mkey]" />
|
||||
<label for="{$mkey}_none">{$lang->no_select}</label>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</fieldset>
|
||||
<div class="btnArea">
|
||||
<span class="btn medium"><input type="submit" value="{$lang->cmd_save}" /></span>
|
||||
</div>
|
||||
</form>
|
||||
<fieldset id="theme">
|
||||
<h2 class="h2">{$lang->theme_setting}</h2>
|
||||
<p>{$lang->theme_desc}</p>
|
||||
<ul class="thumbPreview">
|
||||
<li>
|
||||
<p class="q">{$lang->selected_theme}</p>
|
||||
<ul class="a">
|
||||
{@$current_theme = ($theme_info)?$theme_info->theme:'user_define'}
|
||||
<li class="i" loop="$theme_list=>$key,$val">
|
||||
<span class="thumb"><!--@if($val->thumbnail)--><img src="{$val->thumbnail}" alt="" /><!--@else-->{$lang->msg_thumbnail_not_exist}<!--@end--></span>
|
||||
<input type="radio" name="themeItem" id="{$key}" value="{$key}" <!--@if($key == $current_theme)-->checked="checked"<!--@end--> />
|
||||
<label for="{$key}">{$val->title}({$key})</label>
|
||||
<ul>
|
||||
<li>· {$lang->version}: {$val->version}</li>
|
||||
<li>· {$lang->author}:
|
||||
<!--@foreach($val->publisher as $publisher)-->
|
||||
<a href="{$publisher->homepage}" cond="$publisher->homepage">{$publisher->name}</a>
|
||||
<!--@if(!$publisher->homepage)-->{$publisher->name}<!--@end-->
|
||||
<!--@endforeach-->
|
||||
</li>
|
||||
<li>· {$lang->description}: {$val->description}</li>
|
||||
<li>· {$lang->path}: {$val->path}</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="i userDefine">
|
||||
<span class="thumb">{$lang->by_you}</span>
|
||||
<input type="radio" name="themeItem" id="theme_user_define" value="user_define" <!--@if($current_theme == 'user_define')-->checked="checked"<!--@end--> />
|
||||
<label for="theme_user_define">{$lang->user_define}</label>
|
||||
<ul>
|
||||
<li>· {$lang->description}: {$lang->no_selected_theme_desc}</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</fieldset>
|
||||
<fieldset id="skin">
|
||||
<p>{$lang->user_define_skin_select_desc} <button type="button" class="showAll"></button></p>
|
||||
<ul class="thumbPreview jx">
|
||||
<li data-skintype="layout">
|
||||
<p class="q">{$lang->selected_layout}</p>
|
||||
<ul class="a">
|
||||
<li class="i" loop="$layout_list=>$val">
|
||||
<span class="thumb"><span class="frame"><!--@if($val->thumbnail)--><img src="{$val->thumbnail}" alt="" /><!--@else-->{$lang->msg_thumbnail_not_exist}<!--@end--></span></span>
|
||||
<input type="radio" name="layout" id="layout_{$val->layout_srl}" value="{$val->layout_srl}" <!--@if($val->layout_srl == $current_layout)-->checked="checked"<!--@end--> />
|
||||
<label for="layout_{$val->layout_srl}">{$val->layout_title.'('.$val->layout.')'}</label>
|
||||
<ul>
|
||||
<li>· {$lang->version}: {$val->version}</li>
|
||||
<li>· {$lang->author}:
|
||||
<!--@foreach($val->author as $author)-->
|
||||
<a href="{$author->homepage}" cond="$author->homepage">{$author->name}</a>
|
||||
<!--@if(!$author->homepage)-->{$author->name}<!--@end-->
|
||||
<!--@endforeach-->
|
||||
</li>
|
||||
<li>· {$lang->description}: {$val->description}</li>
|
||||
<li>· {$lang->path}: {$val->path}</li>
|
||||
<li>· {$lang->cmd_setup}: <a href="{getUrl('', 'module', 'admin', 'act', 'dispLayoutAdminModify', 'layout', $val->layout,'layout_srl', $val->layout_srl)}">{$lang->cmd_edit}</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li loop="$module_list=>$mkey,$mval" cond="$mkey!='__IS_PARSE__'" data-skintype="{$mkey}">
|
||||
<p class="q">{sprintf($lang->selected_skin, $mval['title'])}</p>
|
||||
<ul class="a">
|
||||
<li class="i noDirection" cond="!$theme_info->skin_info[$mkey]">
|
||||
<span class="thumb"><span class="frame"></span></span>
|
||||
<strong>{sprintf($lang->no_selected_skin, $mval['title'])}</strong>
|
||||
<ul>
|
||||
<li>{$lang->no_selected_skin_desc}</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="i" loop="$mval['skins']=>$skey,$sval">
|
||||
{@ $id = $mkey.'_'.$skey }
|
||||
<span class="thumb"><span class="frame"><!--@if($sval->thumbnail)--><img src="{$sval->thumbnail}" alt="" /><!--@else-->{$lang->msg_thumbnail_not_exist}<!--@end--></span></span>
|
||||
<input type="radio" name="{$mkey}-skin" id="{$id}" value="{$skey}" checked="checked"|cond="$theme_info->skin_info[$mkey]==$skey" />
|
||||
<label for="{$id}">{$sval->title.'('.$skey.')'}</label>
|
||||
<ul>
|
||||
<li>· {$lang->version}: {$sval->version}</li>
|
||||
<li>· {$lang->author}:
|
||||
<!--@foreach($sval->author as $author)-->
|
||||
<a href="{$author->homepage}" cond="$author->homepage">{$author->name}</a>
|
||||
<!--@if(!$author->homepage)-->{$author->name}<!--@end-->
|
||||
<!--@endforeach-->
|
||||
</li>
|
||||
<li>· {$lang->description}: {$sval->description}</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="i">
|
||||
<span class="thumb"><span class="frame">{$lang->msg_thumbnail_not_exist}</span></span>
|
||||
<input type="radio" name="{$mkey}-skin" id="{$mkey}_none" value="" checked="checked"|cond="!$theme_info->skin_info[$mkey]" />
|
||||
<label for="{$mkey}_none">{$lang->no_select}</label>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</fieldset>
|
||||
<div class="btnArea">
|
||||
<span class="btn medium"><input type="submit" value="{$lang->cmd_save}" /></span>
|
||||
</div>
|
||||
</form>
|
||||
|
|
|
|||
|
|
@ -138,10 +138,11 @@
|
|||
$ftp_password = $_SESSION['ftp_password'];
|
||||
}
|
||||
|
||||
$isSftpSupported = function_exists(ssh2_sftp);
|
||||
foreach($packages as $package_srl)
|
||||
{
|
||||
$package = $oModel->getPackage($package_srl);
|
||||
if($ftp_info->sftp && $ftp_info->sftp == 'Y')
|
||||
if($ftp_info->sftp && $ftp_info->sftp == 'Y' && $isSftpSupported)
|
||||
{
|
||||
$oModuleInstaller = new SFTPModuleInstaller($package);
|
||||
}
|
||||
|
|
@ -243,7 +244,8 @@
|
|||
}
|
||||
$ftp_info = Context::getFTPInfo();
|
||||
|
||||
if($ftp_info->sftp && $ftp_info->sftp == 'Y')
|
||||
$isSftpSupported = function_exists(ssh2_sftp);
|
||||
if($ftp_info->sftp && $ftp_info->sftp == 'Y' && $isSftpSupported)
|
||||
{
|
||||
$oModuleInstaller = new SFTPModuleInstaller($package);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,17 +1,15 @@
|
|||
<div class="easyNav">
|
||||
<div loop="$categories => $category" class="category">
|
||||
<block cond="$category->depth == 0">
|
||||
<h2>{$category->title}</h2>
|
||||
<ul>
|
||||
<li loop="$category->children => $children">
|
||||
<block cond="$children->category_srl == $category_srl">
|
||||
{@$current_category = $children->title}
|
||||
<strong>{$children->title}({$children->nPackages})</strong>
|
||||
</block>
|
||||
<block cond="$children->category_srl != $category_srl"><a href="{getUrl('','module','admin','act','dispAutoinstallAdminIndex','category_srl',$children->category_srl,'childrenList','')}">{$children->title}({$children->nPackages})</a></block>
|
||||
</li>
|
||||
</ul>
|
||||
</block>
|
||||
<div loop="$categories => $category" cond="$category->depth == 0" class="category">
|
||||
<h2>{$category->title}</h2>
|
||||
<ul>
|
||||
<li loop="$category->children => $children">
|
||||
<block cond="$children->category_srl == $category_srl">
|
||||
{@$current_category = $children->title}
|
||||
<strong>{$children->title}({$children->nPackages})</strong>
|
||||
</block>
|
||||
<block cond="$children->category_srl != $category_srl"><a href="{getUrl('','module','admin','act','dispAutoinstallAdminIndex','category_srl',$children->category_srl,'childrenList','')}">{$children->title}({$children->nPackages})</a></block>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<p class="filter">
|
||||
<a cond="$act != 'dispAutoinstallAdminIndex'" href="{getUrl('', 'module', 'admin', 'act', 'dispAutoinstallAdminIndex')}">All({$tCount})</a>
|
||||
|
|
|
|||
|
|
@ -13,19 +13,8 @@
|
|||
* @brief implemented if additional tasks are required when installing
|
||||
**/
|
||||
function moduleInstall() {
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
// register the action forward (for using on the admin mode)
|
||||
$oModuleController = &getController('module');
|
||||
|
||||
$oDB->addIndex
|
||||
(
|
||||
"comments",
|
||||
"idx_module_list_order",
|
||||
array("module_srl", "list_order"),
|
||||
true
|
||||
);
|
||||
|
||||
// 2007. 10. 17 add a trigger to delete comments together with posting deleted
|
||||
$oModuleController->insertTrigger('document.deleteDocument', 'comment', 'controller', 'triggerDeleteDocumentComments', 'after');
|
||||
// 2007. 10. 17 add a trigger to delete all of comments together with module deleted
|
||||
|
|
@ -55,9 +44,6 @@
|
|||
if(!$oDB->isColumnExists("comments", "blamed_count")) return true;
|
||||
if(!$oDB->isColumnExists("comment_voted_log", "point")) return true;
|
||||
|
||||
if (!$oDB->isIndexExists("comments", "idx_module_list_order"))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -94,15 +80,6 @@
|
|||
if(!$oDB->isColumnExists("comment_voted_log", "point"))
|
||||
$oDB->addColumn('comment_voted_log', 'point', 'number', 11, 0, true);
|
||||
|
||||
if (!$oDB->isIndexExists("comments", "idx_module_list_order"))
|
||||
$oDB->addIndex
|
||||
(
|
||||
"comments",
|
||||
"idx_module_list_order",
|
||||
array("module_srl", "list_order"),
|
||||
true
|
||||
);
|
||||
|
||||
return new Object(0, 'success_updated');
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -71,26 +71,30 @@
|
|||
$oFileController = &getController('file');
|
||||
|
||||
$files = $oDocument->getUploadedFiles();
|
||||
foreach($files as $key => $val) {
|
||||
$file_info = array();
|
||||
$file_info['tmp_name'] = $val->uploaded_filename;
|
||||
$file_info['name'] = $val->source_filename;
|
||||
$inserted_file = $oFileController->insertFile($file_info, $module_srl, $obj->document_srl, $val->download_count, true);
|
||||
if($inserted_file && $inserted_file->toBool()) {
|
||||
// for image/video files
|
||||
if($val->direct_download == 'Y') {
|
||||
$source_filename = substr($val->uploaded_filename,2);
|
||||
$target_filename = substr($inserted_file->get('uploaded_filename'),2);
|
||||
$obj->content = str_replace($source_filename, $target_filename, $obj->content);
|
||||
// For binary files
|
||||
} else {
|
||||
$obj->content = str_replace('file_srl='.$val->file_srl, 'file_srl='.$inserted_file->get('file_srl'), $obj->content);
|
||||
$obj->content = str_replace('sid='.$val->sid, 'sid='.$inserted_file->get('sid'), $obj->content);
|
||||
}
|
||||
}
|
||||
// Delete an existing file
|
||||
$oFileController->deleteFile($val->file_srl);
|
||||
}
|
||||
if(is_array($files))
|
||||
{
|
||||
foreach($files as $key => $val)
|
||||
{
|
||||
$file_info = array();
|
||||
$file_info['tmp_name'] = $val->uploaded_filename;
|
||||
$file_info['name'] = $val->source_filename;
|
||||
$inserted_file = $oFileController->insertFile($file_info, $module_srl, $obj->document_srl, $val->download_count, true);
|
||||
if($inserted_file && $inserted_file->toBool()) {
|
||||
// for image/video files
|
||||
if($val->direct_download == 'Y') {
|
||||
$source_filename = substr($val->uploaded_filename,2);
|
||||
$target_filename = substr($inserted_file->get('uploaded_filename'),2);
|
||||
$obj->content = str_replace($source_filename, $target_filename, $obj->content);
|
||||
// For binary files
|
||||
} else {
|
||||
$obj->content = str_replace('file_srl='.$val->file_srl, 'file_srl='.$inserted_file->get('file_srl'), $obj->content);
|
||||
$obj->content = str_replace('sid='.$val->sid, 'sid='.$inserted_file->get('sid'), $obj->content);
|
||||
}
|
||||
}
|
||||
// Delete an existing file
|
||||
$oFileController->deleteFile($val->file_srl);
|
||||
}
|
||||
}
|
||||
// Set the all files to be valid
|
||||
$oFileController->setFilesValid($obj->document_srl);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -213,9 +213,16 @@ class documentController extends document {
|
|||
if(count($extra_keys)) {
|
||||
foreach($extra_keys as $idx => $extra_item) {
|
||||
$value = '';
|
||||
if(isset($obj->{'extra_vars'.$idx})) $value = trim($obj->{'extra_vars'.$idx});
|
||||
if(isset($obj->{'extra_vars'.$idx})){
|
||||
$tmp = $obj->{'extra_vars'.$idx};
|
||||
if (is_array($tmp))
|
||||
$value = implode('|@|', $tmp);
|
||||
else
|
||||
$value = trim($tmp);
|
||||
}
|
||||
elseif(isset($obj->{$extra_item->name})) $value = trim($obj->{$extra_item->name});
|
||||
if(!isset($value)) continue;
|
||||
|
||||
$this->insertDocumentExtraVar($obj->module_srl, $obj->document_srl, $idx, $value, $extra_item->eid);
|
||||
}
|
||||
}
|
||||
|
|
@ -372,7 +379,13 @@ class documentController extends document {
|
|||
if(count($extra_keys)) {
|
||||
foreach($extra_keys as $idx => $extra_item) {
|
||||
$value = '';
|
||||
if(isset($obj->{'extra_vars'.$idx})) $value = trim($obj->{'extra_vars'.$idx});
|
||||
if(isset($obj->{'extra_vars'.$idx})){
|
||||
$tmp = $obj->{'extra_vars'.$idx};
|
||||
if (is_array($tmp))
|
||||
$value = implode('|@|', $tmp);
|
||||
else
|
||||
$value = trim($tmp);
|
||||
}
|
||||
elseif(isset($obj->{$extra_item->name})) $value = trim($obj->{$extra_item->name});
|
||||
if(!isset($value)) continue;
|
||||
$this->insertDocumentExtraVar($obj->module_srl, $obj->document_srl, $idx, $value, $extra_item->eid);
|
||||
|
|
@ -621,6 +634,13 @@ class documentController extends document {
|
|||
// commit
|
||||
$oDB->commit();
|
||||
|
||||
// Clear cache
|
||||
$oCacheHandler = &CacheHandler::getInstance('object');
|
||||
if($oCacheHandler->isSupport())
|
||||
{
|
||||
$oCacheHandler->invalidateGroupKey('documentList');
|
||||
}
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -98,7 +98,9 @@
|
|||
return $_SESSION['accessible'][$this->document_srl]==true?true:false;
|
||||
}
|
||||
|
||||
function allowComment() {
|
||||
function allowComment()
|
||||
{
|
||||
// init write, document is not exists. so allow comment status is true
|
||||
if(!$this->isExists()) return true;
|
||||
|
||||
return $this->get('comment_status') == 'ALLOW' ? true : false;
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@
|
|||
// cache controll
|
||||
$oCacheHandler = &CacheHandler::getInstance('object');
|
||||
if($oCacheHandler->isSupport()){
|
||||
$object_key = 'object:'.$obj->module_srl.'_category_srl:'.$obj->category_srl.'_list_count:'.$obj->list_count.'_search_target:'.$obj->search_target.'_search_keyword:'.$obj->search_keyword.'_page'.$obj->page.'_sort_index:'.$obj->sort_index;
|
||||
$object_key = 'object:'.$obj->module_srl.'_category_srl:'.$obj->category_srl.'_list_count:'.$obj->list_count.'_search_target:'.$obj->search_target.'_search_keyword:'.$obj->search_keyword.'_page'.$obj->page.'_sort_index:'.$obj->sort_index.'_order_type:'.$obj->order_type;
|
||||
$cache_key = $oCacheHandler->getGroupKey('documentList', $object_key);
|
||||
$output = $oCacheHandler->get($cache_key);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@
|
|||
$height = $xml_obj->attrs->height;
|
||||
$align = $xml_obj->attrs->align;
|
||||
$alt = $xml_obj->attrs->alt;
|
||||
$title = $xml_obj->attrs->title;
|
||||
$border = (int)$xml_obj->attrs->border;
|
||||
$link_url = $xml_obj->attrs->link_url;
|
||||
$open_window = $xml_obj->attrs->open_window;
|
||||
|
|
@ -73,7 +74,9 @@
|
|||
$attr_output = array("src=\"".$src."\"");
|
||||
if($alt) {
|
||||
$attr_output[] = "alt=\"".$alt."\"";
|
||||
$attr_output[] = "title=\"".$alt."\"";
|
||||
}
|
||||
if($title) {
|
||||
$attr_output[] = "title=\"".$title."\"";
|
||||
}
|
||||
if($margin) {
|
||||
$style = trim(preg_replace('/margin[a-z\-]*[ ]*:[ ]*[0-9 a-z]+(;| )/i','', $style)).';';
|
||||
|
|
|
|||
|
|
@ -86,7 +86,6 @@
|
|||
else if($form.find('#align_middle').attr('checked') == true) align = 'middle';
|
||||
else if($form.find('#align_right').attr('checked') == true) align = 'right';
|
||||
|
||||
|
||||
var width = $form.find('#width').val();
|
||||
var height = $form.find('#height').val();
|
||||
|
||||
|
|
@ -126,13 +125,18 @@
|
|||
$component.find('img').attr(img_attrs);
|
||||
$component.find('img').css(img_style);
|
||||
|
||||
text = $component.html();
|
||||
|
||||
opener.editorFocus(opener.editorPrevSrl);
|
||||
|
||||
var iframe_obj = opener.editorGetIFrame(opener.editorPrevSrl)
|
||||
|
||||
opener.editorReplaceHTML(iframe_obj, text);
|
||||
try {
|
||||
var prevNode = opener.editorPrevNode;
|
||||
prevNode.parentNode.insertBefore($component.find('img').get(0), prevNode);
|
||||
prevNode.parentNode.removeChild(prevNode);
|
||||
}catch(e){
|
||||
try {
|
||||
text = $component.html();
|
||||
opener.editorReplaceHTML(iframe_obj, text);
|
||||
} catch(ee) { }
|
||||
};
|
||||
opener.editorFocus(opener.editorPrevSrl);
|
||||
|
||||
window.close();
|
||||
|
|
@ -183,4 +187,4 @@
|
|||
|
||||
});
|
||||
|
||||
}) (jQuery);
|
||||
}) (jQuery);
|
||||
|
|
|
|||
|
|
@ -22,6 +22,9 @@ jQuery(function($){
|
|||
get_by_id('multimedia_'+key).value = val;
|
||||
});
|
||||
|
||||
// auto start?
|
||||
get_by_id('multimedia_auto_start').checked = ($node.attr('auto_start') == 'true');
|
||||
|
||||
})();
|
||||
|
||||
$('.btnArea button').click(function(){
|
||||
|
|
@ -29,7 +32,7 @@ $('.btnArea button').click(function(){
|
|||
|
||||
var el_wmode = get_by_id('fo').elements['multimedia_wmode'];
|
||||
var attrs = {
|
||||
alt : get_by_id('multimedia_caption').value,
|
||||
alt : encodeURIComponent(get_by_id('multimedia_caption').value),
|
||||
width : get_by_id('multimedia_width').value || 400,
|
||||
height : get_by_id('multimedia_height').value || 400,
|
||||
wmode : el_wmode.value || el_wmode.options[0].value,
|
||||
|
|
@ -44,7 +47,7 @@ $('.btnArea button').click(function(){
|
|||
|
||||
var html = '<img src="../../../../common/img/blank.gif" editor_component="multimedia_link" multimedia_src="" width="" height="" wmode="" style="display:block;width:'+attrs.width+'px;height:'+attrs.height+'px;border:2px dotted #4371B9;background:url(./modules/editor/components/multimedia_link/tpl/multimedia_link_component.gif) no-repeat center" auto_start="" alt="" />';
|
||||
|
||||
html = html.replace(/(\w+)=""/, function(m0,m1) {
|
||||
html = html.replace(/(\w+)=""/g, function(m0,m1) {
|
||||
return attrs[m1] ? (m1+'="'+attrs[m1]+'"') : '';
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -2,4 +2,4 @@
|
|||
* popup으로 열렸을 경우 부모창의 위지윅에디터에 select된 멀티미디어 컴포넌트 코드를 체크하여
|
||||
* 있으면 가져와서 원하는 곳에 삽입
|
||||
**/
|
||||
jQuery(function($){(function(){if(!is_def(opener))return;var $node=$(opener.editorPrevNode).filter('img'),attrs;if(!$node.length)return;attrs={url:$node.attr('multimedia_src'),caption:$node.attr('alt'),width:$node.width()-4,height:$node.height()-4,wmode:$node.attr('wmode')};$.each(attrs,function(key,val){get_by_id('multimedia_'+key).value=val})})();$('.btnArea button').click(function(){if(!is_def(opener))return;var el_wmode=get_by_id('fo').elements['multimedia_wmode'],attrs={alt:get_by_id('multimedia_caption').value,width:get_by_id('multimedia_width').value||400,height:get_by_id('multimedia_height').value||400,wmode:el_wmode.value||el_wmode.options[0].value,auto_start:get_by_id('multimedia_auto_start').checked?'true':'false',multimedia_src:get_by_id('multimedia_url').value.replace(request_uri,'')};if(!attrs.multimedia_src){window.close();return};var html='<img src="../../../../common/img/blank.gif" editor_component="multimedia_link" multimedia_src="" width="" height="" wmode="" style="display:block;width:'+attrs.width+'px;height:'+attrs.height+'px;border:2px dotted #4371B9;background:url(./modules/editor/components/multimedia_link/tpl/multimedia_link_component.gif) no-repeat center" auto_start="" alt="" />';html=html.replace(/(\w+)=""/,function(m0,m1){return attrs[m1]?(m1+'="'+attrs[m1]+'"'):''});opener.editorFocus(opener.editorPrevSrl);var iframe_obj=opener.editorGetIFrame(opener.editorPrevSrl);opener.editorReplaceHTML(iframe_obj,html);opener.editorFocus(opener.editorPrevSrl);window.close()})})
|
||||
jQuery(function($){(function(){if(!is_def(opener))return;var $node=$(opener.editorPrevNode).filter('img'),attrs;if(!$node.length)return;attrs={url:$node.attr('multimedia_src'),caption:$node.attr('alt'),width:$node.width()-4,height:$node.height()-4,wmode:$node.attr('wmode')};$.each(attrs,function(key,val){get_by_id('multimedia_'+key).value=val});get_by_id('multimedia_auto_start').checked=($node.attr('auto_start')=='true')})();$('.btnArea button').click(function(){if(!is_def(opener))return;var el_wmode=get_by_id('fo').elements['multimedia_wmode'],attrs={alt:encodeURIComponent(get_by_id('multimedia_caption').value),width:get_by_id('multimedia_width').value||400,height:get_by_id('multimedia_height').value||400,wmode:el_wmode.value||el_wmode.options[0].value,auto_start:get_by_id('multimedia_auto_start').checked?'true':'false',multimedia_src:get_by_id('multimedia_url').value.replace(request_uri,'')};if(!attrs.multimedia_src){window.close();return};var html='<img src="../../../../common/img/blank.gif" editor_component="multimedia_link" multimedia_src="" width="" height="" wmode="" style="display:block;width:'+attrs.width+'px;height:'+attrs.height+'px;border:2px dotted #4371B9;background:url(./modules/editor/components/multimedia_link/tpl/multimedia_link_component.gif) no-repeat center" auto_start="" alt="" />';html=html.replace(/(\w+)=""/g,function(m0,m1){return attrs[m1]?(m1+'="'+attrs[m1]+'"'):''});opener.editorFocus(opener.editorPrevSrl);var iframe_obj=opener.editorGetIFrame(opener.editorPrevSrl);opener.editorReplaceHTML(iframe_obj,html);opener.editorFocus(opener.editorPrevSrl);window.close()})})
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
<!--@end-->
|
||||
|
||||
{@$cookie_tool=explode(',', $_COOKIE['DrEditorToolbar'])}
|
||||
{@$default_tool=explode(',', 'hx,txt,material,link,list,quote,img,movie,file,hr,index')}
|
||||
{@$default_tool=explode(',', 'hx,txt,'.($material_exists?'material,':'').'link,list,quote,img,movie,file,hr,index');}
|
||||
{@$external_components=array_keys($drComponentList)}
|
||||
{@$enable_tool=array_unique(array_merge($cookie_tool, $default_tool, (array)$external_components))}
|
||||
|
||||
|
|
@ -479,7 +479,7 @@
|
|||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div class="wArea mArea material">
|
||||
<div class="wArea mArea material" cond="$material_exists">
|
||||
<!-- class="mArea" | class="mArea open" -->
|
||||
<fieldset>
|
||||
<legend>{$lang->edit->materials}</legend>
|
||||
|
|
|
|||
|
|
@ -1238,7 +1238,7 @@ var ImageWriter = xe.createPlugin('ImageWriter', {
|
|||
var callback_id = ''+(new Date).getTime()+Math.ceil(Math.random()*1000);
|
||||
window[callback_id] = function(fileObj){ self.onfileuploaded(seq, callback_id, fileObj); }
|
||||
|
||||
var filesrl = _image.attr('class').match(/(?:^|\s)xe_filesrl_(\d+)(?:\s|$)/);
|
||||
var filesrl = (_image.attr('class')||'').match(/(?:^|\s)xe_filesrl_(\d+)(?:\s|$)/);
|
||||
filesrl = (filesrl && filesrl[1])? filesrl[1] : '';
|
||||
|
||||
// upload file
|
||||
|
|
@ -1945,7 +1945,7 @@ var FileWriter = xe.createPlugin('FileWriter', {
|
|||
}
|
||||
|
||||
});
|
||||
editor.registerPlugin(new FileWriter);
|
||||
if(window.reloadFileList) editor.registerPlugin(new FileWriter);
|
||||
|
||||
// List Writer
|
||||
var ListWriter = xe.createPlugin('ListWriter', {
|
||||
|
|
|
|||
|
|
@ -3131,42 +3131,46 @@ xe.XE_EditingArea_WYSIWYG = jQuery.Class({
|
|||
this.getDocument().body.style.cursor = "text";
|
||||
|
||||
if(jQuery.browser.msie){
|
||||
jQuery(this.doc).bind('keydown', jQuery.fnBind(
|
||||
function(weEvent){
|
||||
if(this.doc.selection.type.toLowerCase() == 'control' && weEvent.keyCode == 8) {
|
||||
this.oApp.exec("EXECCOMMAND", ['delete', false, false]);
|
||||
weEvent.preventDefault(); weEvent.stopPropagation();
|
||||
jQuery(this.doc)
|
||||
.unbind('keydown.ea')
|
||||
.bind('keydown.ea', jQuery.fnBind(
|
||||
function(weEvent){
|
||||
if(this.doc.selection.type.toLowerCase() == 'control' && weEvent.keyCode == 8) {
|
||||
this.oApp.exec("EXECCOMMAND", ['delete', false, false]);
|
||||
weEvent.preventDefault(); weEvent.stopPropagation();
|
||||
}
|
||||
}
|
||||
}
|
||||
, this));
|
||||
jQuery(this.doc.body).bind('mousedown', jQuery.fnBind(
|
||||
function(weEvent){
|
||||
this._oIERange = null;
|
||||
this._bIERangeReset = true;
|
||||
}
|
||||
, this));
|
||||
/*
|
||||
jQuery(this.doc.body).bind('beforedeactivate', jQuery.fnBind(
|
||||
function(weEvent){
|
||||
// without this, cursor won't make it inside a table.
|
||||
// mousedown(_oIERange gets reset) -> beforedeactivate(gets fired for table) -> RESTORE_IE_SELECTION
|
||||
if(this._bIERangeReset) return;
|
||||
, this));
|
||||
jQuery(this.doc.body)
|
||||
.unbind('mousedown.ea')
|
||||
.bind('mousedown.ea', jQuery.fnBind(
|
||||
function(weEvent){
|
||||
this._oIERange = null;
|
||||
this._bIERangeReset = true;
|
||||
}
|
||||
, this))
|
||||
.unbind('beforedeactivate.ea')
|
||||
.bind('beforedeactivate.ea', jQuery.fnBind(
|
||||
function(weEvent){
|
||||
// without this, cursor won't make it inside a table.
|
||||
// mousedown(_oIERange gets reset) -> beforedeactivate(gets fired for table) -> RESTORE_IE_SELECTION
|
||||
if(this._bIERangeReset) return;
|
||||
|
||||
var tmpRange = this.getDocument().selection.createRange(0);
|
||||
// Control range does not have parentElement
|
||||
if(tmpRange.parentElement && tmpRange.parentElement() && tmpRange.parentElement().tagName == "INPUT"){
|
||||
this._oIERange = this._oPrevIERange;
|
||||
}else{
|
||||
this._oIERange = tmpRange;
|
||||
var tmpRange = this.getDocument().selection.createRange(0);
|
||||
// Control range does not have parentElement
|
||||
if(tmpRange.parentElement && tmpRange.parentElement() && tmpRange.parentElement().tagName == "INPUT"){
|
||||
this._oIERange = this._oPrevIERange;
|
||||
}else{
|
||||
this._oIERange = tmpRange;
|
||||
}
|
||||
}
|
||||
}
|
||||
, this));
|
||||
*/
|
||||
jQuery(this.doc.body).bind('mouseup', jQuery.fnBind(
|
||||
function(weEvent){
|
||||
this._bIERangeReset = false;
|
||||
}
|
||||
, this));
|
||||
, this))
|
||||
.unbind('mouseup.ea')
|
||||
.bind('mouseup.ea', jQuery.fnBind(
|
||||
function(weEvent){
|
||||
this._bIERangeReset = false;
|
||||
}
|
||||
, this));
|
||||
}
|
||||
},
|
||||
|
||||
|
|
@ -5572,124 +5576,6 @@ xe.XE_XHTMLFormatter = $.Class({
|
|||
// center, font, b, i, s, strike
|
||||
|
||||
})(jQuery);
|
||||
/**
|
||||
* Support XE extensions
|
||||
* @author gony
|
||||
*/
|
||||
xe.XE_Extension = jQuery.Class({
|
||||
name : "XE_Extension",
|
||||
seq : '',
|
||||
|
||||
$init : function(elAppContainer, editor_sequence) {
|
||||
this.seq = editor_sequence;
|
||||
this._assignHTMLObjects(elAppContainer);
|
||||
},
|
||||
|
||||
_assignHTMLObjects : function(elAppContainer) {
|
||||
this.elDropdownLayer = jQuery('DIV.xpress_xeditor_extension_layer', elAppContainer).get(0);
|
||||
},
|
||||
|
||||
_removeAttrs : function(sContent) {
|
||||
return sContent;
|
||||
},
|
||||
|
||||
_addEvent : function() {
|
||||
if (this.oApp.getEditingMode() != 'WYSIWYG') return;
|
||||
|
||||
var doc = this.oApp.getWYSIWYGDocument();
|
||||
var seq = this.seq;
|
||||
var fn = function(){
|
||||
var obj = jQuery(this);
|
||||
var comp = obj.attr('editor_component');
|
||||
if (comp && jQuery.isFunction(openComponent)) {
|
||||
editorPrevNode = obj.get(0);
|
||||
openComponent(comp, seq);
|
||||
}
|
||||
};
|
||||
|
||||
jQuery('img,div[editor_component]', doc).each(function(){
|
||||
var obj = jQuery(this);
|
||||
if(this.nodeName == 'IMG' && !obj.attr('editor_component')) obj.attr('editor_component','image_link')
|
||||
if(!obj.attr('xeHandled')) {
|
||||
obj.attr('xeHandled','YES');
|
||||
obj.dblclick(fn);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
$ON_MSG_APP_READY : function() {
|
||||
this.oApp.exec('REGISTER_UI_EVENT', ['extension', 'click', 'TOGGLE_EXTENSION_LAYER']);
|
||||
},
|
||||
|
||||
$ON_TOGGLE_EXTENSION_LAYER : function() {
|
||||
this.oApp.exec('TOGGLE_TOOLBAR_ACTIVE_LAYER', [this.elDropdownLayer]);
|
||||
},
|
||||
|
||||
$ON_CHANGE_EDITING_MODE : function(mode) {
|
||||
var self = this;
|
||||
setTimeout(function(){ self._addEvent(); }, 100);
|
||||
},
|
||||
|
||||
$ON_PASTE_HTML : function() {
|
||||
var self = this;
|
||||
setTimeout(function(){ self._addEvent(); }, 100);
|
||||
},
|
||||
|
||||
$ON_LOAD_IR_FIELD : function() {
|
||||
var self = this;
|
||||
setTimeout(function(){ self._addEvent(); }, 100);
|
||||
},
|
||||
|
||||
$ON_SET_IR : function() {
|
||||
var self = this;
|
||||
setTimeout(function(){ self._addEvent(); }, 100);
|
||||
}
|
||||
});
|
||||
/**
|
||||
* Auto saving
|
||||
* @author gony
|
||||
*/
|
||||
xe.XE_AutoSave = jQuery.Class({
|
||||
name : "XE_AutoSave",
|
||||
form : null,
|
||||
textarea : null,
|
||||
|
||||
$init : function(oIRTextarea, elAppContainer) {
|
||||
this.form = oIRTextarea.form;
|
||||
this.textarea = oIRTextarea;
|
||||
|
||||
this._assignHTMLObjects(elAppContainer);
|
||||
},
|
||||
|
||||
_assignHTMLObjects : function(elAppContainer) {
|
||||
this.welMessageBox = jQuery('autosave_message');
|
||||
},
|
||||
|
||||
$ON_MSG_APP_READY : function() {
|
||||
var elTitle = jQuery(this.form._saved_doc_title);
|
||||
var elContent = jQuery(this.form._saved_doc_content);
|
||||
var title = jQuery.trim(elTitle.val());
|
||||
var content = jQuery.trim(elContent.val());
|
||||
|
||||
if (title || content) {
|
||||
if (confirm(this.form._saved_doc_message.value)) {
|
||||
jQuery(this.form.title).val(title);
|
||||
this.oApp.setIR(content);
|
||||
} else {
|
||||
editorRemoveSavedDoc();
|
||||
}
|
||||
}
|
||||
|
||||
editorEnableAutoSave(this.form, jQuery(this.form).attr("editor_sequence"));
|
||||
|
||||
// register hotkey
|
||||
this.oApp.exec('REGISTER_HOTKEY', ['ctrl+shift+s','AUTO_SAVE']);
|
||||
},
|
||||
|
||||
$ON_AUTO_SAVE : function() {
|
||||
_editorAutoSave();
|
||||
}
|
||||
});
|
||||
/**
|
||||
* Format Block plugin
|
||||
* @author gony
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
@charset "utf-8";
|
||||
/* NHN (developers@xpressengine.com) */
|
||||
/* TextEditor */
|
||||
.xeTextEditor {overflow:hidden}
|
||||
.xeTextEditor {margin:0 12px 0 0}
|
||||
.xeTextEditor textarea {display:block;margin:0;padding:5px}
|
||||
.xeTextEditor.black textarea {color:#fff;background-color:#000}
|
||||
/* Type Selector */
|
||||
|
|
@ -34,8 +34,7 @@
|
|||
.xpress-editor a.skip:focus{position:relative;display:block;padding:5px;right:0;z-index:60;width:auto;height:auto;text-align:right;white-space:nowrap;color:#000;text-decoration:none;letter-spacing:-1px;_zoom:1}
|
||||
.xpress-editor .input_area{position:relative;margin:10px;z-index:30;*zoom:1;height:400px}
|
||||
.xpress-editor .input_area iframe,
|
||||
.xpress-editor .input_area textarea{display:block;width:100%;position:relative;height:100%;border:0;overflow:auto}
|
||||
.xpress-editor .input_area iframe{}
|
||||
.xpress-editor .input_area textarea{display:block;width:100% !important;position:relative;height:100%;border:0 !important;padding:0 !important;overflow:auto}
|
||||
.xpress-editor .input_area textarea{*margin:0 -10px;_margin-bottom:-2px}
|
||||
.xpress-editor .input_area textarea.blind{display:none}
|
||||
.xpress-editor .input_control{position:relative;display:block;width:100%;clear:both;text-align:center;background:#fbfbfb url(../img/btn_expand.gif) no-repeat center center;cursor:n-resize}
|
||||
|
|
|
|||
|
|
@ -443,27 +443,7 @@
|
|||
|
||||
</div>
|
||||
|
||||
<!--@if($allow_fileupload)-->
|
||||
<!--%import("../../tpl/js/uploader.js")-->
|
||||
<!--%import("../../tpl/js/swfupload.js")-->
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
editorUploadInit(
|
||||
{
|
||||
"editorSequence" : {$editor_sequence},
|
||||
"sessionName" : "{session_name()}",
|
||||
"allowedFileSize" : "{$file_config->allowed_filesize}",
|
||||
"allowedFileTypes" : "{$file_config->allowed_filetypes}",
|
||||
"allowedFileTypesDescription" : "{$file_config->allowed_filetypes}",
|
||||
"insertedFiles" : {(int)$files_count},
|
||||
"replaceButtonID" : "swfUploadButton{$editor_sequence}",
|
||||
"fileListAreaID" : "uploaded_file_list_{$editor_sequence}",
|
||||
"previewAreaID" : "preview_uploaded_{$editor_sequence}",
|
||||
"uploaderStatusID" : "uploader_status_{$editor_sequence}"
|
||||
}
|
||||
);
|
||||
//]]></script>
|
||||
<!-- 파일 업로드 영역 -->
|
||||
<div id="fileUploader_{$editor_sequence}" class="fileUploader">
|
||||
<div id="fileUploader_{$editor_sequence}" class="fileUploader" cond="$allow_fileupload"><!--File upload zone-->
|
||||
<div class="preview {$btn_class}" id="preview_uploaded_{$editor_sequence}"></div>
|
||||
<div class="fileListArea {$btn_class}">
|
||||
<select id="uploaded_file_list_{$editor_sequence}" multiple="multiple" class="fileList" title="Attached File List"><option></option></select>
|
||||
|
|
@ -475,13 +455,32 @@
|
|||
</div>
|
||||
<div class="file_attach_info" id="uploader_status_{$editor_sequence}">{$upload_status}</div>
|
||||
</div>
|
||||
<!--@end-->
|
||||
</div>
|
||||
<!-- 에디터 활성화 -->
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
var editor_path = "{$editor_path}";
|
||||
var auto_saved_msg = "{$lang->msg_auto_saved}";
|
||||
var oEditor = editorStart_xe("{$editor_sequence}", "{$editor_primary_key_name}", "{$editor_content_key_name}", "{$editor_height}", "{$colorset}", "{$content_style}",'{$content_font}','{$content_font_size}');
|
||||
var oEditor;
|
||||
jQuery(function(){
|
||||
oEditor = editorStart_xe("{$editor_sequence}", "{$editor_primary_key_name}", "{$editor_content_key_name}", "{$editor_height}", "{$colorset}", "{$content_style}",'{$content_font}','{$content_font_size}');
|
||||
|
||||
<!--@if($allow_fileupload)-->
|
||||
<load target="../../tpl/js/uploader.js" />
|
||||
<load target="../../tpl/js/swfupload.js" />
|
||||
editorUploadInit({
|
||||
"editorSequence" : {$editor_sequence},
|
||||
"sessionName" : "{session_name()}",
|
||||
"allowedFileSize" : "{$file_config->allowed_filesize}",
|
||||
"allowedFileTypes" : "{$file_config->allowed_filetypes}",
|
||||
"allowedFileTypesDescription" : "{$file_config->allowed_filetypes}",
|
||||
"insertedFiles" : {(int)$files_count},
|
||||
"replaceButtonID" : "swfUploadButton{$editor_sequence}",
|
||||
"fileListAreaID" : "uploaded_file_list_{$editor_sequence}",
|
||||
"previewAreaID" : "preview_uploaded_{$editor_sequence}",
|
||||
"uploaderStatusID" : "uploader_status_{$editor_sequence}"
|
||||
});
|
||||
<!--@end-->
|
||||
});
|
||||
//]]></script>
|
||||
|
||||
<!--@end-->
|
||||
|
|
|
|||
|
|
@ -2946,40 +2946,43 @@ xe.XE_EditingArea_WYSIWYG = $.Class({
|
|||
// this.getDocument().body.style.cursor = "text";
|
||||
|
||||
if($.browser.msie){
|
||||
$(this.doc).bind('keydown', $.fnBind(
|
||||
function(weEvent){
|
||||
if(this.doc.selection.type.toLowerCase() == 'control' && weEvent.keyCode == 8) {
|
||||
this.oApp.exec("EXECCOMMAND", ['delete', false, false]);
|
||||
weEvent.preventDefault(); weEvent.stopPropagation();
|
||||
$(this.doc)
|
||||
.unbind('keydown.ea')
|
||||
.bind('keydown.ea', $.fnBind(
|
||||
function(weEvent){
|
||||
if(this.doc.selection.type.toLowerCase() == 'control' && weEvent.keyCode == 8) {
|
||||
this.oApp.exec("EXECCOMMAND", ['delete', false, false]);
|
||||
weEvent.preventDefault(); weEvent.stopPropagation();
|
||||
}
|
||||
}
|
||||
}
|
||||
, this));
|
||||
$(this.doc.body).bind('mousedown', $.fnBind(
|
||||
function(weEvent){
|
||||
this._oIERange = null;
|
||||
this._bIERangeReset = true;
|
||||
}
|
||||
, this));
|
||||
$(this.doc.body).bind('beforedeactivate', $.fnBind(
|
||||
function(weEvent){
|
||||
// without this, cursor won't make it inside a table.
|
||||
// mousedown(_oIERange gets reset) -> beforedeactivate(gets fired for table) -> RESTORE_IE_SELECTION
|
||||
if(this._bIERangeReset) return;
|
||||
, this));
|
||||
|
||||
var tmpRange = this.getDocument().selection.createRange(0);
|
||||
// Control range does not have parentElement
|
||||
if(tmpRange.parentElement && tmpRange.parentElement() && tmpRange.parentElement().tagName == "INPUT"){
|
||||
this._oIERange = this._oPrevIERange;
|
||||
}else{
|
||||
this._oIERange = tmpRange;
|
||||
$(this.doc.body)
|
||||
.unbind('mousedown.ea')
|
||||
.bind('mousedown.ea', $.fnBind(
|
||||
function(weEvent){
|
||||
this._oIERange = null;
|
||||
this._bIERangeReset = true;
|
||||
}
|
||||
}
|
||||
, this));
|
||||
$(this.doc.body).bind('mouseup', $.fnBind(
|
||||
function(weEvent){
|
||||
this._bIERangeReset = false;
|
||||
}
|
||||
, this));
|
||||
, this))
|
||||
.unbind('beforedeactivate.ea')
|
||||
.bind('beforedeactivate.ea', $.fnBind(
|
||||
function(weEvent){
|
||||
// without this, cursor won't make it inside a table.
|
||||
// mousedown(_oIERange gets reset) -> beforedeactivate(gets fired for table) -> RESTORE_IE_SELECTION
|
||||
if(this._bIERangeReset) return;
|
||||
|
||||
var tmpRange = this.getDocument().selection.createRange(0);
|
||||
// Control range does not have parentElement
|
||||
if(tmpRange.parentElement && tmpRange.parentElement() && tmpRange.parentElement().tagName == "INPUT"){
|
||||
this._oIERange = this._oPrevIERange;
|
||||
}else{
|
||||
this._oIERange = tmpRange;
|
||||
}
|
||||
}
|
||||
, this))
|
||||
.unbind('mouseup.ea')
|
||||
.bind('mouseup.ea', $.fnBind( function(weEvent){ this._bIERangeReset = false;}, this));
|
||||
}
|
||||
},
|
||||
|
||||
|
|
@ -4303,7 +4306,7 @@ xe.XE_SCharacter = $.Class({
|
|||
|
||||
$ON_MSG_APP_READY : function(){
|
||||
var funcInsert = $.fnBind(this.oApp.exec, this.oApp, "INSERT_SCHARACTERS", [this.oTextField.value]);
|
||||
$(this.oInsertButton).click(funcInsert, this);
|
||||
$(this.oInsertButton).click(funcInsert);
|
||||
|
||||
this.oApp.exec("SET_SCHARACTER_LIST", [this.charSet]);
|
||||
|
||||
|
|
@ -5249,7 +5252,7 @@ xe.XE_Extension = $.Class({
|
|||
obj.attr('editor_component','image_link');
|
||||
}
|
||||
if(this.last_doc != doc) {
|
||||
obj.dblclick(fn);
|
||||
obj.unbind('dblclick.widget').bind('dblclick.widget',fn);
|
||||
this.last_doc = doc;
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -4,9 +4,7 @@ use_closure_compiler=true
|
|||
[skip]
|
||||
Xpress_Editor.js
|
||||
xe_interface.js
|
||||
xe_textarea.js
|
||||
|
||||
[merge >> xpresseditor.js]
|
||||
Xpress_Editor.js
|
||||
xe_interface.js
|
||||
xe_textarea.js
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ function editorStart_xe(editor_sequence, primary_key, content_key, editor_height
|
|||
}
|
||||
|
||||
// hide textarea
|
||||
textarea.hide().css('width', '99%').before(iframe).after(htmlsrc);
|
||||
textarea.hide().css('width', '100%').before(iframe).after(htmlsrc);
|
||||
|
||||
// create an editor
|
||||
var oEditor = new xe.XpressCore();
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ function editorStartTextarea(editor_sequence, content_key, primary_key) {
|
|||
var use_html = xGetElementById('htm_'+editor_sequence).value;
|
||||
obj.form.setAttribute('editor_sequence', editor_sequence);
|
||||
|
||||
obj.style.width = '99%';
|
||||
obj.style.width = '100%';
|
||||
|
||||
editorRelKeys[editor_sequence] = new Array();
|
||||
editorRelKeys[editor_sequence]["primary"] = obj.form[primary_key];
|
||||
|
|
|
|||
2
modules/editor/skins/xpresseditor/js/xe_textarea.min.js
vendored
Normal file
2
modules/editor/skins/xpresseditor/js/xe_textarea.min.js
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
function editorStartTextarea(a,b,e){var c=xGetElementById("editor_"+a),d=xGetElementById("htm_"+a).value;c.form.setAttribute("editor_sequence",a);c.style.width="100%";editorRelKeys[a]=[];editorRelKeys[a].primary=c.form[e];editorRelKeys[a].content=c.form[b];editorRelKeys[a].func=editorGetContentTextarea;a=c.form[b].value;d&&(a=a.replace(/<br([^>]*)>/ig,"\n"),"br"!=d&&(a=a.replace(/</g,"<"),a=a.replace(/>/g,">"),a=a.replace(/"/g,'"'),a=a.replace(/&/g,"&")));c.value=a}
|
||||
function editorGetContentTextarea(a){var b=xGetElementById("editor_"+a),a=xGetElementById("htm_"+a).value,b=b.value.trim();a&&("br"!=a&&(b=b.replace(/&/g,"&"),b=b.replace(/</g,"<"),b=b.replace(/>/g,">"),b=b.replace(/\"/g,""")),b=b.replace(/(\r\n|\n)/g,"<br />"));return b};
|
||||
|
|
@ -2946,40 +2946,43 @@ xe.XE_EditingArea_WYSIWYG = $.Class({
|
|||
// this.getDocument().body.style.cursor = "text";
|
||||
|
||||
if($.browser.msie){
|
||||
$(this.doc).bind('keydown', $.fnBind(
|
||||
function(weEvent){
|
||||
if(this.doc.selection.type.toLowerCase() == 'control' && weEvent.keyCode == 8) {
|
||||
this.oApp.exec("EXECCOMMAND", ['delete', false, false]);
|
||||
weEvent.preventDefault(); weEvent.stopPropagation();
|
||||
$(this.doc)
|
||||
.unbind('keydown.ea')
|
||||
.bind('keydown.ea', $.fnBind(
|
||||
function(weEvent){
|
||||
if(this.doc.selection.type.toLowerCase() == 'control' && weEvent.keyCode == 8) {
|
||||
this.oApp.exec("EXECCOMMAND", ['delete', false, false]);
|
||||
weEvent.preventDefault(); weEvent.stopPropagation();
|
||||
}
|
||||
}
|
||||
}
|
||||
, this));
|
||||
$(this.doc.body).bind('mousedown', $.fnBind(
|
||||
function(weEvent){
|
||||
this._oIERange = null;
|
||||
this._bIERangeReset = true;
|
||||
}
|
||||
, this));
|
||||
$(this.doc.body).bind('beforedeactivate', $.fnBind(
|
||||
function(weEvent){
|
||||
// without this, cursor won't make it inside a table.
|
||||
// mousedown(_oIERange gets reset) -> beforedeactivate(gets fired for table) -> RESTORE_IE_SELECTION
|
||||
if(this._bIERangeReset) return;
|
||||
, this));
|
||||
|
||||
var tmpRange = this.getDocument().selection.createRange(0);
|
||||
// Control range does not have parentElement
|
||||
if(tmpRange.parentElement && tmpRange.parentElement() && tmpRange.parentElement().tagName == "INPUT"){
|
||||
this._oIERange = this._oPrevIERange;
|
||||
}else{
|
||||
this._oIERange = tmpRange;
|
||||
$(this.doc.body)
|
||||
.unbind('mousedown.ea')
|
||||
.bind('mousedown.ea', $.fnBind(
|
||||
function(weEvent){
|
||||
this._oIERange = null;
|
||||
this._bIERangeReset = true;
|
||||
}
|
||||
}
|
||||
, this));
|
||||
$(this.doc.body).bind('mouseup', $.fnBind(
|
||||
function(weEvent){
|
||||
this._bIERangeReset = false;
|
||||
}
|
||||
, this));
|
||||
, this))
|
||||
.unbind('beforedeactivate.ea')
|
||||
.bind('beforedeactivate.ea', $.fnBind(
|
||||
function(weEvent){
|
||||
// without this, cursor won't make it inside a table.
|
||||
// mousedown(_oIERange gets reset) -> beforedeactivate(gets fired for table) -> RESTORE_IE_SELECTION
|
||||
if(this._bIERangeReset) return;
|
||||
|
||||
var tmpRange = this.getDocument().selection.createRange(0);
|
||||
// Control range does not have parentElement
|
||||
if(tmpRange.parentElement && tmpRange.parentElement() && tmpRange.parentElement().tagName == "INPUT"){
|
||||
this._oIERange = this._oPrevIERange;
|
||||
}else{
|
||||
this._oIERange = tmpRange;
|
||||
}
|
||||
}
|
||||
, this))
|
||||
.unbind('mouseup.ea')
|
||||
.bind('mouseup.ea', $.fnBind( function(weEvent){ this._bIERangeReset = false;}, this));
|
||||
}
|
||||
},
|
||||
|
||||
|
|
@ -4303,7 +4306,7 @@ xe.XE_SCharacter = $.Class({
|
|||
|
||||
$ON_MSG_APP_READY : function(){
|
||||
var funcInsert = $.fnBind(this.oApp.exec, this.oApp, "INSERT_SCHARACTERS", [this.oTextField.value]);
|
||||
$(this.oInsertButton).click(funcInsert, this);
|
||||
$(this.oInsertButton).click(funcInsert);
|
||||
|
||||
this.oApp.exec("SET_SCHARACTER_LIST", [this.charSet]);
|
||||
|
||||
|
|
@ -5249,7 +5252,7 @@ xe.XE_Extension = $.Class({
|
|||
obj.attr('editor_component','image_link');
|
||||
}
|
||||
if(this.last_doc != doc) {
|
||||
obj.dblclick(fn);
|
||||
obj.unbind('dblclick.widget').bind('dblclick.widget',fn);
|
||||
this.last_doc = doc;
|
||||
}
|
||||
});
|
||||
|
|
@ -5787,7 +5790,7 @@ function editorStart_xe(editor_sequence, primary_key, content_key, editor_height
|
|||
}
|
||||
|
||||
// hide textarea
|
||||
textarea.hide().css('width', '99%').before(iframe).after(htmlsrc);
|
||||
textarea.hide().css('width', '100%').before(iframe).after(htmlsrc);
|
||||
|
||||
// create an editor
|
||||
var oEditor = new xe.XpressCore();
|
||||
|
|
@ -6039,43 +6042,3 @@ xe.XE_Preview = jQuery.Class({
|
|||
// TODO : 버튼이 눌렸을 때의 동작 정의
|
||||
}
|
||||
});
|
||||
function editorStartTextarea(editor_sequence, content_key, primary_key) {
|
||||
var obj = xGetElementById('editor_'+editor_sequence);
|
||||
var use_html = xGetElementById('htm_'+editor_sequence).value;
|
||||
obj.form.setAttribute('editor_sequence', editor_sequence);
|
||||
|
||||
obj.style.width = '99%';
|
||||
|
||||
editorRelKeys[editor_sequence] = new Array();
|
||||
editorRelKeys[editor_sequence]["primary"] = obj.form[primary_key];
|
||||
editorRelKeys[editor_sequence]["content"] = obj.form[content_key];
|
||||
editorRelKeys[editor_sequence]["func"] = editorGetContentTextarea;
|
||||
|
||||
var content = obj.form[content_key].value;
|
||||
if(use_html) {
|
||||
content = content.replace(/<br([^>]*)>/ig,"\n");
|
||||
if(use_html!='br') {
|
||||
content = content.replace(/</g, "<");
|
||||
content = content.replace(/>/g, ">");
|
||||
content = content.replace(/"/g, '"');
|
||||
content = content.replace(/&/g, "&");
|
||||
}
|
||||
}
|
||||
obj.value = content;
|
||||
}
|
||||
|
||||
function editorGetContentTextarea(editor_sequence) {
|
||||
var obj = xGetElementById('editor_'+editor_sequence);
|
||||
var use_html = xGetElementById('htm_'+editor_sequence).value;
|
||||
var content = obj.value.trim();
|
||||
if(use_html) {
|
||||
if(use_html!='br') {
|
||||
content = content.replace(/&/g, "&");
|
||||
content = content.replace(/</g, "<");
|
||||
content = content.replace(/>/g, ">");
|
||||
content = content.replace(/\"/g, """);
|
||||
}
|
||||
content = content.replace(/(\r\n|\n)/g, "<br />");
|
||||
}
|
||||
return content;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,81 +1,81 @@
|
|||
(function(c){function k(a){function b(a){return function(){return a.apply(this.$this,arguments)}}a=a.prototype;this.prototype.$super={};for(var d in a)a.propertyIsEnumerable(d)&&("undefined"==typeof this.prototype[d]&&(this.prototype[d]=a[d]),this.prototype.$super[d]=c.isFunction(a[d])?b(a[d]):a[d]);return this}c.extend({Class:function(a){function b(){if("undefined"!=typeof this.$super)this.$super.$this=this;c.isFunction(this.$init)&&this.$init.apply(this,arguments)}b.prototype=a;b.constructor=b;
|
||||
b.extend=k;return b},$:function(a){return"string"==typeof a?"<"==a.substring(0,1)?c(a).get(0):c("#"+a).get(0):a},fnBind:function(a,b){var d=c.makeArray(arguments);d.shift();d.shift();return function(){var f=d.concat(c.makeArray(arguments));return a.apply(b,f)}}});c.browser.nVersion=parseFloat(c.browser.version);if("undefined"==typeof window.xe)window.xe={};xe.XpressCore=c.Class({name:"XpressCore",$init:function(a){a=!a?{}:c.Class({}).extend({oDebugger:null}).extend(a);if(a.oDebugger)this.oDebugger=
|
||||
a.oDebugger,this.oDebugger.oApp=this;this.commandQueue=[];this.oCommandMap={};this.oDisabledCommand={};this.aPlugins=[];this.appStatus=xe.APP_STATUS.NOT_READY;this.registerPlugin(this)},exec:function(a,b,d){if(this.appStatus==xe.APP_STATUS.NOT_READY)return this.commandQueue[this.commandQueue.length]={msg:a,args:b,event:d},!0;this.exec=this._exec;this.exec(a,b,d)},delayedExec:function(a,b,d,f){a=c.fnBind(this.exec,this,a,b,f);setTimeout(a,d)},_exec:function(a,b,d){return(this._exec=this.oDebugger?
|
||||
this._execWithDebugger:this._execWithoutDebugger).call(this,a,b,d)},_execWithDebugger:function(a,b,d){this.oDebugger.log_MessageStart(a,b);d=this._doExec(a,b,d);this.oDebugger.log_MessageEnd(a,b);return d},_execWithoutDebugger:function(a,b,d){return this._doExec(a,b,d)},_doExec:function(a,b,d){var f=!1;if(!this.oDisabledCommand[a]){var c=[];if(b&&b.length)for(var f=b.length,g=0;g<f;g++)c[g]=b[g];d&&(c[c.length]=d);(f=this._execMsgStep("BEFORE",a,c))&&(f=this._execMsgStep("ON",a,c));f&&(f=this._execMsgStep("AFTER",
|
||||
a,c))}return f},registerPlugin:function(a){if(!a)throw"An error occured in registerPlugin(): invalid plug-in";a.nIdx=this.aPlugins.length;a.oApp=this;this.aPlugins[a.nIdx]=a;if(a.status!=xe.PLUGIN_STATUS.NOT_READY)a.status=xe.PLUGIN_STATUS.READY;this.exec("MSG_PLUGIN_REGISTERED",[a]);return a.nIdx},disableCommand:function(a,b){this.oDisabledCommand[a]=b},registerBrowserEvent:function(a,b,d,f,e){a&&(f=f||[],d=e?c.fnBind(this.delayedExec,this,d,f,e):c.fnBind(this.exec,this,d,f),c(a).bind(b,d))},run:function(){this._changeAppStatus(xe.APP_STATUS.WAITING_FOR_PLUGINS_READY);
|
||||
(function(c){function l(a){function b(a){return function(){return a.apply(this.$this,arguments)}}a=a.prototype;this.prototype.$super={};for(var d in a)a.propertyIsEnumerable(d)&&("undefined"==typeof this.prototype[d]&&(this.prototype[d]=a[d]),this.prototype.$super[d]=c.isFunction(a[d])?b(a[d]):a[d]);return this}c.extend({Class:function(a){function b(){if("undefined"!=typeof this.$super)this.$super.$this=this;c.isFunction(this.$init)&&this.$init.apply(this,arguments)}b.prototype=a;b.constructor=b;
|
||||
b.extend=l;return b},$:function(a){return"string"==typeof a?"<"==a.substring(0,1)?c(a).get(0):c("#"+a).get(0):a},fnBind:function(a,b){var d=c.makeArray(arguments);d.shift();d.shift();return function(){var e=d.concat(c.makeArray(arguments));return a.apply(b,e)}}});c.browser.nVersion=parseFloat(c.browser.version);if("undefined"==typeof window.xe)window.xe={};xe.XpressCore=c.Class({name:"XpressCore",$init:function(a){a=!a?{}:c.Class({}).extend({oDebugger:null}).extend(a);if(a.oDebugger)this.oDebugger=
|
||||
a.oDebugger,this.oDebugger.oApp=this;this.commandQueue=[];this.oCommandMap={};this.oDisabledCommand={};this.aPlugins=[];this.appStatus=xe.APP_STATUS.NOT_READY;this.registerPlugin(this)},exec:function(a,b,d){if(this.appStatus==xe.APP_STATUS.NOT_READY)return this.commandQueue[this.commandQueue.length]={msg:a,args:b,event:d},!0;this.exec=this._exec;this.exec(a,b,d)},delayedExec:function(a,b,d,e){a=c.fnBind(this.exec,this,a,b,e);setTimeout(a,d)},_exec:function(a,b,d){return(this._exec=this.oDebugger?
|
||||
this._execWithDebugger:this._execWithoutDebugger).call(this,a,b,d)},_execWithDebugger:function(a,b,d){this.oDebugger.log_MessageStart(a,b);d=this._doExec(a,b,d);this.oDebugger.log_MessageEnd(a,b);return d},_execWithoutDebugger:function(a,b,d){return this._doExec(a,b,d)},_doExec:function(a,b,d){var e=!1;if(!this.oDisabledCommand[a]){var c=[];if(b&&b.length)for(var e=b.length,g=0;g<e;g++)c[g]=b[g];d&&(c[c.length]=d);(e=this._execMsgStep("BEFORE",a,c))&&(e=this._execMsgStep("ON",a,c));e&&(e=this._execMsgStep("AFTER",
|
||||
a,c))}return e},registerPlugin:function(a){if(!a)throw"An error occured in registerPlugin(): invalid plug-in";a.nIdx=this.aPlugins.length;a.oApp=this;this.aPlugins[a.nIdx]=a;if(a.status!=xe.PLUGIN_STATUS.NOT_READY)a.status=xe.PLUGIN_STATUS.READY;this.exec("MSG_PLUGIN_REGISTERED",[a]);return a.nIdx},disableCommand:function(a,b){this.oDisabledCommand[a]=b},registerBrowserEvent:function(a,b,d,e,f){a&&(e=e||[],d=f?c.fnBind(this.delayedExec,this,d,e,f):c.fnBind(this.exec,this,d,e),c(a).bind(b,d))},run:function(){this._changeAppStatus(xe.APP_STATUS.WAITING_FOR_PLUGINS_READY);
|
||||
var a=this.commandQueue.length;for(i=0;i<a;i++){var b=this.commandQueue[i];this.exec(b.msg,b.args,b.event)}this._waitForPluginReady()},createCommandMap:function(a){this.oCommandMap[a]=[];for(var b=this.aPlugins.length,d=0;d<b;d++)this._doAddToCommandMap(a,this.aPlugins[d])},addToCommandMap:function(a,b){this.oCommandMap[a]&&this._addToCommandMap(a,b)},_changeAppStatus:function(a){this.appStatus=a;this.appStatus==xe.APP_STATUS.READY&&this.exec("MSG_APP_READY")},_execMsgStep:function(a,b,d){return(this._execMsgStep=
|
||||
this.oDebugger?this._execMsgStepWithDebugger:this._execMsgStepWithoutDebugger).call(this,a,b,d)},_execMsgStepWithDebugger:function(a,b,d){this.oDebugger.log_MessageStepStart(a,b,d);var f=this._execMsgHandler("$"+a+"_"+b,d);this.oDebugger.log_MessageStepEnd(a,b,d);return f},_execMsgStepWithoutDebugger:function(a,b,d){return this._execMsgHandler("$"+a+"_"+b,d)},_execMsgHandler:function(a,b){this.oCommandMap[a]||this.createCommandMap(a);var d=this.oCommandMap[a],f=d.length;if(0==f)return!0;var c,g=!0;
|
||||
if(a.match(/^\$(BEFORE|ON|AFTER)_MSG_APP_READY$/))for(var h=0;h<f;h++){if(c=this._execHandler(d[h],a,b),!1===c){g=!1;break}}else for(h=0;h<f;h++)if("function"!=typeof d[h].$PRECONDITION||this._execHandler(d[h],"$PRECONDITION",[a,b]))if(c=this._execHandler(d[h],a,b),!1===c){g=!1;break}return g},_execHandler:function(a,b,d){return(this._execHandler=this.oDebugger?this._execHandlerWithDebugger:this._execHandlerWithoutDebugger).call(this,a,b,d)},_execHandlerWithDebugger:function(a,b,d){this.oDebugger.log_CallHandlerStart(a,
|
||||
b,d);var f=a[b].apply(a,d);this.oDebugger.log_CallHandlerEnd(a,b,d);return f},_execHandlerWithoutDebugger:function(a,b,d){return a[b].apply(a,d)},_doAddToCommandMap:function(a,b){"function"==typeof b[a]&&(this.oCommandMap[a][this.oCommandMap[a].length]=b)},_waitForPluginReady:function(){for(var a=!0,b=0;b<this.aPlugins.length;b++)if(this.aPlugins[b].status==xe.PLUGIN_STATUS.NOT_READY){a=!1;break}a?this._changeAppStatus(xe.APP_STATUS.READY):setTimeout(c.fnBind(this._waitForPluginReady,this),100)}});
|
||||
this.oDebugger?this._execMsgStepWithDebugger:this._execMsgStepWithoutDebugger).call(this,a,b,d)},_execMsgStepWithDebugger:function(a,b,d){this.oDebugger.log_MessageStepStart(a,b,d);var e=this._execMsgHandler("$"+a+"_"+b,d);this.oDebugger.log_MessageStepEnd(a,b,d);return e},_execMsgStepWithoutDebugger:function(a,b,d){return this._execMsgHandler("$"+a+"_"+b,d)},_execMsgHandler:function(a,b){this.oCommandMap[a]||this.createCommandMap(a);var d=this.oCommandMap[a],e=d.length;if(0==e)return!0;var c,g=!0;
|
||||
if(a.match(/^\$(BEFORE|ON|AFTER)_MSG_APP_READY$/))for(var h=0;h<e;h++){if(c=this._execHandler(d[h],a,b),!1===c){g=!1;break}}else for(h=0;h<e;h++)if("function"!=typeof d[h].$PRECONDITION||this._execHandler(d[h],"$PRECONDITION",[a,b]))if(c=this._execHandler(d[h],a,b),!1===c){g=!1;break}return g},_execHandler:function(a,b,d){return(this._execHandler=this.oDebugger?this._execHandlerWithDebugger:this._execHandlerWithoutDebugger).call(this,a,b,d)},_execHandlerWithDebugger:function(a,b,d){this.oDebugger.log_CallHandlerStart(a,
|
||||
b,d);var e=a[b].apply(a,d);this.oDebugger.log_CallHandlerEnd(a,b,d);return e},_execHandlerWithoutDebugger:function(a,b,d){return a[b].apply(a,d)},_doAddToCommandMap:function(a,b){"function"==typeof b[a]&&(this.oCommandMap[a][this.oCommandMap[a].length]=b)},_waitForPluginReady:function(){for(var a=!0,b=0;b<this.aPlugins.length;b++)if(this.aPlugins[b].status==xe.PLUGIN_STATUS.NOT_READY){a=!1;break}a?this._changeAppStatus(xe.APP_STATUS.READY):setTimeout(c.fnBind(this._waitForPluginReady,this),100)}});
|
||||
xe.APP_STATUS={NOT_READY:0,WAITING_FOR_PLUGINS_READY:1,READY:2};xe.PLUGIN_STATUS={NOT_READY:0,READY:1};xe.W3CDOMRange=c.Class({$init:function(a){this._document=a||document;this.collapsed=!0;this.endContainer=this.commonAncestorContainer=this._document.body;this.endOffset=0;this.startContainer=this._document.body;this.startOffset=0},cloneContents:function(){var a=this._document.createDocumentFragment(),b=this._document.createDocumentFragment(),d=this._getNodesInRange();if(1>d.length)return a;d=this._constructClonedTree(d,
|
||||
b);if(b=b.firstChild)for(var b=b.firstChild,f;b;)f=b.nextSibling,a.appendChild(b),b=f;d=this._splitTextEndNodes({oStartContainer:d.oStartContainer,iStartOffset:this.startOffset,oEndContainer:d.oEndContainer,iEndOffset:this.endOffset});d.oStartContainer&&d.oStartContainer.previousSibling&&xe.DOMFix.parentNode(d.oStartContainer).removeChild(d.oStartContainer.previousSibling);d.oEndContainer&&d.oEndContainer.nextSibling&&xe.DOMFix.parentNode(d.oEndContainer).removeChild(d.oEndContainer.nextSibling);
|
||||
return a},_constructClonedTree:function(a,b){var d=null,f=null,c=this.startContainer,g=this.endContainer;_recurConstructClonedTree=function(a,b,j,p){if(0>b)return b;var j=b-1,n=a[b].cloneNode(!1);a[b]==c&&(d=n);for(a[b]==g&&(f=n);0<=j&&xe.DOMFix.parentNode(a[j])==a[b];)j=this._recurConstructClonedTree(a,j,a[b],n,d,f);p.insertBefore(n,p.firstChild);return j};a[a.length]=xe.DOMFix.parentNode(a[a.length-1]);_recurConstructClonedTree(a,a.length-1,a[a.length-1],b);return{oStartContainer:d,oEndContainer:f}},
|
||||
b);if(b=b.firstChild)for(var b=b.firstChild,e;b;)e=b.nextSibling,a.appendChild(b),b=e;d=this._splitTextEndNodes({oStartContainer:d.oStartContainer,iStartOffset:this.startOffset,oEndContainer:d.oEndContainer,iEndOffset:this.endOffset});d.oStartContainer&&d.oStartContainer.previousSibling&&xe.DOMFix.parentNode(d.oStartContainer).removeChild(d.oStartContainer.previousSibling);d.oEndContainer&&d.oEndContainer.nextSibling&&xe.DOMFix.parentNode(d.oEndContainer).removeChild(d.oEndContainer.nextSibling);
|
||||
return a},_constructClonedTree:function(a,b){var d=null,e=null,c=this.startContainer,g=this.endContainer;_recurConstructClonedTree=function(a,b,j,n){if(0>b)return b;var j=b-1,m=a[b].cloneNode(!1);a[b]==c&&(d=m);for(a[b]==g&&(e=m);0<=j&&xe.DOMFix.parentNode(a[j])==a[b];)j=this._recurConstructClonedTree(a,j,a[b],m,d,e);n.insertBefore(m,n.firstChild);return j};a[a.length]=xe.DOMFix.parentNode(a[a.length-1]);_recurConstructClonedTree(a,a.length-1,a[a.length-1],b);return{oStartContainer:d,oEndContainer:e}},
|
||||
cloneRange:function(){return this._copyRange(new xe.W3CDOMRange(this._document))},_copyRange:function(a){a.collapsed=this.collapsed;a.commonAncestorContainer=this.commonAncestorContainer;a.endContainer=this.endContainer;a.endOffset=this.endOffset;a.startContainer=this.startContainer;a.startOffset=this.startOffset;a._document=this._document;return a},collapse:function(a){a?(this.endContainer=this.startContainer,this.endOffset=this.startOffset):(this.startContainer=this.endContainer,this.startOffset=
|
||||
this.endOffset);this._updateRangeInfo()},compareBoundaryPoints:function(a,b){switch(a){case xe.W3CDOMRange.START_TO_START:return this._compareEndPoint(this.startContainer,this.startOffset,b.startContainer,b.startOffset);case xe.W3CDOMRange.START_TO_END:return this._compareEndPoint(this.endContainer,this.endOffset,b.startContainer,b.startOffset);case xe.W3CDOMRange.END_TO_END:return this._compareEndPoint(this.endContainer,this.endOffset,b.endContainer,b.endOffset);case xe.W3CDOMRange.END_TO_START:return this._compareEndPoint(this.startContainer,
|
||||
this.startOffset,b.endContainer,b.endOffset)}},_findBody:function(a){if(!a)return null;for(;a;){if("BODY"==a.tagName)return a;a=xe.DOMFix.parentNode(a)}return null},_compareEndPoint:function(a,b,d,f){if(!a||this._findBody(a)!=this._document.body)a=this._document.body,b=0;if(!d||this._findBody(d)!=this._document.body)d=this._document.body,f=0;var c=this._getCommonAncestorContainer(a,d);if(a!=c){for(;(oTmpNode=xe.DOMFix.parentNode(a))!=c;)a=oTmpNode;b=this._getPosIdx(a)+0.5}if(d!=c){for(;(oTmpNode=
|
||||
xe.DOMFix.parentNode(d))!=c;)d=oTmpNode;f=this._getPosIdx(d)+0.5}-1==f&&(f=b+1);return b<f?-1:b==f?0:1},_getCommonAncestorContainer:function(a,b){for(var d=b;a;){for(;d;){if(a==d)return a;d=xe.DOMFix.parentNode(d)}d=b;a=xe.DOMFix.parentNode(a)}return this._document.body},deleteContents:function(){if(!this.collapsed){this._splitTextEndNodesOfTheRange();var a=this._getNodesInRange();if(!(1>a.length)){for(var b=a[0].previousSibling;b&&this._isBlankTextNode(b);)b=b.previousSibling;var d,f;b||(d=xe.DOMFix.parentNode(a[0]),
|
||||
f=0);for(var c=0;c<a.length;c++){var g=a[c];g.firstChild||(d==g&&(f=this._getPosIdx(d),d=xe.DOMFix.parentNode(g)),xe.DOMFix.parentNode(g).removeChild(g))}b?"BODY"==b.tagName?this.setStartBefore(b):this.setStartAfter(b):this.setStart(d,f);this.collapse(!0)}}},extractContents:function(){var a=this.cloneContents();this.deleteContents();return a},insertNode:function(a){var b=null,d;"3"==this.startContainer.nodeType?(d=xe.DOMFix.parentNode(this.startContainer),b=this.startContainer.nodeValue.length<=this.startOffset?
|
||||
this.startOffset,b.endContainer,b.endOffset)}},_findBody:function(a){if(!a)return null;for(;a;){if("BODY"==a.tagName)return a;a=xe.DOMFix.parentNode(a)}return null},_compareEndPoint:function(a,b,d,e){if(!a||this._findBody(a)!=this._document.body)a=this._document.body,b=0;if(!d||this._findBody(d)!=this._document.body)d=this._document.body,e=0;var c=this._getCommonAncestorContainer(a,d);if(a!=c){for(;(oTmpNode=xe.DOMFix.parentNode(a))!=c;)a=oTmpNode;b=this._getPosIdx(a)+0.5}if(d!=c){for(;(oTmpNode=
|
||||
xe.DOMFix.parentNode(d))!=c;)d=oTmpNode;e=this._getPosIdx(d)+0.5}-1==e&&(e=b+1);return b<e?-1:b==e?0:1},_getCommonAncestorContainer:function(a,b){for(var d=b;a;){for(;d;){if(a==d)return a;d=xe.DOMFix.parentNode(d)}d=b;a=xe.DOMFix.parentNode(a)}return this._document.body},deleteContents:function(){if(!this.collapsed){this._splitTextEndNodesOfTheRange();var a=this._getNodesInRange();if(!(1>a.length)){for(var b=a[0].previousSibling;b&&this._isBlankTextNode(b);)b=b.previousSibling;var d,e;b||(d=xe.DOMFix.parentNode(a[0]),
|
||||
e=0);for(var c=0;c<a.length;c++){var g=a[c];g.firstChild||(d==g&&(e=this._getPosIdx(d),d=xe.DOMFix.parentNode(g)),xe.DOMFix.parentNode(g).removeChild(g))}b?"BODY"==b.tagName?this.setStartBefore(b):this.setStartAfter(b):this.setStart(d,e);this.collapse(!0)}}},extractContents:function(){var a=this.cloneContents();this.deleteContents();return a},insertNode:function(a){var b=null,d;"3"==this.startContainer.nodeType?(d=xe.DOMFix.parentNode(this.startContainer),b=this.startContainer.nodeValue.length<=this.startOffset?
|
||||
this.startContainer.nextSibling:this.startContainer.splitText(this.startOffset)):(d=this.startContainer,b=xe.DOMFix.childNodes(this.startContainer)[this.startOffset]);if(!b||!xe.DOMFix.parentNode(b))b=null;d.insertBefore(a,b);this.setStartBefore(a)},selectNode:function(a){this.setStartBefore(a);this.setEndAfter(a)},selectNodeContents:function(a){this.setStart(a,0);this.setEnd(a,xe.DOMFix.childNodes(a).length)},_endsNodeValidation:function(a,b){if(!a||this._findBody(a)!=this._document.body)throw Error("INVALID_NODE_TYPE_ERR oNode is not part of current document");
|
||||
if(3==a.nodeType){if(b>a.nodeValue.length)b=a.nodeValue.length}else if(b>xe.DOMFix.childNodes(a).length)b=xe.DOMFix.childNodes(a).length;return b},setEnd:function(a,b){b=this._endsNodeValidation(a,b);this.endContainer=a;this.endOffset=b;(!this.startContainer||-1!=this._compareEndPoint(this.startContainer,this.startOffset,this.endContainer,this.endOffset))&&this.collapse(!1);this._updateRangeInfo()},setEndAfter:function(a){if(!a)throw Error("INVALID_NODE_TYPE_ERR in setEndAfter");"BODY"==a.tagName?
|
||||
this.setEnd(a,xe.DOMFix.childNodes(a).length):this.setEnd(xe.DOMFix.parentNode(a),this._getPosIdx(a)+1)},setEndBefore:function(a){if(!a)throw Error("INVALID_NODE_TYPE_ERR in setEndBefore");"BODY"==a.tagName?this.setEnd(a,0):this.setEnd(xe.DOMFix.parentNode(a),this._getPosIdx(a))},setStart:function(a,b){b=this._endsNodeValidation(a,b);this.startContainer=a;this.startOffset=b;(!this.endContainer||-1!=this._compareEndPoint(this.startContainer,this.startOffset,this.endContainer,this.endOffset))&&this.collapse(!0);
|
||||
this._updateRangeInfo()},setStartAfter:function(a){if(!a)throw Error("INVALID_NODE_TYPE_ERR in setStartAfter");"BODY"==a.tagName?this.setStart(a,xe.DOMFix.childNodes(a).length):this.setStart(xe.DOMFix.parentNode(a),this._getPosIdx(a)+1)},setStartBefore:function(a){if(!a)throw Error("INVALID_NODE_TYPE_ERR in setStartBefore");"BODY"==a.tagName?this.setStart(a,0):this.setStart(xe.DOMFix.parentNode(a),this._getPosIdx(a))},surroundContents:function(a){a.appendChild(this.extractContents());this.insertNode(a);
|
||||
this.selectNode(a)},toString:function(){var a=this._document.createElement("DIV");a.appendChild(this.cloneContents());return a.textContent||a.innerText||""},_isBlankTextNode:function(a){return 3==a.nodeType&&""==a.nodeValue?!0:!1},_getPosIdx:function(a){for(var b=0,a=a.previousSibling;a;a=a.previousSibling)b++;return b},_updateRangeInfo:function(){this.startContainer?(this.collapsed=this._isCollapsed(this.startContainer,this.startOffset,this.endContainer,this.endOffset),this.commonAncestorContainer=
|
||||
this._getCommonAncestorContainer(this.startContainer,this.endContainer)):this.init(this._document)},_isCollapsed:function(a,b,d,f){var c=!1;if(a==d&&b==f)c=!0;else if(a=this._getActualStartNode(a,b),d=this._getActualEndNode(d,f),a=this._getNextNode(this._getPrevNode(a)),d=this._getPrevNode(this._getNextNode(d)),a&&d&&"BODY"!=d.tagName&&(this._getNextNode(d)==a||d==a&&this._isBlankTextNode(d)))c=!0;return c},_splitTextEndNodesOfTheRange:function(){var a=this._splitTextEndNodes({oStartContainer:this.startContainer,
|
||||
iStartOffset:this.startOffset,oEndContainer:this.endContainer,iEndOffset:this.endOffset});this.startContainer=a.oStartContainer;this.startOffset=a.iStartOffset;this.endContainer=a.oEndContainer;this.endOffset=a.iEndOffset},_splitTextEndNodes:function(a){a=this._splitStartTextNode(a);return a=this._splitEndTextNode(a)},_splitStartTextNode:function(a){var b=a.oStartContainer,d=a.iStartOffset,f=a.oEndContainer,c=a.iEndOffset;if(!b)return a;if(3!=b.nodeType)return a;if(0==d)return a;if(b.nodeValue.length<=
|
||||
d)return a;a=b.splitText(d);b==f&&(c-=d,f=a);return{oStartContainer:a,iStartOffset:0,oEndContainer:f,iEndOffset:c}},_splitEndTextNode:function(a){var b=a.oStartContainer,d=a.iStartOffset,c=a.oEndContainer,e=a.iEndOffset;if(!c)return a;if(3!=c.nodeType)return a;if(e>=c.nodeValue.length)return a;if(0==e)return a;c.splitText(e);return{oStartContainer:b,iStartOffset:d,oEndContainer:c,iEndOffset:e}},_getNodesInRange:function(){if(this.collapsed)return[];var a=this._getActualStartNode(this.startContainer,
|
||||
this._getCommonAncestorContainer(this.startContainer,this.endContainer)):this.init(this._document)},_isCollapsed:function(a,b,d,e){var c=!1;if(a==d&&b==e)c=!0;else if(a=this._getActualStartNode(a,b),d=this._getActualEndNode(d,e),a=this._getNextNode(this._getPrevNode(a)),d=this._getPrevNode(this._getNextNode(d)),a&&d&&"BODY"!=d.tagName&&(this._getNextNode(d)==a||d==a&&this._isBlankTextNode(d)))c=!0;return c},_splitTextEndNodesOfTheRange:function(){var a=this._splitTextEndNodes({oStartContainer:this.startContainer,
|
||||
iStartOffset:this.startOffset,oEndContainer:this.endContainer,iEndOffset:this.endOffset});this.startContainer=a.oStartContainer;this.startOffset=a.iStartOffset;this.endContainer=a.oEndContainer;this.endOffset=a.iEndOffset},_splitTextEndNodes:function(a){a=this._splitStartTextNode(a);return a=this._splitEndTextNode(a)},_splitStartTextNode:function(a){var b=a.oStartContainer,d=a.iStartOffset,e=a.oEndContainer,c=a.iEndOffset;if(!b)return a;if(3!=b.nodeType)return a;if(0==d)return a;if(b.nodeValue.length<=
|
||||
d)return a;a=b.splitText(d);b==e&&(c-=d,e=a);return{oStartContainer:a,iStartOffset:0,oEndContainer:e,iEndOffset:c}},_splitEndTextNode:function(a){var b=a.oStartContainer,d=a.iStartOffset,e=a.oEndContainer,c=a.iEndOffset;if(!e)return a;if(3!=e.nodeType)return a;if(c>=e.nodeValue.length)return a;if(0==c)return a;e.splitText(c);return{oStartContainer:b,iStartOffset:d,oEndContainer:e,iEndOffset:c}},_getNodesInRange:function(){if(this.collapsed)return[];var a=this._getActualStartNode(this.startContainer,
|
||||
this.startOffset),b=this._getActualEndNode(this.endContainer,this.endOffset);return this._getNodesBetween(a,b)},_getActualStartNode:function(a,b){var d=a;3==a.nodeType?b>=a.nodeValue.length?(d=this._getNextNode(a),"BODY"==d.tagName&&(d=null)):d=a:b<xe.DOMFix.childNodes(a).length?d=xe.DOMFix.childNodes(a)[b]:(d=this._getNextNode(a),"BODY"==d.tagName&&(d=null));return d},_getActualEndNode:function(a,b){var d=a;0==b?(d=this._getPrevNode(a),"BODY"==d.tagName&&(d=null)):d=3==a.nodeType?a:xe.DOMFix.childNodes(a)[b-
|
||||
1];return d},_getNextNode:function(a){return!a||"BODY"==a.tagName?this._document.body:a.nextSibling?a.nextSibling:this._getNextNode(xe.DOMFix.parentNode(a))},_getPrevNode:function(a){return!a||"BODY"==a.tagName?this._document.body:a.previousSibling?a.previousSibling:this._getPrevNode(xe.DOMFix.parentNode(a))},_getNodesBetween:function(a,b){var d=[];this._nNodesBetweenLen=0;if(!a||!b)return d;this._recurGetNextNodesUntil(a,b,d);return d},_recurGetNextNodesUntil:function(a,b,d){if(!a)return!1;if(!this._recurGetChildNodesUntil(a,
|
||||
b,d))return!1;for(var c=a.nextSibling;!c;){if(!(a=xe.DOMFix.parentNode(a)))return!1;d[this._nNodesBetweenLen++]=a;if(a==b)return!1;c=a.nextSibling}return this._recurGetNextNodesUntil(c,b,d)},_recurGetChildNodesUntil:function(a,b,d){if(!a)return!1;var c=!1,e=a;if(e.firstChild)for(e=e.firstChild;e;){if(!this._recurGetChildNodesUntil(e,b,d)){c=!0;break}e=e.nextSibling}d[this._nNodesBetweenLen++]=a;return c?!1:a==b?!1:!0}});xe.W3CDOMRange.START_TO_START=0;xe.W3CDOMRange.START_TO_END=1;xe.W3CDOMRange.END_TO_END=
|
||||
b,d))return!1;for(var e=a.nextSibling;!e;){if(!(a=xe.DOMFix.parentNode(a)))return!1;d[this._nNodesBetweenLen++]=a;if(a==b)return!1;e=a.nextSibling}return this._recurGetNextNodesUntil(e,b,d)},_recurGetChildNodesUntil:function(a,b,d){if(!a)return!1;var e=!1,c=a;if(c.firstChild)for(c=c.firstChild;c;){if(!this._recurGetChildNodesUntil(c,b,d)){e=!0;break}c=c.nextSibling}d[this._nNodesBetweenLen++]=a;return e?!1:a==b?!1:!0}});xe.W3CDOMRange.START_TO_START=0;xe.W3CDOMRange.START_TO_END=1;xe.W3CDOMRange.END_TO_END=
|
||||
2;xe.W3CDOMRange.END_TO_START=3;xe.XpressRange=c.Class({setWindow:function(a){this._window=a;this._document=a.document},$init:function(a){this.HUSKY_BOOMARK_START_ID_PREFIX="xpress_bookmark_start_";this.HUSKY_BOOMARK_END_ID_PREFIX="xpress_bookmark_end_";this.sBlockElement="P|DIV|LI|H[1-6]|PRE";this.sBlockContainer="BODY|TABLE|TH|TR|TD|UL|OL|BLOCKQUOTE|FORM";this.rxBlockElement=RegExp("^("+this.sBlockElement+")$");this.rxBlockContainer=RegExp("^("+this.sBlockContainer+")$");this.rxLineBreaker=RegExp("^("+
|
||||
this.sBlockElement+"|"+this.sBlockContainer+")$");this.setWindow(a);this.oSimpleSelection=new xe.SimpleSelection(this._window);this.selectionLoaded=this.oSimpleSelection.selectionLoaded;this.$super.$init(this._document)},select:function(){this.oSimpleSelection.selectRange(this)},setFromSelection:function(a){this.setRange(this.oSimpleSelection.getRangeAt(a))},setRange:function(a){this.setStart(a.startContainer,a.startOffset);this.setEnd(a.endContainer,a.endOffset)},setEndNodes:function(a,b){this.setEndAfter(b);
|
||||
this.setStartBefore(a)},splitTextAtBothEnds:function(){this._splitTextEndNodesOfTheRange()},getStartNode:function(){return this.collapsed?3==this.startContainer.nodeType?0==this.startOffset?null:this.startContainer.nodeValue.length<=this.startOffset?null:this.startContainer:null:3==this.startContainer.nodeType?this.startOffset>=this.startContainer.nodeValue.length?this._getNextNode(this.startContainer):this.startContainer:this.startOffset>=xe.DOMFix.childNodes(this.startContainer).length?this._getNextNode(this.startContainer):
|
||||
xe.DOMFix.childNodes(this.startContainer)[this.startOffset]},getEndNode:function(){return this.collapsed?this.getStartNode():3==this.endContainer.nodeType?0==this.endOffset?this._getPrevNode(this.endContainer):this.endContainer:0==this.endOffset?this._getPrevNode(this.endContainer):xe.DOMFix.childNodes(this.endContainer)[this.endOffset-1]},getNodeAroundRange:function(a,b){if(this.collapsed&&this.startContainer&&3==this.startContainer.nodeType)return this.startContainer;if(!this.collapsed||this.startContainer&&
|
||||
3==this.startContainer.nodeType)return this.getStartNode();var d,c,e;c=this.startOffset>=xe.DOMFix.childNodes(this.startContainer).length?this._getNextNode(this.startContainer):xe.DOMFix.childNodes(this.startContainer)[this.startOffset];d=0==this.endOffset?this._getPrevNode(this.endContainer):xe.DOMFix.childNodes(this.endContainer)[this.endOffset-1];a?(e=d,!e&&!b&&(e=c)):(e=c,!e&&!b&&(e=d));return e},_getXPath:function(a){for(var b="";a&&1==a.nodeType;)b="/"+a.tagName+"["+this._getPosIdx4XPath(a)+
|
||||
"]"+b,a=xe.DOMFix.parentNode(a);return b},_getPosIdx4XPath:function(a){for(var b=0,d=a.previousSibling;d;d=d.previousSibling)d.tagName==a.tagName&&b++;return b},_evaluateXPath:function(a,b){for(var a=a.substring(1,a.length-1),d=a.split(/\//),c=b.body,e=2;e<d.length&&c;e++){d[e].match(/([^\[]+)\[(\d+)/i);for(var g=RegExp.$1,h=RegExp.$2,c=xe.DOMFix.childNodes(c),l=[],j=c.length,p=0,n=0;n<j;n++)c[n].tagName==g&&(l[p++]=c[n]);c=l.length<h?null:l[h]}return c},_evaluateXPathBookmark:function(a){var b=a.nTextNodeIdx,
|
||||
d=a.nOffset,a=this._evaluateXPath(a.sXPath,this._document);if(-1<b&&a){for(var c=xe.DOMFix.childNodes(a),e=null;(e=c[b])&&3==e.nodeType&&e.nodeValue.length<d;)d-=e.nodeValue.length,b++;a=xe.DOMFix.childNodes(a)[b]}if(!a)a=this._document.body,d=0;return{elContainer:a,nOffset:d}},getXPathBookmark:function(){var a=-1,b={elContainer:this.startContainer,nOffset:this.startOffset},d=this.startContainer;3==d.nodeType&&(b=this._getFixedStartTextNode(),a=this._getPosIdx(b.elContainer),d=xe.DOMFix.parentNode(d));
|
||||
3==this.startContainer.nodeType)return this.getStartNode();var d,e,c;e=this.startOffset>=xe.DOMFix.childNodes(this.startContainer).length?this._getNextNode(this.startContainer):xe.DOMFix.childNodes(this.startContainer)[this.startOffset];d=0==this.endOffset?this._getPrevNode(this.endContainer):xe.DOMFix.childNodes(this.endContainer)[this.endOffset-1];a?(c=d,!c&&!b&&(c=e)):(c=e,!c&&!b&&(c=d));return c},_getXPath:function(a){for(var b="";a&&1==a.nodeType;)b="/"+a.tagName+"["+this._getPosIdx4XPath(a)+
|
||||
"]"+b,a=xe.DOMFix.parentNode(a);return b},_getPosIdx4XPath:function(a){for(var b=0,d=a.previousSibling;d;d=d.previousSibling)d.tagName==a.tagName&&b++;return b},_evaluateXPath:function(a,b){for(var a=a.substring(1,a.length-1),d=a.split(/\//),e=b.body,c=2;c<d.length&&e;c++){d[c].match(/([^\[]+)\[(\d+)/i);for(var g=RegExp.$1,h=RegExp.$2,e=xe.DOMFix.childNodes(e),k=[],j=e.length,n=0,m=0;m<j;m++)e[m].tagName==g&&(k[n++]=e[m]);e=k.length<h?null:k[h]}return e},_evaluateXPathBookmark:function(a){var b=a.nTextNodeIdx,
|
||||
d=a.nOffset,a=this._evaluateXPath(a.sXPath,this._document);if(-1<b&&a){for(var e=xe.DOMFix.childNodes(a),c=null;(c=e[b])&&3==c.nodeType&&c.nodeValue.length<d;)d-=c.nodeValue.length,b++;a=xe.DOMFix.childNodes(a)[b]}if(!a)a=this._document.body,d=0;return{elContainer:a,nOffset:d}},getXPathBookmark:function(){var a=-1,b={elContainer:this.startContainer,nOffset:this.startOffset},d=this.startContainer;3==d.nodeType&&(b=this._getFixedStartTextNode(),a=this._getPosIdx(b.elContainer),d=xe.DOMFix.parentNode(d));
|
||||
var a={sXPath:this._getXPath(d),nTextNodeIdx:a,nOffset:b.nOffset},b=-1,d={elContainer:this.endContainer,nOffset:this.endOffset},c=this.endContainer;3==c.nodeType&&(d=this._getFixedEndTextNode(),b=this._getPosIdx(d.elContainer),c=xe.DOMFix.parentNode(c));b={sXPath:this._getXPath(c),nTextNodeIdx:b,nOffset:d.nOffset};return[a,b]},moveToXPathBookmark:function(a){if(a){var b=this._evaluateXPathBookmark(a[0]),a=this._evaluateXPathBookmark(a[1]);if(b.elContainer&&a.elContainer)this.startContainer=b.elContainer,
|
||||
this.startOffset=b.nOffset,this.endContainer=a.elContainer,this.endOffset=a.nOffset}},_getFixedTextContainer:function(a,b){for(;a&&3==a.nodeType&&a.previousSibling&&3==a.previousSibling.nodeType;)b+=a.previousSibling.nodeValue.length,a=a.previousSibling;return{elContainer:a,nOffset:b}},_getFixedStartTextNode:function(){return this._getFixedTextContainer(this.startContainer,this.startOffset)},_getFixedEndTextNode:function(){return this._getFixedTextContainer(this.endContainer,this.endOffset)},placeStringBookmark:function(){var a=
|
||||
(new Date).getTime(),b=this.cloneRange();b.collapseToEnd();var d=this._document.createElement("A");d.id=this.HUSKY_BOOMARK_END_ID_PREFIX+a;b.insertNode(d);b=this.cloneRange();b.collapseToStart();d=this._document.createElement("A");d.id=this.HUSKY_BOOMARK_START_ID_PREFIX+a;b.insertNode(d);this.moveToBookmark(a);return a},cloneRange:function(){return this._copyRange(new xe.XpressRange(this._window))},moveToBookmark:function(a){"object"!=typeof a?this.moveToStringBookmark(a):this.moveToXPathBookmark(a)},
|
||||
moveToStringBookmark:function(a){var b=this._document.getElementById(this.HUSKY_BOOMARK_START_ID_PREFIX+a),a=this._document.getElementById(this.HUSKY_BOOMARK_END_ID_PREFIX+a);b&&a&&(this.setEndBefore(a),this.setStartAfter(b))},removeStringBookmark:function(a){var b=this._document.getElementById(this.HUSKY_BOOMARK_START_ID_PREFIX+a),a=this._document.getElementById(this.HUSKY_BOOMARK_END_ID_PREFIX+a);b&&xe.DOMFix.parentNode(b).removeChild(b);a&&xe.DOMFix.parentNode(a).removeChild(a)},collapseToStart:function(){this.collapse(!0)},
|
||||
collapseToEnd:function(){this.collapse(!1)},createAndInsertNode:function(){tmpNode=this._document.createElement(tagName);this.insertNode(tmpNode);return tmpNode},getNodes:function(a,b){a&&this._splitTextEndNodesOfTheRange();var d=this._getNodesInRange(),c=[];if(!b)return d;for(var e=0;e<d.length;e++)b(d[e])&&(c[c.length]=d[e]);return c},getTextNodes:function(a){return this.getNodes(a,function(a){return 3==a.nodeType&&"\n"!=a.nodeValue&&""!=a.nodeValue?!0:!1})},surroundContentsWithNewNode:function(a){a=
|
||||
collapseToEnd:function(){this.collapse(!1)},createAndInsertNode:function(){tmpNode=this._document.createElement(tagName);this.insertNode(tmpNode);return tmpNode},getNodes:function(a,b){a&&this._splitTextEndNodesOfTheRange();var d=this._getNodesInRange(),c=[];if(!b)return d;for(var f=0;f<d.length;f++)b(d[f])&&(c[c.length]=d[f]);return c},getTextNodes:function(a){return this.getNodes(a,function(a){return 3==a.nodeType&&"\n"!=a.nodeValue&&""!=a.nodeValue?!0:!1})},surroundContentsWithNewNode:function(a){a=
|
||||
this._document.createElement(a);this.surroundContents(a);return a},isRangeinRange:function(a){var b=this.compareBoundaryPoints(this.START_TO_START,a),d=this.compareBoundaryPoints(this.START_TO_END,a),c=this.compareBoundaryPoints(this.END_TO_START,a),a=this.compareBoundaryPoints(this.END_TO_END,a);return 0>=b&&0<=a?!0:bIncludePartlyIncluded?1==d?!1:-1==c?!1:!0:!1},isNodeInRange:function(a,b,d){var c=new xe.XpressRange(this._window);d&&a.firstChild?(c.setStartBefore(a.firstChild),c.setEndAfter(a.lastChild)):
|
||||
c.selectNode(a);return isRangeInRange(c,b)},pasteHTML:function(a){if(""==a)this.deleteContents();else{var b=this._document.createElement("DIV");b.innerHTML=a;for(var a=b.firstChild,d=b.lastChild,c=this.cloneRange(),e=c.placeStringBookmark();b.lastChild;)this.insertNode(b.lastChild);this.setEndNodes(a,d);c.moveToBookmark(e);c.deleteContents();c.removeStringBookmark(e)}},toString:function(){this.toString=xe.W3CDOMRange.prototype.toString;return this.toString()},toHTMLString:function(){var a=this._document.createElement("DIV");
|
||||
a.appendChild(this.cloneContents());return a.innerHTML},findAncestorByTagName:function(a){for(var b=this.commonAncestorContainer;b&&b.tagName!=a;)b=xe.DOMFix.parentNode(b);return b},selectNodeContents:function(a){if(a){var b=a.firstChild?a.firstChild:a,a=a.lastChild?a.lastChild:a;3==b.nodeType?this.setStart(b,0):this.setStartBefore(b);3==a.nodeType?this.setEnd(a,a.nodeValue.length):this.setEndAfter(a)}},styleRange:function(a,b,d){d=this._getStyleParentNodes(d);if(!(1>d.length)){for(var f,e,g=0;g<
|
||||
d.length;g++){for(var h in a)f=h,e=a[f],"string"==typeof e&&(d[g].style[f]=e);if(b)for(h in b)f=h,e=b[f],"string"==typeof e&&("class"==f?c(d[g]).addClass(e):d[g].setAttribute(f,e))}this.setStartBefore(d[0]);this.setEndAfter(d[d.length-1])}},_getStyleParentNodes:function(a){this._splitTextEndNodesOfTheRange();for(var b=this.getStartNode(),d=this.getEndNode(),f=this._getNodesInRange(),e=[],g=0,h,l,j,p,n,k=f.length,m=c(f).filter(function(){return!!this.childNodes.length}),o=0;o<k;o++)if((h=f[o])&&!(3!=
|
||||
h.nodeType||""==h.nodeValue)){n=xe.DOMFix.parentNode(h);if("SPAN"==n.tagName&&(l=this._getVeryFirstRealChild(n),j=l==h?1:m.indexOf(l),-1!=j&&(l=this._getVeryLastRealChild(n),p=l==h?1:m.indexOf(l)),-1!=j&&-1!=p)){e[g++]=n;continue}l=this._document.createElement("SPAN");n.insertBefore(l,h);l.appendChild(h);e[g++]=l;a&&l.setAttribute(a,"true")}this.setStartBefore(b);this.setEndAfter(d);return e},_getVeryFirstChild:function(a){return a.firstChild?this._getVeryFirstChild(a.firstChild):a},_getVeryLastChild:function(a){return a.lastChild?
|
||||
c.selectNode(a);return isRangeInRange(c,b)},pasteHTML:function(a){if(""==a)this.deleteContents();else{var b=this._document.createElement("DIV");b.innerHTML=a;for(var a=b.firstChild,d=b.lastChild,c=this.cloneRange(),f=c.placeStringBookmark();b.lastChild;)this.insertNode(b.lastChild);this.setEndNodes(a,d);c.moveToBookmark(f);c.deleteContents();c.removeStringBookmark(f)}},toString:function(){this.toString=xe.W3CDOMRange.prototype.toString;return this.toString()},toHTMLString:function(){var a=this._document.createElement("DIV");
|
||||
a.appendChild(this.cloneContents());return a.innerHTML},findAncestorByTagName:function(a){for(var b=this.commonAncestorContainer;b&&b.tagName!=a;)b=xe.DOMFix.parentNode(b);return b},selectNodeContents:function(a){if(a){var b=a.firstChild?a.firstChild:a,a=a.lastChild?a.lastChild:a;3==b.nodeType?this.setStart(b,0):this.setStartBefore(b);3==a.nodeType?this.setEnd(a,a.nodeValue.length):this.setEndAfter(a)}},styleRange:function(a,b,d){d=this._getStyleParentNodes(d);if(!(1>d.length)){for(var e,f,g=0;g<
|
||||
d.length;g++){for(var h in a)e=h,f=a[e],"string"==typeof f&&(d[g].style[e]=f);if(b)for(h in b)e=h,f=b[e],"string"==typeof f&&("class"==e?c(d[g]).addClass(f):d[g].setAttribute(e,f))}this.setStartBefore(d[0]);this.setEndAfter(d[d.length-1])}},_getStyleParentNodes:function(a){this._splitTextEndNodesOfTheRange();for(var b=this.getStartNode(),d=this.getEndNode(),e=this._getNodesInRange(),f=[],g=0,h,k,j,n,m,q=e.length,o=c(e).filter(function(){return!!this.childNodes.length}),l=0;l<q;l++)if((h=e[l])&&!(3!=
|
||||
h.nodeType||""==h.nodeValue)){m=xe.DOMFix.parentNode(h);if("SPAN"==m.tagName&&(k=this._getVeryFirstRealChild(m),j=k==h?1:o.indexOf(k),-1!=j&&(k=this._getVeryLastRealChild(m),n=k==h?1:o.indexOf(k)),-1!=j&&-1!=n)){f[g++]=m;continue}k=this._document.createElement("SPAN");m.insertBefore(k,h);k.appendChild(h);f[g++]=k;a&&k.setAttribute(a,"true")}this.setStartBefore(b);this.setEndAfter(d);return f},_getVeryFirstChild:function(a){return a.firstChild?this._getVeryFirstChild(a.firstChild):a},_getVeryLastChild:function(a){return a.lastChild?
|
||||
this._getVeryLastChild(a.lastChild):a},_getFirstRealChild:function(a){for(a=a.firstChild;a&&3==a.nodeType&&""==a.nodeValue;)a=a.nextSibling;return a},_getLastRealChild:function(a){for(a=a.lastChild;a&&3==a.nodeType&&""==a.nodeValue;)a=a.previousSibling;return a},_getVeryFirstRealChild:function(a){var b=this._getFirstRealChild(a);return b?this._getVeryFirstRealChild(b):a},_getVeryLastRealChild:function(a){var b=this._getLastRealChild(a);return b?this._getVeryLastChild(b):a},_getLineStartInfo:function(a){function b(a){a&&
|
||||
!c&&(l.test(a.tagName)?(g=a,c=e,h=!0):(e=a,d(a.previousSibling),c||b(xe.DOMFix.parentNode(a))))}function d(a){if(a&&!c)if(l.test(a.tagName))g=a,c=e,h=!1;else{if(a.firstChild&&"TABLE"!=a.tagName)for(var b=a.lastChild;b&&!c;)d(b),b=b.previousSibling;else e=a;c||d(a.previousSibling)}}var c=null,e=a,g=a,h=!0,l=this.rxLineBreaker;b(a);return{oNode:c,oLineBreaker:g,bParentBreak:h}},_getLineEndInfo:function(a){function b(a){a&&!c&&(l.test(a.tagName)?(g=a,c=e,h=!0):(e=a,d(a.nextSibling),c||b(xe.DOMFix.parentNode(a))))}
|
||||
function d(a){if(a&&!c)if(l.test(a.tagName))g=a,c=e,h=!1;else{if(a.firstChild&&"TABLE"!=a.tagName)for(var b=a.firstChild;b&&!c;)d(b),b=b.nextSibling;else e=a;c||d(a.nextSibling)}}var c=null,e=a,g=a,h=!0,l=this.rxLineBreaker;b(a);return{oNode:c,oLineBreaker:g,bParentBreak:h}},getLineInfo:function(){var a=this.getStartNode(),b=this.getEndNode();a||(a=this.getNodeAroundRange(!0,!0));b||(b=this.getNodeAroundRange(!0,!0));var a=this._getLineStartInfo(a),d=a.oNode,b=this._getLineEndInfo(b),c=b.oNode,d=
|
||||
!c&&(k.test(a.tagName)?(g=a,c=f,h=!0):(f=a,d(a.previousSibling),c||b(xe.DOMFix.parentNode(a))))}function d(a){if(a&&!c)if(k.test(a.tagName))g=a,c=f,h=!1;else{if(a.firstChild&&"TABLE"!=a.tagName)for(var b=a.lastChild;b&&!c;)d(b),b=b.previousSibling;else f=a;c||d(a.previousSibling)}}var c=null,f=a,g=a,h=!0,k=this.rxLineBreaker;b(a);return{oNode:c,oLineBreaker:g,bParentBreak:h}},_getLineEndInfo:function(a){function b(a){a&&!c&&(k.test(a.tagName)?(g=a,c=f,h=!0):(f=a,d(a.nextSibling),c||b(xe.DOMFix.parentNode(a))))}
|
||||
function d(a){if(a&&!c)if(k.test(a.tagName))g=a,c=f,h=!1;else{if(a.firstChild&&"TABLE"!=a.tagName)for(var b=a.firstChild;b&&!c;)d(b),b=b.nextSibling;else f=a;c||d(a.nextSibling)}}var c=null,f=a,g=a,h=!0,k=this.rxLineBreaker;b(a);return{oNode:c,oLineBreaker:g,bParentBreak:h}},getLineInfo:function(){var a=this.getStartNode(),b=this.getEndNode();a||(a=this.getNodeAroundRange(!0,!0));b||(b=this.getNodeAroundRange(!0,!0));var a=this._getLineStartInfo(a),d=a.oNode,b=this._getLineEndInfo(b),c=b.oNode,d=
|
||||
this._compareEndPoint(xe.DOMFix.parentNode(d),this._getPosIdx(d),this.endContainer,this.endOffset),c=this._compareEndPoint(xe.DOMFix.parentNode(c),this._getPosIdx(c)+1,this.startContainer,this.startOffset);0>=d&&0<=c||(a=this.getNodeAroundRange(!1,!0),b=this.getNodeAroundRange(!1,!0),a=this._getLineStartInfo(a),b=this._getLineEndInfo(b));return{oStart:a,oEnd:b}}}).extend(xe.W3CDOMRange);xe.SimpleSelection=function(a){this.init=function(a){this._window=a||window;this._document=this._window.document};
|
||||
this.init(a);c.browser.msie?xe.SimpleSelectionImpl_IE.apply(this):xe.SimpleSelectionImpl_FF.apply(this);this.selectRange=function(a){this.selectNone();this.addRange(a)};this.selectionLoaded=!0;if(!this._oSelection)this.selectionLoaded=!1};xe.SimpleSelectionImpl_FF=function(){this._oSelection=this._window.getSelection();this.getRangeAt=function(a){try{var b=this._oSelection.getRangeAt(a||0)}catch(d){return new xe.W3CDOMRange(this._document)}return this._FFRange2W3CRange(b)};this.addRange=function(a){this._oSelection.addRange(this._W3CRange2FFRange(a))};
|
||||
this.selectNone=function(){this._oSelection.removeAllRanges()};this._FFRange2W3CRange=function(a){var b=new xe.W3CDOMRange(this._document);b.setStart(a.startContainer,a.startOffset);b.setEnd(a.endContainer,a.endOffset);return b};this._W3CRange2FFRange=function(a){var b=this._document.createRange();b.setStart(a.startContainer,a.startOffset);b.setEnd(a.endContainer,a.endOffset);return b}};xe.SimpleSelectionImpl_IE=function(){this._oSelection=this._document.selection;this.getRangeAt=function(a){a=a||
|
||||
0;if("Control"==this._oSelection.type){var b=new xe.W3CDOMRange(this._document),d=this._oSelection.createRange().item(a);if(!d||d.ownerDocument!=this._document)return b;b.selectNode(d);return b}d=this._oSelection.createRangeCollection().item(a).parentElement();return!d||d.ownerDocument!=this._document?b=new xe.W3CDOMRange(this._document):this._IERange2W3CRange(this._oSelection.createRangeCollection().item(a))};this.addRange=function(a){this._W3CRange2IERange(a).select()};this.selectNone=function(){this._oSelection.empty()};
|
||||
this._W3CRange2IERange=function(a){var b=this._getIERangeAt(a.startContainer,a.startOffset),a=this._getIERangeAt(a.endContainer,a.endOffset);b.setEndPoint("EndToEnd",a);return b};this._getIERangeAt=function(a,b){var d=this._document.body.createTextRange(),c=this._getSelectableNodeAndOffsetForIE(a,b),e=c.iOffsetForIE;d.moveToElementText(c.oSelectableNodeForIE);d.collapse(c.bCollapseToStart);d.moveStart("character",e);return d};this._getSelectableNodeAndOffsetForIE=function(a,b){var d=this._document.body.createTextRange(),
|
||||
c=null,e=null,g=0;3==a.nodeType?(c=xe.DOMFix.parentNode(a),e=xe.DOMFix.childNodes(c),g=e.length):(c=a,e=xe.DOMFix.childNodes(c),g=b);for(var h=null,l=0,j=!0,k=0;k<g;k++)if(h=e[k],3==h.nodeType){if(h==a)break;l+=h.nodeValue.length}else d.moveToElementText(h),c=h,l=0,j=!1;3==a.nodeType&&(l+=b);return{oSelectableNodeForIE:c,iOffsetForIE:l,bCollapseToStart:j}};this._IERange2W3CRange=function(a){var b=new xe.W3CDOMRange(this._document),d=null,d=null,d=a.duplicate();d.collapse(!0);d=this._getW3CContainerAndOffset(d,
|
||||
!0);b.setStart(d.oContainer,d.iOffset);d=a.duplicate();d.collapse(!0);d.isEqual(a)?b.collapse(!0):(d=a.duplicate(),d.collapse(!1),d=this._getW3CContainerAndOffset(d),b.setEnd(d.oContainer,d.iOffset));return b};this._getW3CContainerAndOffset=function(a,b){for(var d=a.parentElement(),c=-1,e=this._document.body.createTextRange(),g=xe.DOMFix.childNodes(d),c=null,h=0,h=0;h<g.length;h++)if(3!=g[h].nodeType){e.moveToElementText(g[h]);if(0<=e.compareEndPoints("StartToStart",a))break;c=g[h]}if(0!=h&&3==g[h-
|
||||
1].nodeType){g=this._document.body.createTextRange();e=null;c?(g.moveToElementText(c),g.collapse(!1),e=c.nextSibling):(g.moveToElementText(d),g.collapse(!0),e=d.firstChild);d=a.duplicate();d.setEndPoint("StartToStart",g);for(c=d.text.length;c>e.nodeValue.length&&e.nextSibling;)c-=e.nodeValue.length,e=e.nextSibling;if(b&&e.nextSibling&&3==e.nextSibling.nodeType&&c==e.nodeValue.length)c-=e.nodeValue.length,e=e.nextSibling;d=e}else d=a.parentElement(),c=h;return{oContainer:d,iOffset:c}}};xe.DOMFix=new (c.Class({$init:function(){c.browser.msie||
|
||||
this._W3CRange2IERange=function(a){var b=this._getIERangeAt(a.startContainer,a.startOffset),a=this._getIERangeAt(a.endContainer,a.endOffset);b.setEndPoint("EndToEnd",a);return b};this._getIERangeAt=function(a,b){var d=this._document.body.createTextRange(),c=this._getSelectableNodeAndOffsetForIE(a,b),f=c.iOffsetForIE;d.moveToElementText(c.oSelectableNodeForIE);d.collapse(c.bCollapseToStart);d.moveStart("character",f);return d};this._getSelectableNodeAndOffsetForIE=function(a,b){var d=this._document.body.createTextRange(),
|
||||
c=null,f=null,g=0;3==a.nodeType?(c=xe.DOMFix.parentNode(a),f=xe.DOMFix.childNodes(c),g=f.length):(c=a,f=xe.DOMFix.childNodes(c),g=b);for(var h=null,k=0,j=!0,n=0;n<g;n++)if(h=f[n],3==h.nodeType){if(h==a)break;k+=h.nodeValue.length}else d.moveToElementText(h),c=h,k=0,j=!1;3==a.nodeType&&(k+=b);return{oSelectableNodeForIE:c,iOffsetForIE:k,bCollapseToStart:j}};this._IERange2W3CRange=function(a){var b=new xe.W3CDOMRange(this._document),d=null,d=null,d=a.duplicate();d.collapse(!0);d=this._getW3CContainerAndOffset(d,
|
||||
!0);b.setStart(d.oContainer,d.iOffset);d=a.duplicate();d.collapse(!0);d.isEqual(a)?b.collapse(!0):(d=a.duplicate(),d.collapse(!1),d=this._getW3CContainerAndOffset(d),b.setEnd(d.oContainer,d.iOffset));return b};this._getW3CContainerAndOffset=function(a,b){for(var d=a.parentElement(),c=-1,f=this._document.body.createTextRange(),g=xe.DOMFix.childNodes(d),c=null,h=0,h=0;h<g.length;h++)if(3!=g[h].nodeType){f.moveToElementText(g[h]);if(0<=f.compareEndPoints("StartToStart",a))break;c=g[h]}if(0!=h&&3==g[h-
|
||||
1].nodeType){g=this._document.body.createTextRange();f=null;c?(g.moveToElementText(c),g.collapse(!1),f=c.nextSibling):(g.moveToElementText(d),g.collapse(!0),f=d.firstChild);d=a.duplicate();d.setEndPoint("StartToStart",g);for(c=d.text.length;c>f.nodeValue.length&&f.nextSibling;)c-=f.nodeValue.length,f=f.nextSibling;if(b&&f.nextSibling&&3==f.nextSibling.nodeType&&c==f.nodeValue.length)c-=f.nodeValue.length,f=f.nextSibling;d=f}else d=a.parentElement(),c=h;return{oContainer:d,iOffset:c}}};xe.DOMFix=new (c.Class({$init:function(){c.browser.msie||
|
||||
c.browser.opera?(this.childNodes=this._childNodes_Fix,this.parentNode=this._parentNode_Fix):(this.childNodes=this._childNodes_Native,this.parentNode=this._parentNode_Native)},_parentNode_Native:function(a){return a.parentNode},_parentNode_Fix:function(a){if(!a)return a;for(;a.previousSibling;)a=a.previousSibling;return a.parentNode},_childNodes_Native:function(a){return a.childNodes},_childNodes_Fix:function(a){var b=null,d=0;if(a){b=[];for(a=a.firstChild;a;)b[d++]=a,a=a.nextSibling}return b}}));
|
||||
xe.DraggableLayer=c.Class({$init:function(a,b){this.oOptions=c.extend({bModal:"false",oHandle:a,iMinX:-999999,iMinY:-999999,iMaxX:999999,iMaxY:999999},b);this.oHandle=this.oOptions.oHandle;a.style.display="block";a.style.position="absolute";a.style.zIndex="9999";this.aBasePosition=this.getBaseOffset(a);a.style.top=this.toInt(c(a).offset().top)-this.aBasePosition.top+"px";a.style.left=this.toInt(c(a).offset().left)-this.aBasePosition.left+"px";this.$FnMouseDown=c.fnBind(this._mousedown,this,a);this.$FnMouseMove=
|
||||
c.fnBind(this._mousemove,this,a);this.$FnMouseUp=c.fnBind(this._mouseup,this,a);c(this.oHandle).bind("mousedown",this.$FnMouseDown)},_mousedown:function(a,b){if("INPUT"!=b.target.tagName)this.MouseOffsetY=b.pageY-this.toInt(a.style.top)-this.aBasePosition.top,this.MouseOffsetX=b.pageX-this.toInt(a.style.left)-this.aBasePosition.left,c(a).bind("mousemove",this.$FnMouseMove),c(a).bind("mouseup",this.$FnMouseUp)},_mousemove:function(a,b){var d=b.pageY-this.MouseOffsetY-this.aBasePosition.top,c=b.pageX-
|
||||
this.MouseOffsetX-this.aBasePosition.left;if(d<this.oOptions.iMinY)d=this.oOptions.iMinY;if(d>this.oOptions.iMaxY)d=this.oOptions.iMaxY;if(c<this.oOptions.iMinX)c=this.oOptions.iMinX;if(c>this.oOptions.iMaxX)c=this.oOptions.iMaxX;a.style.top=d+"px";a.style.left=c+"px"},_mouseup:function(a){c(a).unbind("mousemove",this.$FnMouseMove);c(a).unbind("mouseup",this.$FnMouseUp)},toInt:function(a){return parseInt(a)||0},findNonStatic:function(a){return!a?null:"BODY"==a.tagName?a:c(a).css("position").match(/absolute|relative/i)?
|
||||
a:this.findNonStatic(a.offsetParent)},getBaseOffset:function(a){a=this.findNonStatic(a.offsetParent);a=c(a).offset();return{top:a.top,left:a.left}}});xe.CorePlugin=c.Class({name:"CorePlugin",$init:function(a){this.funcOnReady=a},$AFTER_MSG_APP_READY:function(){this.oApp.exec("EXEC_ON_READY_FUNCTION",[])},$ON_ADD_APP_PROPERTY:function(a,b){this.oApp[a]=b},$ON_REGISTER_BROWSER_EVENT:function(a,b,d,c,e){this.oApp.registerBrowserEvent(a,b,d,c,e)},$ON_DISABLE_COMMAND:function(a){this.oApp.disableCommand(a,
|
||||
a:this.findNonStatic(a.offsetParent)},getBaseOffset:function(a){a=this.findNonStatic(a.offsetParent);a=c(a).offset();return{top:a.top,left:a.left}}});xe.CorePlugin=c.Class({name:"CorePlugin",$init:function(a){this.funcOnReady=a},$AFTER_MSG_APP_READY:function(){this.oApp.exec("EXEC_ON_READY_FUNCTION",[])},$ON_ADD_APP_PROPERTY:function(a,b){this.oApp[a]=b},$ON_REGISTER_BROWSER_EVENT:function(a,b,d,c,f){this.oApp.registerBrowserEvent(a,b,d,c,f)},$ON_DISABLE_COMMAND:function(a){this.oApp.disableCommand(a,
|
||||
!0)},$ON_ENABLE_COMMAND:function(a){this.oApp.disableCommand(a,!1)},$ON_EXEC_ON_READY_FUNCTION:function(){"function"==typeof this.funcOnReady&&this.funcOnReady()}});xe.Utils=c.Class({name:"Utils",$init:function(){if(c.browser.msie&&6==c.browser.nVersion)try{document.execCommand("BackgroundImageCache",!1,!0)}catch(a){}},$ON_ATTACH_HOVER_EVENTS:function(a,b){b=b||"hover";a&&c(a).hover(function(){c(this).addClass(b)},function(){c(this).removeClass(b)})}});xe.XpressRangeManager=c.Class({name:"XpressRangeManager",
|
||||
oWindow:null,$init:function(a){this.oWindow=a||window},$BEFORE_MSG_APP_READY:function(){if(this.oWindow&&"IFRAME"==this.oWindow.tagName)this.oWindow=this.oWindow.contentWindow;this.oApp.exec("ADD_APP_PROPERTY",["getSelection",c.fnBind(this.getSelection,this)]);this.oApp.exec("ADD_APP_PROPERTY",["getEmptySelection",c.fnBind(this.getEmptySelection,this)])},$ON_SET_EDITING_WINDOW:function(a){this.oWindow=a},getEmptySelection:function(){return new xe.XpressRange(this.oWindow)},getSelection:function(){this.oApp.exec("RESTORE_IE_SELECTION",
|
||||
[]);var a=this.getEmptySelection();try{a.setFromSelection()}catch(b){}return a}});xe.Hotkey=c.Class({name:"Hotkey",storage:{},keyhash:{},$init:function(){this.storage={};this.keyhash={backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,meta:224,esc:27,space:32,pageup:33,pagedown:34,end:35,home:36,left:37,up:38,right:39,down:40,del:46,comma:188,period:190,slash:191,hyphen:109,equal:61};if(c.browser.msie||c.browser.safari)this.keyhash.hyphen=189,this.keyhash.equal=187,this.keyhash.meta=91},$ON_MSG_APP_READY:function(){c(this.oApp.getWYSIWYGDocument()||
|
||||
document).keydown(c.fnBind(this.keydown,this))},$ON_REGISTER_HOTKEY:function(a,b,d){d||(d=[]);b=c.fnBind(this.oApp.exec,this.oApp,b,d);a=this.normalize(a);if(!a)return!1;this.add(a,b)},add:function(a,b){"undefined"==typeof this.storage[a]?this.storage[a]=[b]:this.storage[a].push(b)},keydown:function(a){var b=[],d=this.keyhash;if(!(0<=c.inArray(a.keyCode,[d.shift,d.ctrl,d.alt,d.meta]))&&(a.shiftKey&&b.push("shift"),a.altKey&&b.push("alt"),a.ctrlKey&&b.push("ctrl"),a.metaKey&&b.push("meta"),b.length&&
|
||||
(1==b.length&&a.metaKey&&(b=["ctrl","meta"]),b.push(a.keyCode),b=b.join("+"),this.storage[b])))return c.each(this.storage[b],function(){this()}),!1},normalize:function(a){var b,d,f,e,g,a=(a||"").toLowerCase().split("+");b=d=f=e=g=!1;c.each(a,function(){var a=""+this;switch(a){case "shift":b=!0;case "alt":f=!0;case "ctrl":d=!0;case "meta":e=!0;default:g=a}});if(!g)return"";a=[];b&&a.push("shift");f&&a.push("alt");d&&a.push("ctrl");(e||d&&!b&&!f)&&a.push("meta");a.push(this.keyhash[g]||g.toUpperCase().charCodeAt(0));
|
||||
(1==b.length&&a.metaKey&&(b=["ctrl","meta"]),b.push(a.keyCode),b=b.join("+"),this.storage[b])))return c.each(this.storage[b],function(){this()}),!1},normalize:function(a){var b,d,e,f,g,a=(a||"").toLowerCase().split("+");b=d=e=f=g=!1;c.each(a,function(){var a=""+this;switch(a){case "shift":b=!0;case "alt":e=!0;case "ctrl":d=!0;case "meta":f=!0;default:g=a}});if(!g)return"";a=[];b&&a.push("shift");e&&a.push("alt");d&&a.push("ctrl");(f||d&&!b&&!e)&&a.push("meta");a.push(this.keyhash[g]||g.toUpperCase().charCodeAt(0));
|
||||
return a.join("+")}});xe.DialogLayerManager=c.Class({name:"DialogLayerManager",aMadeDraggable:null,aOpenedLayers:null,$init:function(){this.aMadeDraggable=[];this.aOpenedLayers=[]},$ON_SHOW_DIALOG_LAYER:function(a,b){a=c.$(a);b=c.$(b)||!1;if(a&&-1==c.inArray(a,this.aOpenedLayers))this.oApp.exec("POSITION_DIALOG_LAYER",[a]),this.aOpenedLayers[this.aOpenedLayers.length]=a,-1==c.inArray(a,this.aMadeDraggable)?(new xe.DraggableLayer(a,{bModal:b,iMinY:0}),this.aMadeDraggable[this.aMadeDraggable.length]=
|
||||
a):a.style.display="block"},$ON_HIDE_LAST_DIALOG_LAYER:function(){this.oApp.exec("HIDE_DIALOG_LAYER",[this.aOpenedLayers[this.aOpenedLayers.length-1]])},$ON_HIDE_ALL_DIALOG_LAYER:function(){for(var a=this.aOpenedLayers.length-1;0<=a;a--)this.oApp.exec("HIDE_DIALOG_LAYER",[this.aOpenedLayers[a]])},$ON_HIDE_DIALOG_LAYER:function(a){if(a=c.$(a))a.style.display="none";this.aOpenedLayers=c.grep(this.aOpenedLayers,function(b){return b!=a})},$ON_SET_DIALOG_LAYER_POSITION:function(a,b,d){a.style.top=b;a.style.left=
|
||||
d}});xe.ActiveLayerManager=c.Class({name:"ActiveLayerManager",oCurrentLayer:null,$ON_TOGGLE_ACTIVE_LAYER:function(a,b,d,c,e){a==this.oCurrentLayer?this.oApp.exec("HIDE_ACTIVE_LAYER",[]):(this.oApp.exec("SHOW_ACTIVE_LAYER",[a,c,e]),b&&this.oApp.exec(b,d))},$ON_SHOW_ACTIVE_LAYER:function(a,b,d){a=c.$(a);this.sOnCloseCmd=b;this.aOnCloseParam=d;if(a!=this.oCurrentLayer)this.oApp.exec("HIDE_ACTIVE_LAYER",[]),a.style.display="block",this.oCurrentLayer=a},$ON_HIDE_ACTIVE_LAYER:function(){var a=this.oCurrentLayer;
|
||||
d}});xe.ActiveLayerManager=c.Class({name:"ActiveLayerManager",oCurrentLayer:null,$ON_TOGGLE_ACTIVE_LAYER:function(a,b,d,c,f){a==this.oCurrentLayer?this.oApp.exec("HIDE_ACTIVE_LAYER",[]):(this.oApp.exec("SHOW_ACTIVE_LAYER",[a,c,f]),b&&this.oApp.exec(b,d))},$ON_SHOW_ACTIVE_LAYER:function(a,b,d){a=c.$(a);this.sOnCloseCmd=b;this.aOnCloseParam=d;if(a!=this.oCurrentLayer)this.oApp.exec("HIDE_ACTIVE_LAYER",[]),a.style.display="block",this.oCurrentLayer=a},$ON_HIDE_ACTIVE_LAYER:function(){var a=this.oCurrentLayer;
|
||||
if(a)a.style.display="none",this.oCurrentLayer=null,this.sOnCloseCmd&&this.oApp.exec(this.sOnCloseCmd,this.aOnCloseParam)},$ON_HIDE_CURRENT_ACTIVE_LAYER:function(){this.oApp.exec("HIDE_ACTIVE_LAYER",[])},$ON_EVENT_EDITING_AREA_KEYDOWN:function(){this.oApp.exec("HIDE_ACTIVE_LAYER",[])},$ON_EVENT_EDITING_AREA_MOUSEDOWN:function(){this.oApp.exec("HIDE_ACTIVE_LAYER",[])}});xe.StringConverterManager=c.Class({name:"StringConverterManager",oConverters:null,$init:function(){this.oConverters={}},$BEFORE_MSG_APP_READY:function(){this.oApp.exec("ADD_APP_PROPERTY",
|
||||
["applyConverter",c.fnBind(this.applyConverter,this)]);this.oApp.exec("ADD_APP_PROPERTY",["addConverter",c.fnBind(this.addConverter,this)])},applyConverter:function(a,b){var d=this.oConverters[a];if(!d)return b;for(var c=0;c<d.length;c++)b=d[c](b);return b},addConverter:function(a,b){this.oConverters[a]||(this.oConverters[a]=[]);this.oConverters[a][this.oConverters[a].length]=b}});xe.MessageManager=c.Class({name:"MessageManager",oMessageMap:null,$init:function(a){this.oMessageMap=a},$BEFORE_MSG_APP_READY:function(){this.oApp.exec("ADD_APP_PROPERTY",
|
||||
["$MSG",c.fnBind(this.getMessage,this)])},getMessage:function(a){return this.oMessageMap[a]?unescape(this.oMessageMap[a]):a}});xe.XE_Toolbar=c.Class({name:"XE_Toolbar",toolbarArea:null,toolbarButton:null,uiNameTag:"uiName",sUIClassPrefix:"xpress_xeditor_ui_",aUICmdMap:null,$init:function(a){this.htUIList={};this.aUICmdMap={};this._assignHTMLObjects(a)},_assignHTMLObjects:function(a){a=c.$(a)||document;this.toolbarArea=c(".tool",a).get(0);this.welToolbarArea=c(this.toolbarArea);this.aAllButtons=c("BUTTON",
|
||||
this.toolbarArea).get();for(var a=this.toolbarArea.getElementsByTagName("LI"),b=a.length,d=RegExp(this.sUIClassPrefix+"([^ ]+)"),f=0;f<b;f++)if(d.test(a[f].className)){var e=RegExp.$1;null==this.htUIList[e]&&(this.htUIList[e]=c(">*:first-child",a[f]).get(0))}},$ON_MSG_APP_READY:function(){this.oApp.registerBrowserEvent(this.toolbarArea,"mouseover","EVENT_TOOLBAR_MOUSEOVER",[]);this.oApp.registerBrowserEvent(this.toolbarArea,"mouseout","EVENT_TOOLBAR_MOUSEOUT",[]);this.oApp.exec("ADD_APP_PROPERTY",
|
||||
["getToolbarButtonByUIName",c.fnBind(this.getToolbarButtonByUIName,this)])},$ON_EVENT_TOOLBAR_MOUSEOVER:function(a){"BUTTON"==a.target.tagName&&c(a.target).addClass("hover").parent("span").addClass("hover")},$ON_EVENT_TOOLBAR_MOUSEOUT:function(a){"BUTTON"==a.target.tagName&&c(a.target).removeClass("hover").parent("span").removeClass("hover")},$ON_TOGGLE_TOOLBAR_ACTIVE_LAYER:function(a,b,d,c,e,g){this.oApp.exec("TOGGLE_ACTIVE_LAYER",[a,"MSG_TOOLBAR_LAYER_SHOWN",[a,b,d,c],e,g])},$ON_MSG_TOOLBAR_LAYER_SHOWN:function(a,
|
||||
this.toolbarArea).get();for(var a=this.toolbarArea.getElementsByTagName("LI"),b=a.length,d=RegExp(this.sUIClassPrefix+"([^ ]+)"),e=0;e<b;e++)if(d.test(a[e].className)){var f=RegExp.$1;null==this.htUIList[f]&&(this.htUIList[f]=c(">*:first-child",a[e]).get(0))}},$ON_MSG_APP_READY:function(){this.oApp.registerBrowserEvent(this.toolbarArea,"mouseover","EVENT_TOOLBAR_MOUSEOVER",[]);this.oApp.registerBrowserEvent(this.toolbarArea,"mouseout","EVENT_TOOLBAR_MOUSEOUT",[]);this.oApp.exec("ADD_APP_PROPERTY",
|
||||
["getToolbarButtonByUIName",c.fnBind(this.getToolbarButtonByUIName,this)])},$ON_EVENT_TOOLBAR_MOUSEOVER:function(a){"BUTTON"==a.target.tagName&&c(a.target).addClass("hover").parent("span").addClass("hover")},$ON_EVENT_TOOLBAR_MOUSEOUT:function(a){"BUTTON"==a.target.tagName&&c(a.target).removeClass("hover").parent("span").removeClass("hover")},$ON_TOGGLE_TOOLBAR_ACTIVE_LAYER:function(a,b,d,c,f,g){this.oApp.exec("TOGGLE_ACTIVE_LAYER",[a,"MSG_TOOLBAR_LAYER_SHOWN",[a,b,d,c],f,g])},$ON_MSG_TOOLBAR_LAYER_SHOWN:function(a,
|
||||
b,d,c){this.oApp.exec("POSITION_TOOLBAR_LAYER",[a,b]);d&&this.oApp.exec(d,c)},$ON_SHOW_TOOLBAR_ACTIVE_LAYER:function(a,b,d,c){this.oApp.exec("SHOW_ACTIVE_LAYER",[a,b,d]);this.oApp.exec("POSITION_TOOLBAR_LAYER",[a,c])},$ON_ENABLE_UI:function(a){var b=this.htUIList[a];if(b&&(c(b).removeClass("off"),b.disabled=!1,b="",this.aUICmdMap[a]))for(var d=0;d<this.aUICmdMap[a].length;d++)b=this.aUICmdMap[a][d],this.oApp.exec("ENABLE_COMMAND",[b])},$ON_DISABLE_UI:function(a){var b=this.htUIList[a];if(b&&(c(b).addClass("off"),
|
||||
c(b).removeClass("hover").parent("span").removeClass("hover"),b.disabled=!0,b="",this.aUICmdMap[a]))for(var d=0;d<this.aUICmdMap[a].length;d++)b=this.aUICmdMap[a][d],this.oApp.exec("DISABLE_COMMAND",[b])},$ON_SELECT_UI:function(a){(a=this.htUIList[a])&&c(a).addClass("active")},$ON_DESELECT_UI:function(a){(a=this.htUIList[a])&&c(a).removeClass("active")},$ON_ENABLE_ALL_UI:function(){for(var a in this.htUIList)a&&this.oApp.exec("ENABLE_UI",[a]);c(this.toolbarArea).removeClass("off")},$ON_DISABLE_ALL_UI:function(){for(var a in this.htUIList)a&&
|
||||
this.oApp.exec("DISABLE_UI",[a]);c(this.toolbarArea).addClass("off");this.oApp.exec("HIDE_ACTIVE_LAYER",[])},$ON_MSG_STYLE_CHANGED:function(a,b){1==b?this.oApp.exec("SELECT_UI",[a]):this.oApp.exec("DESELECT_UI",[a])},$ON_REGISTER_UI_EVENT:function(a,b,d,c){this.aUICmdMap[a]||(this.aUICmdMap[a]=[]);this.aUICmdMap[a][this.aUICmdMap[a].length]=d;(a=this.htUIList[a])&&this.oApp.registerBrowserEvent(a,b,d,c)},$ON_POSITION_TOOLBAR_LAYER:function(a,b){a=c.$(a);b=c.$(b);if(a){b&&b.tagName&&"BUTTON"==b.tagName&&
|
||||
b.parentNode.appendChild(a);a.style.left="0";var d=c(a).offset().left,d=d+a.offsetWidth,f=this.welToolbarArea.offset().left,f=f+this.toolbarArea.offsetWidth;if(d>f)a.style.left=f-d-5+"px"}},getToolbarButtonByUIName:function(a){return this.htUIList[a]}});xe.XE_EditingAreaManager=c.Class({name:"XE_EditingAreaManager",oActivePlugin:null,oIRField:null,bIsDirty:!1,$init:function(a,b,d,f,e){this.sInitialMode=a;this.oIRField=c.$(b);this._assignHTMLObjects(e);this.fOnBeforeUnload=f;this.oEditingMode={};this.elEditingAreaContainer.style.height=
|
||||
b.parentNode.appendChild(a);a.style.left="0";var d=c(a).offset().left,d=d+a.offsetWidth,e=this.welToolbarArea.offset().left,e=e+this.toolbarArea.offsetWidth;if(d>e)a.style.left=e-d-5+"px"}},getToolbarButtonByUIName:function(a){return this.htUIList[a]}});xe.XE_EditingAreaManager=c.Class({name:"XE_EditingAreaManager",oActivePlugin:null,oIRField:null,bIsDirty:!1,$init:function(a,b,d,e,f){this.sInitialMode=a;this.oIRField=c.$(b);this._assignHTMLObjects(f);this.fOnBeforeUnload=e;this.oEditingMode={};this.elEditingAreaContainer.style.height=
|
||||
parseInt(d.nHeight||this.elEditingAreaContainer.offsetHeight)+"px";this.nMinHeight=d.nMinHeight||10;this.niMinWidth=d.nMinWidth||10},_assignHTMLObjects:function(a){a=c.$(a)||document;this.elEditingAreaContainer=c("DIV.xpress_xeditor_editing_area_container",a).get(0);this.elEditingAreaSkipUI=c("A.skip",a).get(0)},$BEFORE_MSG_APP_READY:function(){this.oApp.exec("ADD_APP_PROPERTY",["elEditingAreaContainer",this.elEditingAreaContainer]);this.oApp.exec("ADD_APP_PROPERTY",["getIR",c.fnBind(this.getIR,this)]);
|
||||
this.oApp.exec("ADD_APP_PROPERTY",["setIR",this.setIR]);this.oApp.exec("ADD_APP_PROPERTY",["getEditingMode",c.fnBind(this.getEditingMode,this)])},$ON_MSG_APP_READY:function(){this.oApp.exec("CHANGE_EDITING_MODE",[this.sInitialMode,!0]);this.oApp.exec("LOAD_IR_FIELD",[!1]);this.oApp.registerBrowserEvent(this.elEditingAreaSkipUI,"focus","MSG_EDITING_AREA_SIZE_CHANGED",[],50);this.oApp.registerBrowserEvent(this.elEditingAreaSkipUI,"blur","MSG_EDITING_AREA_SIZE_CHANGED",[],50)},$AFTER_MSG_APP_READY:function(){this.oApp.exec("UPDATE_IR_FIELD",
|
||||
[])},$ON_LOAD_IR_FIELD:function(a){this.oApp.setIR(this.oIRField.value,a)},$ON_UPDATE_IR_FIELD:function(){this.oIRField.value=this.oApp.getIR()},$BEFORE_CHANGE_EDITING_MODE:function(a){this._oPrevActivePlugin=this.oActivePlugin;this.oActivePlugin=this.oEditingMode[a]},$AFTER_CHANGE_EDITING_MODE:function(a,b){this._oPrevActivePlugin&&(this.oApp.exec("SET_IR",[this._oPrevActivePlugin.getIR()]),this.oApp.exec("ENABLE_UI",[this._oPrevActivePlugin.sMode]),this._setEditingAreaDimension());this.oApp.exec("DISABLE_UI",
|
||||
|
|
@ -84,53 +84,53 @@ $ON_REGISTER_EDITING_AREA:function(a){this.oEditingMode[a.sMode]=a;this.attachDo
|
|||
c+"px"},$ON_RESIZE_EDITING_AREA_BY:function(a,b){var d=parseInt(a),c=parseInt(b);this.oApp.exec("RESIZE_EDITING_AREA",[this.elEditingAreaContainer.style.width?parseInt(this.elEditingAreaContainer.style.width)+d:null,this.elEditingAreaContainer.style.height?this.iStartingHeight+c:null])},$ON_MSG_EDITING_AREA_RESIZE_ENDED:function(){this.oActivePlugin.elEditingArea.style.display="block";this._setEditingAreaDimension()},_setEditingAreaDimension:function(){this.oActivePlugin.elEditingArea.style.height=
|
||||
this.elEditingAreaContainer.style.height;this.oActivePlugin.elEditingArea.style.width=this.elEditingAreaContainer.style.width},attachDocumentEvents:function(a){this.oApp.registerBrowserEvent(a,"click","EVENT_EDITING_AREA_CLICK");this.oApp.registerBrowserEvent(a,"mousedown","EVENT_EDITING_AREA_MOUSEDOWN");this.oApp.registerBrowserEvent(a,"mousemove","EVENT_EDITING_AREA_MOUSEMOVE");this.oApp.registerBrowserEvent(a,"mouseup","EVENT_EDITING_AREA_MOUSEUP");this.oApp.registerBrowserEvent(a,"keydown","EVENT_EDITING_AREA_KEYDOWN");
|
||||
this.oApp.registerBrowserEvent(a,"keypress","EVENT_EDITING_AREA_KEYPRESS");this.oApp.registerBrowserEvent(a,"keyup","EVENT_EDITING_AREA_KEYUP")},getIR:function(){return this.oActivePlugin.getIR()},setIR:function(a,b){this.oApp.exec("SET_IR",[a,b])},getEditingMode:function(){return this.oActivePlugin.sMode}});xe.XE_EditingArea_HTMLSrc=c.Class({name:"XE_EditingArea_HTMLSrc",sMode:"HTMLSrc",textarea:null,$init:function(a){this.elEditingArea=this.textarea=c.$(a)},$BEFORE_MSG_APP_READY:function(){this.oEditingArea=
|
||||
this.textarea;this.oApp.exec("REGISTER_EDITING_AREA",[this])},$ON_CHANGE_EDITING_MODE:function(a){this.textarea.style.display=a==this.sMode?"block":"none"},$ON_PASTE_HTML:function(a){this.oApp.getEditingMode()==this.sMode&&((new m(this.textarea)).paste(a),this.textarea.focus())},getIR:function(){var a=this.textarea.value;return this.oApp.applyConverter?this.oApp.applyConverter(this.sMode+"_TO_IR",a):a},setIR:function(a){this.textarea.value=this.oApp.applyConverter?this.oApp.applyConverter("IR_TO_"+
|
||||
this.sMode,a):a},focus:function(){this.textarea.focus()}});var m=function(a){this._o=a};m.prototype.getSelection=function(){var a=this._o,b=[-1,-1];if(isNaN(this._o.selectionStart)){a.focus();var d=document.body.createTextRange(),c=null,c=document.selection.createRange().duplicate();d.moveToElementText(a);c.collapse(!0);d.setEndPoint("EndToEnd",c);b[0]=d.text.length;c=document.selection.createRange().duplicate();d.moveToElementText(a);c.collapse(!1);d.setEndPoint("EndToEnd",c);b[1]=d.text.length;
|
||||
a.blur()}else b[0]=a.selectionStart,b[1]=a.selectionEnd;return b};m.prototype.setSelection=function(a,b){var d=this._o;"undefined"==typeof b&&(b=a);if(d.setSelectionRange)d.setSelectionRange(a,b);else if(d.createTextRange){var c=d.createTextRange();c.collapse(!0);c.moveStart("character",a);c.moveEnd("character",b-a);c.select();d.blur()}};m.prototype.copy=function(){var a=this.getSelection();return this._o.value.substring(a[0],a[1])};m.prototype.paste=function(a){var b=this._o,d=this.getSelection(),
|
||||
c=b.value,e=c.substr(0,d[0]),c=c.substr(d[1]);b.value=e+a+c;b=0;"undefined"==typeof document.body.style.maxHeight&&(e=e.match(/\n/gi),b=null!=e?e.length:0);this.setSelection(d[0]+a.length-b)};m.prototype.cut=function(){var a=this.copy();this.paste("");return a};xe.XE_EditingArea_WYSIWYG=c.Class({name:"XE_EditingArea_WYSIWYG",status:xe.PLUGIN_STATUS.NOT_READY,sMode:"WYSIWYG",iframe:null,doc:null,iLastUndoRecorded:0,iMinUndoInterval:3E3,_nIFrameReadyCount:50,$init:function(a){this.iframe=c.$(a);this.initIframe();
|
||||
this.elEditingArea=a},$BEFORE_MSG_APP_READY:function(){this.oEditingArea=this.doc;this.oApp.exec("REGISTER_EDITING_AREA",[this]);this.oApp.exec("ADD_APP_PROPERTY",["getWYSIWYGWindow",c.fnBind(this.getWindow,this)]);this.oApp.exec("ADD_APP_PROPERTY",["getWYSIWYGDocument",c.fnBind(this.getDocument,this)])},$ON_MSG_APP_READY:function(){c.browser.msie&&(c(this.doc).bind("keydown",c.fnBind(function(a){"control"==this.doc.selection.type.toLowerCase()&&8==a.keyCode&&(this.oApp.exec("EXECCOMMAND",["delete",
|
||||
!1,!1]),a.preventDefault(),a.stopPropagation())},this)),c(this.doc.body).bind("mousedown",c.fnBind(function(){this._oIERange=null;this._bIERangeReset=!0},this)),c(this.doc.body).bind("beforedeactivate",c.fnBind(function(){if(!this._bIERangeReset){var a=this.getDocument().selection.createRange(0);this._oIERange=a.parentElement&&a.parentElement()&&"INPUT"==a.parentElement().tagName?this._oPrevIERange:a}},this)),c(this.doc.body).bind("mouseup",c.fnBind(function(){this._bIERangeReset=!1},this)))},$ON_CHANGE_EDITING_MODE:function(a){a==
|
||||
this.sMode?(this.iframe.style.display="block",this.oApp.exec("REFRESH_WYSIWYG",[]),this.oApp.exec("SET_EDITING_WINDOW",[this.getWindow()])):this.iframe.style.display="none"},$AFTER_CHANGE_EDITING_MODE:function(){this._oIERange=null},$ON_REFRESH_WYSIWYG:function(){c.browser.mozilla&&(this._disableWYSIWYG(),this._enableWYSIWYG())},$ON_ENABLE_WYSIWYG:function(){this._enableWYSIWYG()},$ON_DISABLE_WYSIWYG:function(){this._disableWYSIWYG()},$ON_EVENT_EDITING_AREA_KEYDOWN:function(a){if(a.ctrlKey){switch(a.keyCode){case 37:this.oApp.exec("EXECCOMMAND",
|
||||
["outdent",!1,!1]);break;case 39:this.oApp.exec("EXECCOMMAND",["indent",!1,!1]);break;case 49:case 50:case 51:case 52:case 53:case 54:this.oApp.exec("EXECCOMMAND",["FormatBlock",!1,"<h"+(a.keyCode-48)+">"]);break;default:return}a.preventDefault();a.stopPropagation()}},$ON_EVENT_EDITING_AREA_KEYUP:function(a){229==a.keyCode||13==a.keyCode||a.altKey||a.ctrlKey||33<=a.keyCode&&40>=a.keyCode||16==a.keyCode||this._recordUndo(a)},$ON_PASTE_HTML:function(a,b){if(this.oApp.getEditingMode()==this.sMode){var d=
|
||||
b||this.oApp.getSelection();d.pasteHTML(a);if(!c.browser.msie){var f=d.placeStringBookmark();this.oApp.getWYSIWYGDocument().body.innerHTML=this.oApp.getWYSIWYGDocument().body.innerHTML;d.moveToBookmark(f);d.collapseToEnd();d.select();d.removeStringBookmark(f)}this.oApp.exec("RECORD_UNDO_ACTION",["INSERT HTML"])}},$AFTER_MSG_EDITING_AREA_RESIZE_ENDED:function(){this.oApp.exec("REFRESH_WYSIWYG",[])},$ON_RESTORE_IE_SELECTION:function(){if(this._oIERange)this._oIERange.select(),this._oPrevIERange=this._oIERange,
|
||||
this._oIERange=null},initIframe:function(){try{this.doc=this.iframe.contentWindow.document;if(null==this.doc||"about:blank"==this.doc.location.href)throw Error("Access denied");this._enableWYSIWYG();this.status=xe.PLUGIN_STATUS.READY}catch(a){if(0<this._nIFrameReadyCount--)setTimeout(c.fnBind(this.initIframe,this),100);else throw"iframe for WYSIWYG editing mode can't be initialized. Please check if the iframe document exists and is also accessable(cross-domain issues). ";}},getIR:function(){var a=
|
||||
this.doc.body.innerHTML;return this.oApp.applyConverter?this.oApp.applyConverter(this.sMode+"_TO_IR",a):a},setIR:function(a){this.doc.body.innerHTML=this.oApp.applyConverter?this.oApp.applyConverter("IR_TO_"+this.sMode,a):a;if(c.browser.mozilla&&""==this.doc.body.innerHTML)this.doc.body.innerHTML="<br>"},getWindow:function(){return this.iframe.contentWindow},getDocument:function(){return this.iframe.contentWindow.document},focus:function(){},_recordUndo:function(a){if(!(new Date-this.iLastUndoRecorded<
|
||||
this.iMinUndoInterval))this.oApp.exec("RECORD_UNDO_ACTION",["KEYPRESS"]),this.iLastUndoRecorded=new Date,this.prevKeyCode=a.keyCode},_enableWYSIWYG:function(){c.browser.msie?(this.doc.body.disabled=!0,this.doc.body.contentEditable=!0,this.doc.body.removeAttribute("disabled")):this.doc.designMode="on"},_disableWYSIWYG:function(){c.browser.msie?this.doc.body.contentEditable=!1:this.doc.designMode="off"}});xe.XE_EditingAreaVerticalResizer=c.Class({name:"XE_EditingAreaVerticalResizer",oResizeGrip:null,
|
||||
$init:function(a){this._assignHTMLObjects(a);this.$FnMouseDown=c.fnBind(this._mousedown,this);this.$FnMouseMove=c.fnBind(this._mousemove,this);this.$FnMouseUp=c.fnBind(this._mouseup,this);c(this.oResizeGrip).bind("mousedown",this.$FnMouseDown)},_assignHTMLObjects:function(a){a=c.$(a)||document;this.oResizeGrip=c(".xpress_xeditor_editingArea_verticalResizer",a).get(0)},_mousedown:function(a){this.iStartHeight=a.clientY;c(document).bind("mousemove",this.$FnMouseMove);c(document).bind("mouseup",this.$FnMouseUp);
|
||||
this.oApp.exec("MSG_EDITING_AREA_RESIZE_STARTED",[this.$FnMouseDown,this.$FnMouseMove,this.$FnMouseUp])},_mousemove:function(a){this.oApp.exec("RESIZE_EDITING_AREA_BY",[0,a.clientY-this.iStartHeight])},_mouseup:function(){c(document).unbind("mousemove",this.$FnMouseMove);c(document).unbind("mouseup",this.$FnMouseUp);this.oApp.exec("MSG_EDITING_AREA_RESIZE_ENDED",[this.$FnMouseDown,this.$FnMouseMove,this.$FnMouseUp])}});xe.XE_ExecCommand=c.Class({name:"XE_ExecCommand",oEditingArea:null,$init:function(a){this.oEditingArea=
|
||||
a},$BEFORE_MSG_APP_READY:function(){if(this.oEditingArea&&"IFRAME"==this.oEditingArea.tagName)this.oEditingArea=this.oEditingArea.contentWindow.document},$ON_MSG_APP_READY:function(){this.oApp.exec("REGISTER_HOTKEY",["ctrl+b","EXECCOMMAND",["bold",!1,!1]]);this.oApp.exec("REGISTER_HOTKEY",["ctrl+u","EXECCOMMAND",["underline",!1,!1]]);this.oApp.exec("REGISTER_HOTKEY",["ctrl+i","EXECCOMMAND",["italic",!1,!1]]);this.oApp.exec("REGISTER_HOTKEY",["ctrl+d","EXECCOMMAND",["strikethrough",!1,!1]]);this.oApp.exec("REGISTER_UI_EVENT",
|
||||
["bold","click","EXECCOMMAND",["bold",!1,!1]]);this.oApp.exec("REGISTER_UI_EVENT",["underline","click","EXECCOMMAND",["underline",!1,!1]]);this.oApp.exec("REGISTER_UI_EVENT",["italic","click","EXECCOMMAND",["italic",!1,!1]]);this.oApp.exec("REGISTER_UI_EVENT",["lineThrough","click","EXECCOMMAND",["strikethrough",!1,!1]]);this.oApp.exec("REGISTER_UI_EVENT",["superscript","click","EXECCOMMAND",["superscript",!1,!1]]);this.oApp.exec("REGISTER_UI_EVENT",["subscript","click","EXECCOMMAND",["subscript",
|
||||
!1,!1]]);this.oApp.exec("REGISTER_UI_EVENT",["justifyleft","click","EXECCOMMAND",["justifyleft",!1,!1]]);this.oApp.exec("REGISTER_UI_EVENT",["justifycenter","click","EXECCOMMAND",["justifycenter",!1,!1]]);this.oApp.exec("REGISTER_UI_EVENT",["justifyright","click","EXECCOMMAND",["justifyright",!1,!1]]);this.oApp.exec("REGISTER_UI_EVENT",["justifyfull","click","EXECCOMMAND",["justifyfull",!1,!1]]);this.oApp.exec("REGISTER_UI_EVENT",["orderedlist","click","EXECCOMMAND",["insertorderedlist",!1,!1]]);
|
||||
this.oApp.exec("REGISTER_UI_EVENT",["unorderedlist","click","EXECCOMMAND",["insertunorderedlist",!1,!1]]);this.oApp.exec("REGISTER_UI_EVENT",["outdent","click","EXECCOMMAND",["outdent",!1,!1]]);this.oApp.exec("REGISTER_UI_EVENT",["indent","click","EXECCOMMAND",["indent",!1,!1]])},$BEFORE_EXECCOMMAND:function(a){this._bOnlyCursorChanged=!1;this.oApp.exec("FOCUS",[]);if(a.match(/^bold|underline|italic|strikethrough|superscript|subscript$/i)&&this.oApp.getSelection().collapsed)this._bOnlyCursorChanged=
|
||||
!0;this._bOnlyCursorChanged||this.oApp.exec("RECORD_UNDO_BEFORE_ACTION",[a])},$ON_EXECCOMMAND:function(a,b,c){this.oEditingArea.execCommand(a,""==b||b?b:!1,""==c||c?c:!1)},$AFTER_EXECCOMMAND:function(a){this._bOnlyCursorChanged||this.oApp.exec("RECORD_UNDO_AFTER_ACTION",[a]);this.oApp.exec("CHECK_STYLE_CHANGE",[])}});xe.XE_WYSIWYGEnterKey=c.Class({name:"XE_WYSIWYGEnterKey",unsupportedBrowser:["ie","opera"],oEditingArea:null,$init:function(a){this.oEditingArea=a},$BEFORE_MSG_APP_READY:function(){if(this.oEditingArea&&
|
||||
"IFRAME"==this.oEditingArea.tagName)this.oEditingArea=this.oEditingArea.contentWindow.document},$ON_EVENT_EDITING_AREA_KEYDOWN:function(a){if("WYSIWYG"==this.oApp.getEditingMode()&&!a.shiftKey&&13==a.keyCode){var b=this.oApp.getSelection(),c=b.placeStringBookmark(),f=b.getLineInfo(),e=f.oStart,f=f.oEnd;if(!e.bParentBreak||b.rxBlockContainer.test(e.oLineBreaker.tagName)){a.stopPropagation();a.preventDefault();a=this.oEditingArea.createElement("P");b.moveToBookmark(c);b.setStartBefore(e.oNode);b.surroundContents(a);
|
||||
b.collapseToEnd();e=this.oEditingArea.createElement("P");b.setEndAfter(f.oNode);b.surroundContents(e);b.removeStringBookmark(c);if(""==a.innerHTML)a.innerHTML="<br>";if(""==e.innerHTML)e.innerHTML="<br>";e.nextSibling&&"BR"==e.nextSibling.tagName&&e.parentNode.removeChild(e.nextSibling);b.selectNodeContents(e);b.collapseToStart();b.select();this.oApp.exec("CHECK_STYLE_CHANGE",[])}else b.removeStringBookmark(c)}}});xe.XE_WYSIWYGStyler=c.Class({name:"XE_WYSIWYGStyler",$PRECONDITION:function(){return"WYSIWYG"==
|
||||
this.oApp.getEditingMode()},$ON_SET_WYSIWYG_STYLE:function(a){var b=this.oApp.getSelection();if(b.collapsed){var d=this.oApp.getWYSIWYGDocument().createElement("SPAN");b.insertNode(d);d.innerHTML=unescape("%uFEFF");var f,e;for(e in a)f=a[e],"string"==typeof f&&(d.style[e]=f);b.selectNodeContents(d);b.collapseToEnd();b._window.focus();b._window.document.body.focus();b.select();if(c.browser.mozilla&&3==c.browser.nVersion)d.innerHTML=""}else this.oApp.exec("RECORD_UNDO_BEFORE_ACTION",["FONT STYLE"]),
|
||||
this.textarea;this.oApp.exec("REGISTER_EDITING_AREA",[this])},$ON_CHANGE_EDITING_MODE:function(a){this.textarea.style.display=a==this.sMode?"block":"none"},$ON_PASTE_HTML:function(a){this.oApp.getEditingMode()==this.sMode&&((new o(this.textarea)).paste(a),this.textarea.focus())},getIR:function(){var a=this.textarea.value;return this.oApp.applyConverter?this.oApp.applyConverter(this.sMode+"_TO_IR",a):a},setIR:function(a){this.textarea.value=this.oApp.applyConverter?this.oApp.applyConverter("IR_TO_"+
|
||||
this.sMode,a):a},focus:function(){this.textarea.focus()}});var o=function(a){this._o=a};o.prototype.getSelection=function(){var a=this._o,b=[-1,-1];if(isNaN(this._o.selectionStart)){a.focus();var d=document.body.createTextRange(),c=null,c=document.selection.createRange().duplicate();d.moveToElementText(a);c.collapse(!0);d.setEndPoint("EndToEnd",c);b[0]=d.text.length;c=document.selection.createRange().duplicate();d.moveToElementText(a);c.collapse(!1);d.setEndPoint("EndToEnd",c);b[1]=d.text.length;
|
||||
a.blur()}else b[0]=a.selectionStart,b[1]=a.selectionEnd;return b};o.prototype.setSelection=function(a,b){var d=this._o;"undefined"==typeof b&&(b=a);if(d.setSelectionRange)d.setSelectionRange(a,b);else if(d.createTextRange){var c=d.createTextRange();c.collapse(!0);c.moveStart("character",a);c.moveEnd("character",b-a);c.select();d.blur()}};o.prototype.copy=function(){var a=this.getSelection();return this._o.value.substring(a[0],a[1])};o.prototype.paste=function(a){var b=this._o,d=this.getSelection(),
|
||||
c=b.value,f=c.substr(0,d[0]),c=c.substr(d[1]);b.value=f+a+c;b=0;"undefined"==typeof document.body.style.maxHeight&&(f=f.match(/\n/gi),b=null!=f?f.length:0);this.setSelection(d[0]+a.length-b)};o.prototype.cut=function(){var a=this.copy();this.paste("");return a};xe.XE_EditingArea_WYSIWYG=c.Class({name:"XE_EditingArea_WYSIWYG",status:xe.PLUGIN_STATUS.NOT_READY,sMode:"WYSIWYG",iframe:null,doc:null,iLastUndoRecorded:0,iMinUndoInterval:3E3,_nIFrameReadyCount:50,$init:function(a){this.iframe=c.$(a);this.initIframe();
|
||||
this.elEditingArea=a},$BEFORE_MSG_APP_READY:function(){this.oEditingArea=this.doc;this.oApp.exec("REGISTER_EDITING_AREA",[this]);this.oApp.exec("ADD_APP_PROPERTY",["getWYSIWYGWindow",c.fnBind(this.getWindow,this)]);this.oApp.exec("ADD_APP_PROPERTY",["getWYSIWYGDocument",c.fnBind(this.getDocument,this)])},$ON_MSG_APP_READY:function(){c.browser.msie&&(c(this.doc).unbind("keydown.ea").bind("keydown.ea",c.fnBind(function(a){"control"==this.doc.selection.type.toLowerCase()&&8==a.keyCode&&(this.oApp.exec("EXECCOMMAND",
|
||||
["delete",!1,!1]),a.preventDefault(),a.stopPropagation())},this)),c(this.doc.body).unbind("mousedown.ea").bind("mousedown.ea",c.fnBind(function(){this._oIERange=null;this._bIERangeReset=!0},this)).unbind("beforedeactivate.ea").bind("beforedeactivate.ea",c.fnBind(function(){if(!this._bIERangeReset){var a=this.getDocument().selection.createRange(0);this._oIERange=a.parentElement&&a.parentElement()&&"INPUT"==a.parentElement().tagName?this._oPrevIERange:a}},this)).unbind("mouseup.ea").bind("mouseup.ea",
|
||||
c.fnBind(function(){this._bIERangeReset=!1},this)))},$ON_CHANGE_EDITING_MODE:function(a){a==this.sMode?(this.iframe.style.display="block",this.oApp.exec("REFRESH_WYSIWYG",[]),this.oApp.exec("SET_EDITING_WINDOW",[this.getWindow()])):this.iframe.style.display="none"},$AFTER_CHANGE_EDITING_MODE:function(){this._oIERange=null},$ON_REFRESH_WYSIWYG:function(){c.browser.mozilla&&(this._disableWYSIWYG(),this._enableWYSIWYG())},$ON_ENABLE_WYSIWYG:function(){this._enableWYSIWYG()},$ON_DISABLE_WYSIWYG:function(){this._disableWYSIWYG()},
|
||||
$ON_EVENT_EDITING_AREA_KEYDOWN:function(a){if(a.ctrlKey){switch(a.keyCode){case 37:this.oApp.exec("EXECCOMMAND",["outdent",!1,!1]);break;case 39:this.oApp.exec("EXECCOMMAND",["indent",!1,!1]);break;case 49:case 50:case 51:case 52:case 53:case 54:this.oApp.exec("EXECCOMMAND",["FormatBlock",!1,"<h"+(a.keyCode-48)+">"]);break;default:return}a.preventDefault();a.stopPropagation()}},$ON_EVENT_EDITING_AREA_KEYUP:function(a){229==a.keyCode||13==a.keyCode||a.altKey||a.ctrlKey||33<=a.keyCode&&40>=a.keyCode||
|
||||
16==a.keyCode||this._recordUndo(a)},$ON_PASTE_HTML:function(a,b){if(this.oApp.getEditingMode()==this.sMode){var d=b||this.oApp.getSelection();d.pasteHTML(a);if(!c.browser.msie){var e=d.placeStringBookmark();this.oApp.getWYSIWYGDocument().body.innerHTML=this.oApp.getWYSIWYGDocument().body.innerHTML;d.moveToBookmark(e);d.collapseToEnd();d.select();d.removeStringBookmark(e)}this.oApp.exec("RECORD_UNDO_ACTION",["INSERT HTML"])}},$AFTER_MSG_EDITING_AREA_RESIZE_ENDED:function(){this.oApp.exec("REFRESH_WYSIWYG",
|
||||
[])},$ON_RESTORE_IE_SELECTION:function(){if(this._oIERange)this._oIERange.select(),this._oPrevIERange=this._oIERange,this._oIERange=null},initIframe:function(){try{this.doc=this.iframe.contentWindow.document;if(null==this.doc||"about:blank"==this.doc.location.href)throw Error("Access denied");this._enableWYSIWYG();this.status=xe.PLUGIN_STATUS.READY}catch(a){if(0<this._nIFrameReadyCount--)setTimeout(c.fnBind(this.initIframe,this),100);else throw"iframe for WYSIWYG editing mode can't be initialized. Please check if the iframe document exists and is also accessable(cross-domain issues). ";
|
||||
}},getIR:function(){var a=this.doc.body.innerHTML;return this.oApp.applyConverter?this.oApp.applyConverter(this.sMode+"_TO_IR",a):a},setIR:function(a){this.doc.body.innerHTML=this.oApp.applyConverter?this.oApp.applyConverter("IR_TO_"+this.sMode,a):a;if(c.browser.mozilla&&""==this.doc.body.innerHTML)this.doc.body.innerHTML="<br>"},getWindow:function(){return this.iframe.contentWindow},getDocument:function(){return this.iframe.contentWindow.document},focus:function(){},_recordUndo:function(a){if(!(new Date-
|
||||
this.iLastUndoRecorded<this.iMinUndoInterval))this.oApp.exec("RECORD_UNDO_ACTION",["KEYPRESS"]),this.iLastUndoRecorded=new Date,this.prevKeyCode=a.keyCode},_enableWYSIWYG:function(){c.browser.msie?(this.doc.body.disabled=!0,this.doc.body.contentEditable=!0,this.doc.body.removeAttribute("disabled")):this.doc.designMode="on"},_disableWYSIWYG:function(){c.browser.msie?this.doc.body.contentEditable=!1:this.doc.designMode="off"}});xe.XE_EditingAreaVerticalResizer=c.Class({name:"XE_EditingAreaVerticalResizer",
|
||||
oResizeGrip:null,$init:function(a){this._assignHTMLObjects(a);this.$FnMouseDown=c.fnBind(this._mousedown,this);this.$FnMouseMove=c.fnBind(this._mousemove,this);this.$FnMouseUp=c.fnBind(this._mouseup,this);c(this.oResizeGrip).bind("mousedown",this.$FnMouseDown)},_assignHTMLObjects:function(a){a=c.$(a)||document;this.oResizeGrip=c(".xpress_xeditor_editingArea_verticalResizer",a).get(0)},_mousedown:function(a){this.iStartHeight=a.clientY;c(document).bind("mousemove",this.$FnMouseMove);c(document).bind("mouseup",
|
||||
this.$FnMouseUp);this.oApp.exec("MSG_EDITING_AREA_RESIZE_STARTED",[this.$FnMouseDown,this.$FnMouseMove,this.$FnMouseUp])},_mousemove:function(a){this.oApp.exec("RESIZE_EDITING_AREA_BY",[0,a.clientY-this.iStartHeight])},_mouseup:function(){c(document).unbind("mousemove",this.$FnMouseMove);c(document).unbind("mouseup",this.$FnMouseUp);this.oApp.exec("MSG_EDITING_AREA_RESIZE_ENDED",[this.$FnMouseDown,this.$FnMouseMove,this.$FnMouseUp])}});xe.XE_ExecCommand=c.Class({name:"XE_ExecCommand",oEditingArea:null,
|
||||
$init:function(a){this.oEditingArea=a},$BEFORE_MSG_APP_READY:function(){if(this.oEditingArea&&"IFRAME"==this.oEditingArea.tagName)this.oEditingArea=this.oEditingArea.contentWindow.document},$ON_MSG_APP_READY:function(){this.oApp.exec("REGISTER_HOTKEY",["ctrl+b","EXECCOMMAND",["bold",!1,!1]]);this.oApp.exec("REGISTER_HOTKEY",["ctrl+u","EXECCOMMAND",["underline",!1,!1]]);this.oApp.exec("REGISTER_HOTKEY",["ctrl+i","EXECCOMMAND",["italic",!1,!1]]);this.oApp.exec("REGISTER_HOTKEY",["ctrl+d","EXECCOMMAND",
|
||||
["strikethrough",!1,!1]]);this.oApp.exec("REGISTER_UI_EVENT",["bold","click","EXECCOMMAND",["bold",!1,!1]]);this.oApp.exec("REGISTER_UI_EVENT",["underline","click","EXECCOMMAND",["underline",!1,!1]]);this.oApp.exec("REGISTER_UI_EVENT",["italic","click","EXECCOMMAND",["italic",!1,!1]]);this.oApp.exec("REGISTER_UI_EVENT",["lineThrough","click","EXECCOMMAND",["strikethrough",!1,!1]]);this.oApp.exec("REGISTER_UI_EVENT",["superscript","click","EXECCOMMAND",["superscript",!1,!1]]);this.oApp.exec("REGISTER_UI_EVENT",
|
||||
["subscript","click","EXECCOMMAND",["subscript",!1,!1]]);this.oApp.exec("REGISTER_UI_EVENT",["justifyleft","click","EXECCOMMAND",["justifyleft",!1,!1]]);this.oApp.exec("REGISTER_UI_EVENT",["justifycenter","click","EXECCOMMAND",["justifycenter",!1,!1]]);this.oApp.exec("REGISTER_UI_EVENT",["justifyright","click","EXECCOMMAND",["justifyright",!1,!1]]);this.oApp.exec("REGISTER_UI_EVENT",["justifyfull","click","EXECCOMMAND",["justifyfull",!1,!1]]);this.oApp.exec("REGISTER_UI_EVENT",["orderedlist","click",
|
||||
"EXECCOMMAND",["insertorderedlist",!1,!1]]);this.oApp.exec("REGISTER_UI_EVENT",["unorderedlist","click","EXECCOMMAND",["insertunorderedlist",!1,!1]]);this.oApp.exec("REGISTER_UI_EVENT",["outdent","click","EXECCOMMAND",["outdent",!1,!1]]);this.oApp.exec("REGISTER_UI_EVENT",["indent","click","EXECCOMMAND",["indent",!1,!1]])},$BEFORE_EXECCOMMAND:function(a){this._bOnlyCursorChanged=!1;this.oApp.exec("FOCUS",[]);if(a.match(/^bold|underline|italic|strikethrough|superscript|subscript$/i)&&this.oApp.getSelection().collapsed)this._bOnlyCursorChanged=
|
||||
!0;this._bOnlyCursorChanged||this.oApp.exec("RECORD_UNDO_BEFORE_ACTION",[a])},$ON_EXECCOMMAND:function(a,b,d){this.oEditingArea.execCommand(a,""==b||b?b:!1,""==d||d?d:!1)},$AFTER_EXECCOMMAND:function(a){this._bOnlyCursorChanged||this.oApp.exec("RECORD_UNDO_AFTER_ACTION",[a]);this.oApp.exec("CHECK_STYLE_CHANGE",[])}});xe.XE_WYSIWYGEnterKey=c.Class({name:"XE_WYSIWYGEnterKey",unsupportedBrowser:["ie","opera"],oEditingArea:null,$init:function(a){this.oEditingArea=a},$BEFORE_MSG_APP_READY:function(){if(this.oEditingArea&&
|
||||
"IFRAME"==this.oEditingArea.tagName)this.oEditingArea=this.oEditingArea.contentWindow.document},$ON_EVENT_EDITING_AREA_KEYDOWN:function(a){if("WYSIWYG"==this.oApp.getEditingMode()&&!a.shiftKey&&13==a.keyCode){var b=this.oApp.getSelection(),d=b.placeStringBookmark(),c=b.getLineInfo(),f=c.oStart,c=c.oEnd;if(!f.bParentBreak||b.rxBlockContainer.test(f.oLineBreaker.tagName)){a.stopPropagation();a.preventDefault();a=this.oEditingArea.createElement("P");b.moveToBookmark(d);b.setStartBefore(f.oNode);b.surroundContents(a);
|
||||
b.collapseToEnd();f=this.oEditingArea.createElement("P");b.setEndAfter(c.oNode);b.surroundContents(f);b.removeStringBookmark(d);if(""==a.innerHTML)a.innerHTML="<br>";if(""==f.innerHTML)f.innerHTML="<br>";f.nextSibling&&"BR"==f.nextSibling.tagName&&f.parentNode.removeChild(f.nextSibling);b.selectNodeContents(f);b.collapseToStart();b.select();this.oApp.exec("CHECK_STYLE_CHANGE",[])}else b.removeStringBookmark(d)}}});xe.XE_WYSIWYGStyler=c.Class({name:"XE_WYSIWYGStyler",$PRECONDITION:function(){return"WYSIWYG"==
|
||||
this.oApp.getEditingMode()},$ON_SET_WYSIWYG_STYLE:function(a){var b=this.oApp.getSelection();if(b.collapsed){var d=this.oApp.getWYSIWYGDocument().createElement("SPAN");b.insertNode(d);d.innerHTML=unescape("%uFEFF");var e,f;for(f in a)e=a[f],"string"==typeof e&&(d.style[f]=e);b.selectNodeContents(d);b.collapseToEnd();b._window.focus();b._window.document.body.focus();b.select();if(c.browser.mozilla&&3==c.browser.nVersion)d.innerHTML=""}else this.oApp.exec("RECORD_UNDO_BEFORE_ACTION",["FONT STYLE"]),
|
||||
b.styleRange(a),b._window.focus(),b.select(),this.oApp.exec("RECORD_UNDO_AFTER_ACTION",["FONT STYLE"])}});xe.XE_WYSIWYGStyleGetter=c.Class({name:"XE_WYSIWYGStyleGetter",hKeyUp:null,getStyleInterval:200,oStyleMap:{fontFamily:{type:"Value",css:"fontFamily"},fontSize:{type:"Value",css:"fontSize"},lineHeight:{type:"Value",css:"lineHeight",converter:function(a,b){return!a.match(/px$/)?a:Math.ceil(10*(parseInt(a)/parseInt(b.fontSize)))/10}},bold:{command:"bold"},underline:{command:"underline"},italic:{command:"italic"},
|
||||
lineThrough:{command:"strikethrough"},superscript:{command:"superscript"},subscript:{command:"subscript"},justifyleft:{command:"justifyleft"},justifycenter:{command:"justifycenter"},justifyright:{command:"justifyright"},justifyfull:{command:"justifyfull"},orderedlist:{command:"insertorderedlist"},unorderedlist:{command:"insertunorderedlist"}},$init:function(){this.oStyle=this._getBlankStyle()},$PRECONDITION:function(){return"WYSIWYG"!=this.oApp.getEditingMode()?!1:!0},$ON_MSG_APP_READY:function(){this.oDocument=
|
||||
this.oApp.getWYSIWYGDocument();this.oApp.exec("ADD_APP_PROPERTY",["getCurrentStyle",c.fnBind(this.getCurrentStyle,this)])},$ON_EVENT_EDITING_AREA_MOUSEUP:function(){this.hKeyUp&&clearTimeout(this.hKeyUp);this.oApp.exec("CHECK_STYLE_CHANGE",[])},$ON_EVENT_EDITING_AREA_KEYUP:function(a){if(8==a.keyCode||33<=a.keyCode&&40>=a.keyCode||45==a.keyCode||46==a.keyCode)this.hKeyUp&&clearTimeout(this.hKeyUp),this.hKeyUp=setTimeout(c.fnBind(this.oApp.exec,this.oApp,"CHECK_STYLE_CHANGE",[]),this.getStyleInterval)},
|
||||
$ON_CHECK_STYLE_CHANGE:function(){this._getStyle()},$ON_RESET_STYLE_STATUS:function(){var a=this._getBlankStyle(),b;for(b in a)this.oApp.exec("SET_STYLE_STATUS",[b,a[b]])},getCurrentStyle:function(){return this.oStyle},_check_style_change:function(){this.oApp.exec("CHECK_STYLE_CHANGE",[])},_getBlankStyle:function(){var a={},b;for(b in this.oStyleMap)a[b]="Value"==this.oStyleMap[b].type?"":0;return a},_getStyle:function(){var a=this.oApp.getSelection(),b=a.getNodes(!1,function(a){return!a.childNodes||
|
||||
0==a.childNodes.length?!0:!1}),c,a=0==b.length?this._getStyleOf(a.commonAncestorContainer):this._getStyleOf(b[0]);for(c in a)this.oStyleMap[c].converter&&(a[c]=this.oStyleMap[c].converter(a[c],a)),this.oStyle[c]!=a[c]&&this.oApp.exec("MSG_STYLE_CHANGED",[c,a[c]]);this.oStyle=a},_getStyleOf:function(a){var b=this._getBlankStyle();if(!a)return b;if(3==a.nodeType)a=a.parentNode;var a=c(a),d,f;for(f in this.oStyle)if(d=this.oStyleMap[f],d.type&&"Value"==d.type)if(d.css)d=a.css(d.css),"fontFamily"==f&&
|
||||
(d=d.split(/,/)[0]),b[f]=d;else{if(d.command)try{b[f]=this.oDocument.queryCommandState(d.command)}catch(e){}}else if(d.command)try{b[f]=this.oDocument.queryCommandState(d.command)?1:0}catch(g){}return b}});xe.XE_FontSizeWithSelectUI=c.Class({name:"XE_FontSizeWithSelectUI",$init:function(a){this._assignHTMLObjects(a)},_assignHTMLObjects:function(a){this.elFontSizeSelect=c("SELECT.xpress_xeditor_ui_fontSize_select",a).get(0)},$ON_MSG_APP_READY:function(){this.oApp.registerBrowserEvent(this.elFontSizeSelect,
|
||||
0==a.childNodes.length?!0:!1}),d,a=0==b.length?this._getStyleOf(a.commonAncestorContainer):this._getStyleOf(b[0]);for(d in a)this.oStyleMap[d].converter&&(a[d]=this.oStyleMap[d].converter(a[d],a)),this.oStyle[d]!=a[d]&&this.oApp.exec("MSG_STYLE_CHANGED",[d,a[d]]);this.oStyle=a},_getStyleOf:function(a){var b=this._getBlankStyle();if(!a)return b;if(3==a.nodeType)a=a.parentNode;var a=c(a),d,e;for(e in this.oStyle)if(d=this.oStyleMap[e],d.type&&"Value"==d.type)if(d.css)d=a.css(d.css),"fontFamily"==e&&
|
||||
(d=d.split(/,/)[0]),b[e]=d;else{if(d.command)try{b[e]=this.oDocument.queryCommandState(d.command)}catch(f){}}else if(d.command)try{b[e]=this.oDocument.queryCommandState(d.command)?1:0}catch(g){}return b}});xe.XE_FontSizeWithSelectUI=c.Class({name:"XE_FontSizeWithSelectUI",$init:function(a){this._assignHTMLObjects(a)},_assignHTMLObjects:function(a){this.elFontSizeSelect=c("SELECT.xpress_xeditor_ui_fontSize_select",a).get(0)},$ON_MSG_APP_READY:function(){this.oApp.registerBrowserEvent(this.elFontSizeSelect,
|
||||
"change","SET_FONTSIZE_FROM_SELECT_UI");this.elFontSizeSelect.selectedIndex=0},$ON_MSG_STYLE_CHANGED:function(a,b){if("fontSize"==a&&(this.elFontSizeSelect.value=b,0>this.elFontSizeSelect.selectedIndex))this.elFontSizeSelect.selectedIndex=0},$ON_SET_FONTSIZE_FROM_SELECT_UI:function(){var a=this.elFontSizeSelect.value;a&&(this.oApp.exec("SET_WYSIWYG_STYLE",[{fontSize:a}]),this.oApp.exec("CHECK_STYLE_CHANGE",[]))}});xe.XE_FontNameWithSelectUI=c.Class({name:"XE_FontNameWithSelectUI",$init:function(a){this._assignHTMLObjects(a)},
|
||||
_assignHTMLObjects:function(a){this.elFontNameSelect=c("SELECT.xpress_xeditor_ui_fontName_select",a).get(0)},$ON_MSG_APP_READY:function(){this.oApp.registerBrowserEvent(this.elFontNameSelect,"change","SET_FONTNAME_FROM_SELECT_UI");this.elFontNameSelect.selectedIndex=0},$ON_MSG_STYLE_CHANGED:function(a,b){if("fontFamily"==a&&(this.elFontNameSelect.value=b.toLowerCase(),0>this.elFontNameSelect.selectedIndex))this.elFontNameSelect.selectedIndex=0},$ON_SET_FONTNAME_FROM_SELECT_UI:function(){var a=this.elFontNameSelect.value;
|
||||
a&&(this.oApp.exec("SET_WYSIWYG_STYLE",[{fontFamily:a}]),this.oApp.exec("CHECK_STYLE_CHANGE",[]))}});xe.XE_LineHeight=c.Class({name:"XE_LineHeight",$init:function(a){this._assignHTMLObjects(a)},_assignHTMLObjects:function(){},$ON_SET_LINEHEIGHT:function(a){this.setLineHeight(a)},getLineHeight:function(){var a=this._getSelectedNodes(!1),b,d,f;if(0==a.length)return-1;var e=a.length;0==e?f=-1:(d=this._getLineWrapper(a[0]),f=this._getWrapperLineheight(d));var g=this.oSelection.getStartNode();if(0<f)for(var h=
|
||||
1;h<e;h++)if(!this._isChildOf(a[h],b)&&a[h]&&(b=this._getLineWrapper(a[h]),b!=d)){curHeight=this._getWrapperLineheight(b);if(curHeight!=f){f=-1;break}d=b}b=this._getLineWrapper(a[e-1]);a=this.oSelection.getEndNode();selectText=c.fnBind(function(a,b){this.oSelection.setEndNodes(a,b);this.oSelection.select()},this,g,a);setTimeout(selectText,100);return f},setLineHeight:function(a){function b(a,b){if(!a)try{a=thisRef.oSelection.surroundContentsWithNewNode("P")}catch(c){a=thisRef.oSelection.surroundContentsWithNewNode("DIV")}a.style.lineHeight=
|
||||
b;return a}function d(a){for(;a&&"BODY"!=a.tagName;)a=xe.DOMFix.parentNode(a);return!a?!1:!0}thisRef=this;var f=this._getSelectedNodes(!1);if(0!=f.length){var e,g,h=f.length;this.oApp.exec("RECORD_UNDO_BEFORE_ACTION",["LINEHEIGHT"]);g=this._getLineWrapper(f[0]);for(var l=g=b(g,a),j=g,j=1;j<h;j++){try{if(!d(xe.DOMFix.parentNode(f[j])))continue}catch(k){continue}this._isChildOf(f[j],e)||(e=this._getLineWrapper(f[j]),e!=g&&(g=e=b(e,a)))}setTimeout(c.fnBind(function(a,b){this.oSelection.setEndNodes(a,
|
||||
b);this.oSelection.select();this.oApp.exec("RECORD_UNDO_AFTER_ACTION",["LINEHEIGHT"])},this,l,e||l),100)}},_getSelectedNodes:function(a){if(!a)this.oSelection=this.oApp.getSelection();this.oSelection.collapsed&&this.oSelection.selectNode(this.oSelection.commonAncestorContainer);a=this.oSelection.getTextNodes();if(0==a.length){var b=this.oSelection.getStartNode();b?a[0]=b:a=[]}return a},_getWrapperLineheight:function(a){var b="";if(a&&a.style.lineHeight)b=a.style.lineHeight;else for(a=this.oSelection.commonAncesterContainer;a&&
|
||||
!this.oSelection.rxLineBreaker.test(a.tagName);){if(a&&a.style.lineHeight){b=a.style.lineHeight;break}a=xe.DOMFix.parentNode(a)}return b},_isChildOf:function(a,b){for(;a&&"BODY"!=a.tagName;){if(a==b)return!0;a=xe.DOMFix.parentNode(a)}return!1},_getLineWrapper:function(a){var b=this.oApp.getEmptySelection();b.selectNode(a);var a=b.getLineInfo(),c=a.oStart,f=a.oEnd,e,b=null,a=c.oNode;e=c.oLineBreaker;c=f.oNode;f=f.oLineBreaker;this.oSelection.setEndNodes(a,c);e==f&&("P"==e.tagName||"DIV"==e.tagName?
|
||||
b=e:this.oSelection.setEndNodes(e.firstChild,e.lastChild));return b}});xe.XE_LineHeightWithSelectUI=c.Class({name:"XE_LineHeightWithSelectUI",_assignHTMLObjects:function(a){this.elLineHeightSelect=c("SELECT.xpress_xeditor_ui_lineHeight_select",a).get(0)},$ON_MSG_APP_READY:function(){this.oApp.registerBrowserEvent(this.elLineHeightSelect,"change","SET_LINEHEIGHT_FROM_SELECT_UI");this.elLineHeightSelect.selectedIndex=0},$ON_MSG_STYLE_CHANGED:function(a,b){if("lineHeight"==a&&(this.elLineHeightSelect.value=
|
||||
a&&(this.oApp.exec("SET_WYSIWYG_STYLE",[{fontFamily:a}]),this.oApp.exec("CHECK_STYLE_CHANGE",[]))}});xe.XE_LineHeight=c.Class({name:"XE_LineHeight",$init:function(a){this._assignHTMLObjects(a)},_assignHTMLObjects:function(){},$ON_SET_LINEHEIGHT:function(a){this.setLineHeight(a)},getLineHeight:function(){var a=this._getSelectedNodes(!1),b,d,e;if(0==a.length)return-1;var f=a.length;0==f?e=-1:(d=this._getLineWrapper(a[0]),e=this._getWrapperLineheight(d));var g=this.oSelection.getStartNode();if(0<e)for(var h=
|
||||
1;h<f;h++)if(!this._isChildOf(a[h],b)&&a[h]&&(b=this._getLineWrapper(a[h]),b!=d)){curHeight=this._getWrapperLineheight(b);if(curHeight!=e){e=-1;break}d=b}b=this._getLineWrapper(a[f-1]);a=this.oSelection.getEndNode();selectText=c.fnBind(function(a,b){this.oSelection.setEndNodes(a,b);this.oSelection.select()},this,g,a);setTimeout(selectText,100);return e},setLineHeight:function(a){function b(a,b){if(!a)try{a=thisRef.oSelection.surroundContentsWithNewNode("P")}catch(d){a=thisRef.oSelection.surroundContentsWithNewNode("DIV")}a.style.lineHeight=
|
||||
b;return a}function d(a){for(;a&&"BODY"!=a.tagName;)a=xe.DOMFix.parentNode(a);return!a?!1:!0}thisRef=this;var e=this._getSelectedNodes(!1);if(0!=e.length){var f,g,h=e.length;this.oApp.exec("RECORD_UNDO_BEFORE_ACTION",["LINEHEIGHT"]);g=this._getLineWrapper(e[0]);for(var k=g=b(g,a),j=g,j=1;j<h;j++){try{if(!d(xe.DOMFix.parentNode(e[j])))continue}catch(n){continue}this._isChildOf(e[j],f)||(f=this._getLineWrapper(e[j]),f!=g&&(g=f=b(f,a)))}setTimeout(c.fnBind(function(a,b){this.oSelection.setEndNodes(a,
|
||||
b);this.oSelection.select();this.oApp.exec("RECORD_UNDO_AFTER_ACTION",["LINEHEIGHT"])},this,k,f||k),100)}},_getSelectedNodes:function(a){if(!a)this.oSelection=this.oApp.getSelection();this.oSelection.collapsed&&this.oSelection.selectNode(this.oSelection.commonAncestorContainer);a=this.oSelection.getTextNodes();if(0==a.length){var b=this.oSelection.getStartNode();b?a[0]=b:a=[]}return a},_getWrapperLineheight:function(a){var b="";if(a&&a.style.lineHeight)b=a.style.lineHeight;else for(a=this.oSelection.commonAncesterContainer;a&&
|
||||
!this.oSelection.rxLineBreaker.test(a.tagName);){if(a&&a.style.lineHeight){b=a.style.lineHeight;break}a=xe.DOMFix.parentNode(a)}return b},_isChildOf:function(a,b){for(;a&&"BODY"!=a.tagName;){if(a==b)return!0;a=xe.DOMFix.parentNode(a)}return!1},_getLineWrapper:function(a){var b=this.oApp.getEmptySelection();b.selectNode(a);var a=b.getLineInfo(),d=a.oStart,c=a.oEnd,f,b=null,a=d.oNode;f=d.oLineBreaker;d=c.oNode;c=c.oLineBreaker;this.oSelection.setEndNodes(a,d);f==c&&("P"==f.tagName||"DIV"==f.tagName?
|
||||
b=f:this.oSelection.setEndNodes(f.firstChild,f.lastChild));return b}});xe.XE_LineHeightWithSelectUI=c.Class({name:"XE_LineHeightWithSelectUI",_assignHTMLObjects:function(a){this.elLineHeightSelect=c("SELECT.xpress_xeditor_ui_lineHeight_select",a).get(0)},$ON_MSG_APP_READY:function(){this.oApp.registerBrowserEvent(this.elLineHeightSelect,"change","SET_LINEHEIGHT_FROM_SELECT_UI");this.elLineHeightSelect.selectedIndex=0},$ON_MSG_STYLE_CHANGED:function(a,b){if("lineHeight"==a&&(this.elLineHeightSelect.value=
|
||||
b,0>this.elLineHeightSelect.selectedIndex))this.elLineHeightSelect.selectedIndex=0},$ON_SET_LINEHEIGHT_FROM_SELECT_UI:function(){var a=this.elLineHeightSelect.value;if(a)this.elLineHeightSelect.selectedIndex=0,this.oApp.exec("SET_LINEHEIGHT",[a]),this.oApp.exec("CHECK_STYLE_CHANGE",[])}}).extend(xe.XE_LineHeight);xe.XE_ColorPalette=c.Class({name:"XE_ColorPalette",rxRGBColorPattern:/rgb\((\d+), ?(\d+), ?(\d+)\)/i,$init:function(a){this._assignHTMLObjects(a)},_assignHTMLObjects:function(a){this.elColorPaletteLayer=
|
||||
c("UL.xpress_xeditor_color_palette",a).get(0)},$ON_MSG_APP_READY:function(){this.oApp.registerBrowserEvent(this.elColorPaletteLayer,"click","EVENT_MOUSEUP_COLOR_PALETTE")},$ON_SHOW_COLOR_PALETTE:function(a,b){this.sCallbackCmd=a;this.oLayerContainer=b;this.oLayerContainer.insertBefore(this.elColorPaletteLayer,null);this.elColorPaletteLayer.style.display="block"},$ON_HIDE_COLOR_PALETTE:function(){this.elColorPaletteLayer.style.display="none"},$ON_COLOR_PALETTE_APPLY_COLOR:function(a){if(this.rxRGBColorPattern.test(a))var b=
|
||||
function(a){a=parseInt(a).toString(16);2>a.length&&(a="0"+a);return a.toUpperCase()},a=b(RegExp.$1),c=b(RegExp.$2),b=b(RegExp.$3),a="#"+a+c+b;this.oApp.exec(this.sCallbackCmd,[a])},$ON_EVENT_MOUSEUP_COLOR_PALETTE:function(a){a=a.target;a.style.backgroundColor&&this.oApp.exec("COLOR_PALETTE_APPLY_COLOR",[a.style.backgroundColor])}});xe.XE_FontColor=c.Class({name:"XE_FontColor",rxColorPattern:/^#?[0-9a-fA-F]{6}$|^rgb\(\d+, ?\d+, ?\d+\)$/i,$init:function(a){this._assignHTMLObjects(a)},_assignHTMLObjects:function(a){this.elDropdownLayer=
|
||||
function(a){a=parseInt(a).toString(16);2>a.length&&(a="0"+a);return a.toUpperCase()},a=b(RegExp.$1),d=b(RegExp.$2),b=b(RegExp.$3),a="#"+a+d+b;this.oApp.exec(this.sCallbackCmd,[a])},$ON_EVENT_MOUSEUP_COLOR_PALETTE:function(a){a=a.target;a.style.backgroundColor&&this.oApp.exec("COLOR_PALETTE_APPLY_COLOR",[a.style.backgroundColor])}});xe.XE_FontColor=c.Class({name:"XE_FontColor",rxColorPattern:/^#?[0-9a-fA-F]{6}$|^rgb\(\d+, ?\d+, ?\d+\)$/i,$init:function(a){this._assignHTMLObjects(a)},_assignHTMLObjects:function(a){this.elDropdownLayer=
|
||||
c("DIV.xpress_xeditor_fontcolor_layer",a).get(0)},$ON_MSG_APP_READY:function(){this.oApp.exec("REGISTER_UI_EVENT",["fontColor","click","TOGGLE_FONTCOLOR_LAYER"])},$ON_TOGGLE_FONTCOLOR_LAYER:function(){this.oApp.exec("TOGGLE_TOOLBAR_ACTIVE_LAYER",[this.elDropdownLayer,null,"SHOW_COLOR_PALETTE",["APPLY_FONTCOLOR",this.elDropdownLayer]])},$ON_APPLY_FONTCOLOR:function(a){this.rxColorPattern.test(a)?(this.oApp.exec("SET_WYSIWYG_STYLE",[{color:a}]),this.oApp.exec("HIDE_ACTIVE_LAYER")):alert(this.oApp.$MSG("XE_FontColor.invalidColorCode"))}});
|
||||
xe.XE_BGColor=c.Class({name:"XE_BGColor",rxColorPattern:/^#?[0-9a-fA-F]{6}$|^rgb\(\d+, ?\d+, ?\d+\)$/i,$init:function(a){this._assignHTMLObjects(a)},_assignHTMLObjects:function(a){this.elDropdownLayer=c("DIV.xpress_xeditor_bgcolor_layer",a).get(0)},$ON_MSG_APP_READY:function(){this.oApp.exec("REGISTER_UI_EVENT",["bgColor","click","TOGGLE_BGCOLOR_LAYER"]);this.oApp.registerBrowserEvent(this.elDropdownLayer,"click","EVENT_APPLY_BGCOLOR",[])},$ON_TOGGLE_BGCOLOR_LAYER:function(){this.oApp.exec("TOGGLE_TOOLBAR_ACTIVE_LAYER",
|
||||
[this.elDropdownLayer,null,"SHOW_COLOR_PALETTE",["APPLY_BGCOLOR",this.elDropdownLayer]])},$ON_EVENT_APPLY_BGCOLOR:function(a){a=a.target;if("SPAN"==a.tagName)a=a.parentNode;"BUTTON"==a.tagName&&this.oApp.exec("APPLY_BGCOLOR",[a.style.backgroundColor,a.style.color])},$ON_APPLY_BGCOLOR:function(a,b){if(this.rxColorPattern.test(a)){var c={backgroundColor:a};if(b)c.color=b;this.oApp.exec("SET_WYSIWYG_STYLE",[c]);this.oApp.exec("HIDE_ACTIVE_LAYER")}else alert(this.oApp.$MSG("XE_BGColor.invalidColorCode"))}});
|
||||
[this.elDropdownLayer,null,"SHOW_COLOR_PALETTE",["APPLY_BGCOLOR",this.elDropdownLayer]])},$ON_EVENT_APPLY_BGCOLOR:function(a){a=a.target;if("SPAN"==a.tagName)a=a.parentNode;"BUTTON"==a.tagName&&this.oApp.exec("APPLY_BGCOLOR",[a.style.backgroundColor,a.style.color])},$ON_APPLY_BGCOLOR:function(a,b){if(this.rxColorPattern.test(a)){var d={backgroundColor:a};if(b)d.color=b;this.oApp.exec("SET_WYSIWYG_STYLE",[d]);this.oApp.exec("HIDE_ACTIVE_LAYER")}else alert(this.oApp.$MSG("XE_BGColor.invalidColorCode"))}});
|
||||
xe.XE_Quote=c.Class({name:"XE_Quote",$init:function(a){this._assignHTMLObjects(a)},_assignHTMLObjects:function(a){this.elDropdownLayer=c("DIV.xpress_xeditor_blockquote_layer",a).get(0)},$ON_MSG_APP_READY:function(){this.oApp.exec("REGISTER_UI_EVENT",["quote","click","TOGGLE_BLOCKQUOTE_LAYER"]);this.oApp.registerBrowserEvent(this.elDropdownLayer,"click","EVENT_APPLY_SEDITOR_BLOCKQUOTE",[])},$ON_TOGGLE_BLOCKQUOTE_LAYER:function(){this.oApp.exec("TOGGLE_TOOLBAR_ACTIVE_LAYER",[this.elDropdownLayer])},
|
||||
$ON_EVENT_APPLY_SEDITOR_BLOCKQUOTE:function(a){a=a.target;if("BUTTON"==a.tagName)a=a.parentNode.className,"q8"!=a?this._wrapBlock("BLOCKQUOTE",a):this._unwrapBlock("BLOCKQUOTE"),this.oApp.exec("HIDE_ACTIVE_LAYER",[])},_unwrapBlock:function(a){for(var b=this.oApp.getSelection().commonAncestorContainer;b&&b.tagName!=a;)b=b.parentNode;if(b){for(;b.firstChild;)b.parentNode.insertBefore(b.firstChild,b);b.parentNode.removeChild(b)}},_wrapBlock:function(a,b){var c=this.oApp.getSelection(),f=c.getLineInfo(),
|
||||
e=f.oStart,f=f.oEnd,g=/BODY|TD|LI/i,e=e.bParentBreak&&!g.test(e.oLineBreaker.tagName)?e.oNode.parentNode:e.oNode,f=f.bParentBreak&&!g.test(f.oLineBreaker.tagName)?f.oNode.parentNode:f.oNode;c.setStartBefore(e);c.setEndAfter(f);if(g=this._expandToTableStart(c,f))f=g,c.setEndAfter(g);if(g=this._expandToTableStart(c,e))e=g,c.setStartBefore(g);g=e;for(e=c.commonAncestorContainer;g&&g!=e&&g.parentNode!=e;)g=g.parentNode;oFormattingNode=c._document.createElement(a);if(b)oFormattingNode.className=b;g==e?
|
||||
e.insertBefore(oFormattingNode,e.firstChild):e.insertBefore(oFormattingNode,g);c.setStartAfter(oFormattingNode);c.setEndAfter(f);c.surroundContents(oFormattingNode);e=oFormattingNode.childNodes;for(g=e.length-1;0<=g;g--)if(3==e[g].nodeType||"BR"==e[g].tagName){for(var h=c._document.createElement("P"),f=e[g].nextSibling;0<=g&&e[g]&&(3==e[g].nodeType||"BR"==e[g].tagName);)h.insertBefore(e[g--],h.firstChild);oFormattingNode.insertBefore(h,f);g++}if(oFormattingNode&&oFormattingNode.parentNode)h=c._document.createElement("P"),
|
||||
h.innerHTML=unescape("<br/>"),oFormattingNode.parentNode.insertBefore(h,oFormattingNode.nextSibling);this.oApp.exec("RECORD_UNDO_ACTION",["Block Quote"]);return oFormattingNode},_expandToTableStart:function(a,b){for(var c=a.commonAncestorContainer,f=null,e=!1;b&&!e;){b==c&&(e=!0);if(/TBODY|TFOOT|THEAD|TR/i.test(b.tagName)){f=this._getTableRoot(b);break}b=b.parentNode}return f},_getTableRoot:function(a){for(;a&&"TABLE"!=a.tagName;)a=a.parentNode;return a}});xe.XE_SCharacter=c.Class({name:"XE_SCharacter",
|
||||
$ON_EVENT_APPLY_SEDITOR_BLOCKQUOTE:function(a){a=a.target;if("BUTTON"==a.tagName)a=a.parentNode.className,"q8"!=a?this._wrapBlock("BLOCKQUOTE",a):this._unwrapBlock("BLOCKQUOTE"),this.oApp.exec("HIDE_ACTIVE_LAYER",[])},_unwrapBlock:function(a){for(var b=this.oApp.getSelection().commonAncestorContainer;b&&b.tagName!=a;)b=b.parentNode;if(b){for(;b.firstChild;)b.parentNode.insertBefore(b.firstChild,b);b.parentNode.removeChild(b)}},_wrapBlock:function(a,b){var d=this.oApp.getSelection(),c=d.getLineInfo(),
|
||||
f=c.oStart,c=c.oEnd,g=/BODY|TD|LI/i,f=f.bParentBreak&&!g.test(f.oLineBreaker.tagName)?f.oNode.parentNode:f.oNode,c=c.bParentBreak&&!g.test(c.oLineBreaker.tagName)?c.oNode.parentNode:c.oNode;d.setStartBefore(f);d.setEndAfter(c);if(g=this._expandToTableStart(d,c))c=g,d.setEndAfter(g);if(g=this._expandToTableStart(d,f))f=g,d.setStartBefore(g);g=f;for(f=d.commonAncestorContainer;g&&g!=f&&g.parentNode!=f;)g=g.parentNode;oFormattingNode=d._document.createElement(a);if(b)oFormattingNode.className=b;g==f?
|
||||
f.insertBefore(oFormattingNode,f.firstChild):f.insertBefore(oFormattingNode,g);d.setStartAfter(oFormattingNode);d.setEndAfter(c);d.surroundContents(oFormattingNode);f=oFormattingNode.childNodes;for(g=f.length-1;0<=g;g--)if(3==f[g].nodeType||"BR"==f[g].tagName){for(var h=d._document.createElement("P"),c=f[g].nextSibling;0<=g&&f[g]&&(3==f[g].nodeType||"BR"==f[g].tagName);)h.insertBefore(f[g--],h.firstChild);oFormattingNode.insertBefore(h,c);g++}if(oFormattingNode&&oFormattingNode.parentNode)h=d._document.createElement("P"),
|
||||
h.innerHTML=unescape("<br/>"),oFormattingNode.parentNode.insertBefore(h,oFormattingNode.nextSibling);this.oApp.exec("RECORD_UNDO_ACTION",["Block Quote"]);return oFormattingNode},_expandToTableStart:function(a,b){for(var c=a.commonAncestorContainer,e=null,f=!1;b&&!f;){b==c&&(f=!0);if(/TBODY|TFOOT|THEAD|TR/i.test(b.tagName)){e=this._getTableRoot(b);break}b=b.parentNode}return e},_getTableRoot:function(a){for(;a&&"TABLE"!=a.tagName;)a=a.parentNode;return a}});xe.XE_SCharacter=c.Class({name:"XE_SCharacter",
|
||||
$init:function(a){this.bIE=c.browser.msie;this._assignHTMLObjects(a);this.charSet=[];this.charSet[0]=unescape("FF5B FF5D 3014 3015 3008 3009 300A 300B 300C 300D 300E 300F 3010 3011 2018 2019 201C 201D 3001 3002 %B7 2025 2026 %A7 203B 2606 2605 25CB 25CF 25CE 25C7 25C6 25A1 25A0 25B3 25B2 25BD 25BC 25C1 25C0 25B7 25B6 2664 2660 2661 2665 2667 2663 2299 25C8 25A3 25D0 25D1 2592 25A4 25A5 25A8 25A7 25A6 25A9 %B1 %D7 %F7 2260 2264 2265 221E 2234 %B0 2032 2033 2220 22A5 2312 2202 2261 2252 226A 226B 221A 223D 221D 2235 222B 222C 2208 220B 2286 2287 2282 2283 222A 2229 2227 2228 FFE2 21D2 21D4 2200 2203 %B4 FF5E 02C7 02D8 02DD 02DA 02D9 %B8 02DB %A1 %BF 02D0 222E 2211 220F 266D 2669 266A 266C 327F 2192 2190 2191 2193 2194 2195 2197 2199 2196 2198 321C 2116 33C7 2122 33C2 33D8 2121 2668 260F 260E 261C 261E %B6 2020 2021 %AE %AA %BA 2642 2640").replace(/(\S{4})/g,
|
||||
function(a){return"%u"+a}).split(" ");this.charSet[1]=unescape("%BD 2153 2154 %BC %BE 215B 215C 215D 215E %B9 %B2 %B3 2074 207F 2081 2082 2083 2084 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 FFE6 %24 FFE5 FFE1 20AC 2103 212B 2109 FFE0 %A4 2030 3395 3396 3397 2113 3398 33C4 33A3 33A4 33A5 33A6 3399 339A 339B 339C 339D 339E 339F 33A0 33A1 33A2 33CA 338D 338E 338F 33CF 3388 3389 33C8 33A7 33A8 33B0 33B1 33B2 33B3 33B4 33B5 33B6 33B7 33B8 33B9 3380 3381 3382 3383 3384 33BA 33BB 33BC 33BD 33BE 33BF 3390 3391 3392 3393 3394 2126 33C0 33C1 338A 338B 338C 33D6 33C5 33AD 33AE 33AF 33DB 33A9 33AA 33AB 33AC 33DD 33D0 33D3 33C3 33C9 33DC 33C6").replace(/(\S{4})/g,
|
||||
function(a){return"%u"+a}).split(" ");this.charSet[2]=unescape("3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 326A 326B 326C 326D 326E 326F 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 327A 327B 24D0 24D1 24D2 24D3 24D4 24D5 24D6 24D7 24D8 24D9 24DA 24DB 24DC 24DD 24DE 24DF 24E0 24E1 24E2 24E3 24E4 24E5 24E6 24E7 24E8 24E9 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 246A 246B 246C 246D 246E 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 320A 320B 320C 320D 320E 320F 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 321A 321B 249C 249D 249E 249F 24A0 24A1 24A2 24A3 24A4 24A5 24A6 24A7 24A8 24A9 24AA 24AB 24AC 24AD 24AE 24AF 24B0 24B1 24B2 24B3 24B4 24B5 2474 2475 2476 2477 2478 2479 247A 247B 247C 247D 247E 247F 2480 2481 2482").replace(/(\S{4})/g,
|
||||
|
|
@ -138,22 +138,22 @@ function(a){return"%u"+a}).split(" ");this.charSet[3]=unescape("3131 3132 3133 3
|
|||
function(a){return"%u"+a}).split(" ");this.charSet[4]=unescape("0391 0392 0393 0394 0395 0396 0397 0398 0399 039A 039B 039C 039D 039E 039F 03A0 03A1 03A3 03A4 03A5 03A6 03A7 03A8 03A9 03B1 03B2 03B3 03B4 03B5 03B6 03B7 03B8 03B9 03BA 03BB 03BC 03BD 03BE 03BF 03C0 03C1 03C3 03C4 03C5 03C6 03C7 03C8 03C9 %C6 %D0 0126 0132 013F 0141 %D8 0152 %DE 0166 014A %E6 0111 %F0 0127 I 0133 0138 0140 0142 0142 0153 %DF %FE 0167 014B 0149 0411 0413 0414 0401 0416 0417 0418 0419 041B 041F 0426 0427 0428 0429 042A 042B 042C 042D 042E 042F 0431 0432 0433 0434 0451 0436 0437 0438 0439 043B 043F 0444 0446 0447 0448 0449 044A 044B 044C 044D 044E 044F").replace(/(\S{4})/g,
|
||||
function(a){return"%u"+a}).split(" ");this.charSet[5]=unescape("3041 3042 3043 3044 3045 3046 3047 3048 3049 304A 304B 304C 304D 304E 304F 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 305A 305B 305C 305D 305E 305F 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 306A 306B 306C 306D 306E 306F 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 307A 307B 307C 307D 307E 307F 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 308A 308B 308C 308D 308E 308F 3090 3091 3092 3093 30A1 30A2 30A3 30A4 30A5 30A6 30A7 30A8 30A9 30AA 30AB 30AC 30AD 30AE 30AF 30B0 30B1 30B2 30B3 30B4 30B5 30B6 30B7 30B8 30B9 30BA 30BB 30BC 30BD 30BE 30BF 30C0 30C1 30C2 30C3 30C4 30C5 30C6 30C7 30C8 30C9 30CA 30CB 30CC 30CD 30CE 30CF 30D0 30D1 30D2 30D3 30D4 30D5 30D6 30D7 30D8 30D9 30DA 30DB 30DC 30DD 30DE 30DF 30E0 30E1 30E2 30E3 30E4 30E5 30E6 30E7 30E8 30E9 30EA 30EB 30EC 30ED 30EE 30EF 30F0 30F1 30F2 30F3 30F4 30F5 30F6").replace(/(\S{4})/g,
|
||||
function(a){return"%u"+a}).split(" ")},_assignHTMLObjects:function(a){a=c.$(a)||document;this.elDropdownLayer=c("DIV.xpress_xeditor_sCharacter_layer",a).get(0);this.oTextField=c("INPUT",this.elDropdownLayer).get(0);this.oInsertButton=c("+ BUTTON",this.oTextField).get(0);this.aCloseButton=c("BUTTON.close",this.elDropdownLayer).get();this.aSCharList=c(".list",this.elDropdownLayer).get();a=c(">UL",this.elDropdownLayer).get(0);this.aLabelA=c("A",a).get()},$ON_MSG_APP_READY:function(){var a=c.fnBind(this.oApp.exec,
|
||||
this.oApp,"INSERT_SCHARACTERS",[this.oTextField.value]);c(this.oInsertButton).click(a,this);this.oApp.exec("SET_SCHARACTER_LIST",[this.charSet]);for(a=0;a<this.aLabelA.length;a++){var b=c.fnBind(this.oApp.exec,this.oApp,"CHANGE_SCHARACTER_SET",[a]);c(this.aLabelA[a]).mousedown(b);this._stopBrowserEvent(this.aLabelA[a],"click")}for(a=0;a<this.aCloseButton.length;a++)this.oApp.registerBrowserEvent(this.aCloseButton[a],"click","HIDE_ACTIVE_LAYER",[]);this.oApp.registerBrowserEvent(this.elDropdownLayer,
|
||||
"click","EVENT_SCHARACTER_CLICKED",[]);this.oApp.exec("REGISTER_UI_EVENT",["sCharacter","click","TOGGLE_SCHARACTER_LAYER"])},$ON_TOGGLE_SCHARACTER_LAYER:function(){this.oTextField.value="";this.oSelection=this.oApp.getSelection();this.oApp.exec("TOGGLE_TOOLBAR_ACTIVE_LAYER",[this.elDropdownLayer])},$ON_EVENT_SCHARACTER_CLICKED:function(a){a=a.target;"BUTTON"==a.tagName&&"LI"==a.parentNode.tagName&&this.oApp.exec("SELECT_SCHARACTER",[a.firstChild.innerHTML])},$ON_SELECT_SCHARACTER:function(a){this.oTextField.value+=
|
||||
this.oApp,"INSERT_SCHARACTERS",[this.oTextField.value]);c(this.oInsertButton).click(a);this.oApp.exec("SET_SCHARACTER_LIST",[this.charSet]);for(a=0;a<this.aLabelA.length;a++){var b=c.fnBind(this.oApp.exec,this.oApp,"CHANGE_SCHARACTER_SET",[a]);c(this.aLabelA[a]).mousedown(b);this._stopBrowserEvent(this.aLabelA[a],"click")}for(a=0;a<this.aCloseButton.length;a++)this.oApp.registerBrowserEvent(this.aCloseButton[a],"click","HIDE_ACTIVE_LAYER",[]);this.oApp.registerBrowserEvent(this.elDropdownLayer,"click",
|
||||
"EVENT_SCHARACTER_CLICKED",[]);this.oApp.exec("REGISTER_UI_EVENT",["sCharacter","click","TOGGLE_SCHARACTER_LAYER"])},$ON_TOGGLE_SCHARACTER_LAYER:function(){this.oTextField.value="";this.oSelection=this.oApp.getSelection();this.oApp.exec("TOGGLE_TOOLBAR_ACTIVE_LAYER",[this.elDropdownLayer])},$ON_EVENT_SCHARACTER_CLICKED:function(a){a=a.target;"BUTTON"==a.tagName&&"LI"==a.parentNode.tagName&&this.oApp.exec("SELECT_SCHARACTER",[a.firstChild.innerHTML])},$ON_SELECT_SCHARACTER:function(a){this.oTextField.value+=
|
||||
a;if(this.oTextField.createTextRange)a=this.oTextField.createTextRange(),a.collapse(!1),a.select();else if(this.oTextField.selectionEnd)this.oTextField.selectionEnd=this.oTextField.value.length,this.oTextField.focus()},$ON_INSERT_SCHARACTERS:function(){this.oSelection.pasteHTML(this.oTextField.value);this.oApp.exec("HIDE_ACTIVE_LAYER",[])},$ON_CHANGE_SCHARACTER_SET:function(a){for(var b=0;b<this.aSCharList.length;b++)if("block"==this.aSCharList[b].style.display){if(b==a)return;c(this.aLabelA[b]).removeClass("on");
|
||||
this.aSCharList[b].style.display="none"}this._drawSCharList(a);c(this.aLabelA[a]).addClass("on");this.aSCharList[a].style.display="block"},$ON_SET_SCHARACTER_LIST:function(a){this.charSet=a;this.bSCharSetDrawn=Array(this.charSet.length);this._drawSCharList(0)},_drawSCharList:function(a){if(!this.bSCharSetDrawn[a]){this.bSCharSetDrawn[a]=!0;var b=this.charSet[a].length,c=Array(b);this.aSCharList[a].innerHTML="";for(var f=0;f<b;f++)c[f]=document.createElement("LI"),c[f].innerHTML='<button type="button"><span>'+
|
||||
unescape(this.charSet[a][f])+"</span></button>",this.aSCharList[a].appendChild(c[f])}},_stopBrowserEvent:function(a,b){c(a).bind(b,function(a){a.stopPropagation();a.preventDefault()})}});xe.XE_UndoRedo=c.Class({name:"XE_UndoRedo",actionHistory:null,oCurStateIdx:null,iMinimumSizeChange:10,sBlankContentsForFF:"<br>",$init:function(){this.aUndoHistory=[];this.oCurStateIdx={nIdx:0,nStep:0}},$PRECONDITION:function(a){if(a.match(/_DO_RECORD_UNDO_HISTORY_AT$/))return!0;try{if("WYSIWYG"!=this.oApp.getEditingMode())return!1}catch(b){return!1}return!0},
|
||||
this.aSCharList[b].style.display="none"}this._drawSCharList(a);c(this.aLabelA[a]).addClass("on");this.aSCharList[a].style.display="block"},$ON_SET_SCHARACTER_LIST:function(a){this.charSet=a;this.bSCharSetDrawn=Array(this.charSet.length);this._drawSCharList(0)},_drawSCharList:function(a){if(!this.bSCharSetDrawn[a]){this.bSCharSetDrawn[a]=!0;var b=this.charSet[a].length,c=Array(b);this.aSCharList[a].innerHTML="";for(var e=0;e<b;e++)c[e]=document.createElement("LI"),c[e].innerHTML='<button type="button"><span>'+
|
||||
unescape(this.charSet[a][e])+"</span></button>",this.aSCharList[a].appendChild(c[e])}},_stopBrowserEvent:function(a,b){c(a).bind(b,function(a){a.stopPropagation();a.preventDefault()})}});xe.XE_UndoRedo=c.Class({name:"XE_UndoRedo",actionHistory:null,oCurStateIdx:null,iMinimumSizeChange:10,sBlankContentsForFF:"<br>",$init:function(){this.aUndoHistory=[];this.oCurStateIdx={nIdx:0,nStep:0}},$PRECONDITION:function(a){if(a.match(/_DO_RECORD_UNDO_HISTORY_AT$/))return!0;try{if("WYSIWYG"!=this.oApp.getEditingMode())return!1}catch(b){return!1}return!0},
|
||||
$BEFORE_MSG_APP_READY:function(){this.oApp.exec("DO_RECORD_UNDO_HISTORY_AT",[this.oCurStateIdx,"","",null])},$ON_MSG_APP_READY:function(){this.bFF=c.browser.mozilla;this.oApp.exec("ADD_APP_PROPERTY",["getUndoHistory",c.fnBind(this.getUndoHistory,this)]);this.oApp.exec("ADD_APP_PROPERTY",["getUndoStateIdx",c.fnBind(this.getUndoStateIdx,this)]);this.oApp.exec("REGISTER_UI_EVENT",["undo","click","UNDO"]);this.oApp.exec("REGISTER_UI_EVENT",["redo","click","REDO"]);this.oApp.exec("REGISTER_HOTKEY",["ctrl+z",
|
||||
"UNDO"]);this.oApp.exec("REGISTER_HOTKEY",["ctrl+y","REDO"])},$ON_UNDO:function(){this.oApp.exec("DO_RECORD_UNDO_HISTORY",["KEYPRESS",!1,!1,1]);if(0!=this.oCurStateIdx.nIdx){if(0<this.oCurStateIdx.nStep)this.oCurStateIdx.nStep--;else{var a=this.aUndoHistory[this.oCurStateIdx.nIdx];this.oCurStateIdx.nIdx--;1<a.nTotalSteps?this.oCurStateIdx.nStep=0:(a=this.aUndoHistory[this.oCurStateIdx.nIdx],this.oCurStateIdx.nStep=a.nTotalSteps-1)}this.oApp.exec("RESTORE_UNDO_HISTORY",[this.oCurStateIdx.nIdx,this.oCurStateIdx.nStep]);
|
||||
this.oApp.exec("CHECK_STYLE_CHANGE",[])}},$ON_REDO:function(){if(!(this.oCurStateIdx.nIdx>=this.aUndoHistory.length)){var a=this.aUndoHistory[this.oCurStateIdx.nIdx];if(!(this.oCurStateIdx.nIdx==this.aUndoHistory.length-1&&this.oCurStateIdx.nStep>=a.nTotalSteps-1))this.oCurStateIdx.nStep<a.nTotalSteps-1?this.oCurStateIdx.nStep++:(this.oCurStateIdx.nIdx++,a=this.aUndoHistory[this.oCurStateIdx.nIdx],this.oCurStateIdx.nStep=a.nTotalSteps-1),this.oApp.exec("RESTORE_UNDO_HISTORY",[this.oCurStateIdx.nIdx,
|
||||
this.oCurStateIdx.nStep]),this.oApp.exec("CHECK_STYLE_CHANGE",[])}},$ON_RECORD_UNDO_ACTION:function(a){this.oApp.exec("DO_RECORD_UNDO_HISTORY",[a])},$ON_RECORD_UNDO_BEFORE_ACTION:function(a){this.oApp.exec("DO_RECORD_UNDO_HISTORY",[a,!0,!0])},$ON_RECORD_UNDO_AFTER_ACTION:function(a){this.oApp.exec("DO_RECORD_UNDO_HISTORY",[a,!0,!1])},$ON_RESTORE_UNDO_HISTORY:function(a,b){this.oCurStateIdx.nIdx=a;this.oCurStateIdx.nStep=b;var c=this.aUndoHistory[this.oCurStateIdx.nIdx],f=c.oBookmark[this.oCurStateIdx.nStep];
|
||||
this.oApp.setIR(c.sContent[this.oCurStateIdx.nStep],!0);var e=this.oApp.getIR();this.bFF&&e==this.sBlankContentsForFF&&(e="");c.sContent[this.oCurStateIdx.nStep]=e;c=this.oApp.getEmptySelection();c.selectionLoaded&&(f?c.moveToXPathBookmark(f):c=this.oApp.getEmptySelection(),c.select())},$ON_DO_RECORD_UNDO_HISTORY:function(a,b,c,f){b=b||!1;c=c||!1;f=f||0;this.oCurStateIdx.nIdx!=this.aUndoHistory.length-1&&(f=1);var e=this.aUndoHistory[this.oCurStateIdx.nIdx],g=this.oApp.getIR(),h=e.sContent[this.oCurStateIdx.nStep];
|
||||
this.bFF&&g==this.sBlankContentsForFF&&(g="");if(!b)switch(f){case 0:if(Math.abs(h.length-g.length)<this.iMinimumSizeChange)return;break;case 1:if(h==g)return}h=this.oApp.getSelection();f=null;h.selectionLoaded&&(f=h.getXPathBookmark());h={nIdx:this.oCurStateIdx.nIdx,nStep:this.oCurStateIdx.nStep};h.nStep=b?c?0:1:0;if(0==h.nStep&&this.oCurStateIdx.nStep==e.nTotalSteps-1)h.nIdx=this.oCurStateIdx.nIdx+1;this.oApp.exec("DO_RECORD_UNDO_HISTORY_AT",[h,a,g,f])},$ON_DO_RECORD_UNDO_HISTORY_AT:function(a,
|
||||
b,c,f){0!=a.nStep?(this.aUndoHistory[a.nIdx].nTotalSteps=a.nStep+1,this.aUndoHistory[a.nIdx].sContent[a.nStep]=c,this.aUndoHistory[a.nIdx].oBookmark[a.nStep]=f):(b={sAction:b,nTotalSteps:1,sContent:[]},b.sContent[0]=c,b.oBookmark=[],b.oBookmark[0]=f,this.aUndoHistory.splice(a.nIdx,this.aUndoHistory.length-a.nIdx,b));this.oCurStateIdx.nIdx=a.nIdx;this.oCurStateIdx.nStep=a.nStep},_getUndoHistory:function(){return this.aUndoHistory},_getUndoStateIdx:function(){return this.oCurStateIdx}});xe.XE_Hyperlink=
|
||||
this.oCurStateIdx.nStep]),this.oApp.exec("CHECK_STYLE_CHANGE",[])}},$ON_RECORD_UNDO_ACTION:function(a){this.oApp.exec("DO_RECORD_UNDO_HISTORY",[a])},$ON_RECORD_UNDO_BEFORE_ACTION:function(a){this.oApp.exec("DO_RECORD_UNDO_HISTORY",[a,!0,!0])},$ON_RECORD_UNDO_AFTER_ACTION:function(a){this.oApp.exec("DO_RECORD_UNDO_HISTORY",[a,!0,!1])},$ON_RESTORE_UNDO_HISTORY:function(a,b){this.oCurStateIdx.nIdx=a;this.oCurStateIdx.nStep=b;var c=this.aUndoHistory[this.oCurStateIdx.nIdx],e=c.oBookmark[this.oCurStateIdx.nStep];
|
||||
this.oApp.setIR(c.sContent[this.oCurStateIdx.nStep],!0);var f=this.oApp.getIR();this.bFF&&f==this.sBlankContentsForFF&&(f="");c.sContent[this.oCurStateIdx.nStep]=f;c=this.oApp.getEmptySelection();c.selectionLoaded&&(e?c.moveToXPathBookmark(e):c=this.oApp.getEmptySelection(),c.select())},$ON_DO_RECORD_UNDO_HISTORY:function(a,b,c,e){b=b||!1;c=c||!1;e=e||0;this.oCurStateIdx.nIdx!=this.aUndoHistory.length-1&&(e=1);var f=this.aUndoHistory[this.oCurStateIdx.nIdx],g=this.oApp.getIR(),h=f.sContent[this.oCurStateIdx.nStep];
|
||||
this.bFF&&g==this.sBlankContentsForFF&&(g="");if(!b)switch(e){case 0:if(Math.abs(h.length-g.length)<this.iMinimumSizeChange)return;break;case 1:if(h==g)return}h=this.oApp.getSelection();e=null;h.selectionLoaded&&(e=h.getXPathBookmark());h={nIdx:this.oCurStateIdx.nIdx,nStep:this.oCurStateIdx.nStep};h.nStep=b?c?0:1:0;if(0==h.nStep&&this.oCurStateIdx.nStep==f.nTotalSteps-1)h.nIdx=this.oCurStateIdx.nIdx+1;this.oApp.exec("DO_RECORD_UNDO_HISTORY_AT",[h,a,g,e])},$ON_DO_RECORD_UNDO_HISTORY_AT:function(a,
|
||||
b,c,e){0!=a.nStep?(this.aUndoHistory[a.nIdx].nTotalSteps=a.nStep+1,this.aUndoHistory[a.nIdx].sContent[a.nStep]=c,this.aUndoHistory[a.nIdx].oBookmark[a.nStep]=e):(b={sAction:b,nTotalSteps:1,sContent:[]},b.sContent[0]=c,b.oBookmark=[],b.oBookmark[0]=e,this.aUndoHistory.splice(a.nIdx,this.aUndoHistory.length-a.nIdx,b));this.oCurStateIdx.nIdx=a.nIdx;this.oCurStateIdx.nStep=a.nStep},_getUndoHistory:function(){return this.aUndoHistory},_getUndoStateIdx:function(){return this.oCurStateIdx}});xe.XE_Hyperlink=
|
||||
c.Class({name:"XE_Hyperlink",sATagMarker:"HTTP://HUSKY_TMP.MARKER/",$init:function(a){this._assignHTMLObjects(a);this.sRXATagMarker=this.sATagMarker.replace(/\//g,"\\/").replace(/\./g,"\\.")},_assignHTMLObjects:function(a){this.oHyperlinkLayer=c("DIV.xpress_xeditor_hyperlink_layer",a).get(0);this.oLinkInput=c("INPUT[type=text]",this.oHyperlinkLayer).get(0);this.oBtnConfirm=c("BUTTON.confirm",this.oHyperlinkLayer).get(0);this.oBtnCancel=c("BUTTON.cancel",this.oHyperlinkLayer).get(0);this.oCbNewWin=
|
||||
c("INPUT[type=checkbox]",this.oHyperlinkLayer).get(0)},$ON_MSG_APP_READY:function(){this.oApp.exec("REGISTER_HOTKEY",["ctrl+k","XE_TOGGLE_HYPERLINK_LAYER",[]]);this.oApp.registerBrowserEvent(this.oBtnConfirm,"mousedown","XE_APPLY_HYPERLINK");this.oApp.registerBrowserEvent(this.oBtnCancel,"mousedown","HIDE_ACTIVE_LAYER");this.oApp.registerBrowserEvent(this.oLinkInput,"keydown","EVENT_XE_HYPERLINK_KEYDOWN");this.oApp.exec("REGISTER_UI_EVENT",["hyperlink","click","XE_TOGGLE_HYPERLINK_LAYER"])},$ON_XE_TOGGLE_HYPERLINK_LAYER:function(){this.oApp.delayedExec("TOGGLE_TOOLBAR_ACTIVE_LAYER",
|
||||
[this.oHyperlinkLayer,null,"XE_RESET_HYPERLINK_LAYER",[]],0)},$ON_XE_RESET_HYPERLINK_LAYER:function(){this.oApp.exec("FOCUS",[]);this.oSelection=this.oApp.getSelection();var a=this.oSelection.findAncestorByTagName("A");this.oCbNewWin.checked=!1;if(a){this.oSelection.selectNode(a);this.oSelection.select();var b=a.target;if(b&&"_blank"==b)this.oCbNewWin.checked=!0;this.oLinkInput.value=a.href?a.href:"http://"}else this.oLinkInput.value="http://";this.oLinkInput.focus();this.oLinkInput.value=this.oLinkInput.value},
|
||||
$ON_XE_APPLY_HYPERLINK:function(){var a=this.oLinkInput.value,b=this.oCbNewWin.checked?"_blank":"";this.oApp.exec("FOCUS",[]);this.oSelection=this.oApp.getSelection();if(this.oSelection.collapsed)this.oSelection.pasteHTML("<a href='"+a+"' target="+b+">"+a+"</a>");else{var d=this.sATagMarker+Math.ceil(1E4*Math.random());this.oApp.exec("EXECCOMMAND",""==a?["unlink"]:["createLink",!1,d+a]);try{this.oSelection.setFromSelection()}catch(f){}a=this.oApp.getWYSIWYGDocument();c(a.body.getElementsByTagName("A")).filter('[href^="'+
|
||||
$ON_XE_APPLY_HYPERLINK:function(){var a=this.oLinkInput.value,b=this.oCbNewWin.checked?"_blank":"";this.oApp.exec("FOCUS",[]);this.oSelection=this.oApp.getSelection();if(this.oSelection.collapsed)this.oSelection.pasteHTML("<a href='"+a+"' target="+b+">"+a+"</a>");else{var d=this.sATagMarker+Math.ceil(1E4*Math.random());this.oApp.exec("EXECCOMMAND",""==a?["unlink"]:["createLink",!1,d+a]);try{this.oSelection.setFromSelection()}catch(e){}a=this.oApp.getWYSIWYGDocument();c(a.body.getElementsByTagName("A")).filter('[href^="'+
|
||||
d+'"]').attr("href",function(){var a=RegExp("^"+d.replace(/([\.\\])/g,"\\$1"),"i");b?c(this).attr("target",b):c(this).removeAttr("target");return this.href.replace(a,"")})}this.oApp.exec("HIDE_ACTIVE_LAYER");setTimeout(c.fnBind(function(){try{this.oSelection.select()}catch(a){}},this),0)},_validateURL:function(a){return/^(http|https|ftp|mailto):(?:\/\/)?((\w|-)+(?:[\.:@](\w|-))+)(?:\/|@)?([^"\?]*?)(?:\?([^\?"]*?))?$/.test(a)},$ON_EVENT_XE_HYPERLINK_KEYDOWN:function(a){13==a.keyCode&&(this.oApp.exec("XE_APPLY_HYPERLINK"),
|
||||
a.preventDefault(),a.stopPropagation())}});xe.XE_Table=c.Class({name:"XE_Table",iMinRows:1,iMaxRows:20,iMinColumns:1,iMaxColumns:10,iMinBorderWidth:1,iMaxBorderWidth:10,oSelection:null,$init:function(a){this._assignHTMLObjects(a)},_assignHTMLObjects:function(a){var b=null;this.elDropdownLayer=c("DIV.xpress_xeditor_table_layer",a).get(0);this.welDropdownLayer=c(this.elDropdownLayer);b=c("INPUT",this.elDropdownLayer).get();this.oRowInput=b[0];this.oColumnInput=b[1];this.oBorderWidthInput=b[2];this.oBorderColorInput=
|
||||
b[3];this.oBGColorInput=b[4];b=c("BUTTON",this.elDropdownLayer).get();this.oButton_AddRow=b[0];this.oButton_RemoveRow=b[1];this.oButton_AddColumn=b[2];this.oButton_RemoveColumn=b[3];this.oButton_IncBorderWidth=b[4];this.oButton_DecBorderWidth=b[5];this.oButton_BorderColorPreview=b[6];this.oButton_BorderColor=b[7];this.oButton_BGColorPreview=b[8];this.oButton_BGColor=b[9];this.oButton_Insert=b[10];this.oButton_Cancel=b[11];this.oSampleTable=c("TABLE",this.elDropdownLayer).get(0)},$ON_MSG_APP_READY:function(){this.oApp.exec("REGISTER_UI_EVENT",
|
||||
|
|
@ -166,44 +166,42 @@ this.iMinBorderWidth;if(a>this.iMaxBorderWidth)a=this.iMaxBorderWidth;this.oBord
|
|||
this.welDropdownLayer.removeClass("p2");this.oApp.exec("SHOW_COLOR_PALETTE",["ST_SET_BORDER_COLOR_FROM_PALETTE",this.elDropdownLayer])},$ON_ST_HIDE_BORDER_COLOR_LAYER:function(){this.welDropdownLayer.removeClass("p1");this.oApp.exec("HIDE_COLOR_PALETTE",[])},$ON_ST_TOGGLE_BGCOLOR_LAYER:function(){this.welDropdownLayer.hasClass("p2")?this.oApp.exec("ST_HIDE_BGCOLOR_LAYER",[]):this.oApp.exec("ST_SHOW_BGCOLOR_LAYER",[])},$ON_ST_SHOW_BGCOLOR_LAYER:function(){this.welDropdownLayer.removeClass("p1");this.welDropdownLayer.addClass("p2");
|
||||
this.oApp.exec("SHOW_COLOR_PALETTE",["ST_SET_BGCOLOR_FROM_PALETTE",this.elDropdownLayer])},$ON_ST_HIDE_BGCOLOR_LAYER:function(){this.welDropdownLayer.removeClass("p2");this.oApp.exec("HIDE_COLOR_PALETTE",[])},$ON_ST_SET_BORDER_COLOR_FROM_PALETTE:function(a){this.oApp.exec("ST_SET_BORDER_COLOR",[a]);this.oApp.exec("ST_HIDE_BORDER_COLOR_LAYER",[])},$ON_ST_SET_BORDER_COLOR:function(a){this.oBorderColorInput.value=a;this.oButton_BorderColorPreview.style.backgroundColor=a;this._showNewTable()},$ON_ST_SET_BGCOLOR_FROM_PALETTE:function(a){this.oApp.exec("ST_SET_BGCOLOR",
|
||||
[a]);this.oApp.exec("ST_HIDE_BGCOLOR_LAYER",[])},$ON_ST_SET_BGCOLOR:function(a){this.oBGColorInput.value=a;this.oButton_BGColorPreview.style.backgroundColor=a;this._showNewTable()},_showNewTable:function(){var a=document.createElement("DIV");a.innerHTML=this._getTableString();a=a.firstChild;this.oSampleTable.parentNode.insertBefore(a,this.oSampleTable);this.oSampleTable.parentNode.removeChild(this.oSampleTable);this.oSampleTable=a},_getTableString:function(){for(var a=this.oBorderColorInput.value,
|
||||
b=this.oBGColorInput.value,d=this.oBorderWidthInput.value,f="",f=c.browser.msie?"<td><p></p></td>":c.browser.firefox?"<td><p><br/></p></td>":"<td><p> </p></td>",b='<tr style="background:'+b+'">',e=this.oColumnInput.value,g=0;g<e;g++)b+=f;b+="</tr>\n";f=this.oRowInput.value;a='<table style="background:'+a+'" cellspacing="'+d+'"><tbody>';for(g=0;g<f;g++)a+=b;return a+"</tbody></table>"}});xe.XE_EditingModeToggler=c.Class({name:"XE_EditingModeToggler",$init:function(a){this._assignHTMLObjects(a)},
|
||||
b=this.oBGColorInput.value,d=this.oBorderWidthInput.value,e="",e=c.browser.msie?"<td><p></p></td>":c.browser.firefox?"<td><p><br/></p></td>":"<td><p> </p></td>",b='<tr style="background:'+b+'">',f=this.oColumnInput.value,g=0;g<f;g++)b+=e;b+="</tr>\n";e=this.oRowInput.value;a='<table style="background:'+a+'" cellspacing="'+d+'"><tbody>';for(g=0;g<e;g++)a+=b;return a+"</tbody></table>"}});xe.XE_EditingModeToggler=c.Class({name:"XE_EditingModeToggler",$init:function(a){this._assignHTMLObjects(a)},
|
||||
_assignHTMLObjects:function(a){a=c.$(a)||document;this.elModeToggleButton=c("BUTTON.xpress_xeditor_mode_toggle_button",a).get(0);this.welModeToggleButton=c(this.elModeToggleButton)},$ON_MSG_APP_READY:function(){this.oApp.registerBrowserEvent(this.elModeToggleButton,"click","EVENT_TOGGLE_EDITING_MODE",[])},$ON_EVENT_TOGGLE_EDITING_MODE:function(){"WYSIWYG"==this.oApp.getEditingMode()?this.oApp.exec("CHANGE_EDITING_MODE",["HTMLSrc"]):this.oApp.exec("CHANGE_EDITING_MODE",["WYSIWYG"])},$ON_CHANGE_EDITING_MODE:function(a){"HTMLSrc"==
|
||||
a?(this.welModeToggleButton.addClass("active").parent("span").addClass("active"),this.oApp.exec("DISABLE_ALL_UI",[])):(this.welModeToggleButton.removeClass("active").parent("span").removeClass("active"),this.oApp.exec("ENABLE_ALL_UI",[]))}});xe.XpressCore.oMessageMap={"XE_EditingAreaManager.onExit":"%uB0B4%uC6A9%uC774%20%uBCC0%uACBD%uB418%uC5C8%uC2B5%uB2C8%uB2E4.","XE_FontColor.invalidColorCode":"%uC0C9%uC0C1%20%uCF54%uB4DC%uB97C%20%uC62C%uBC14%uB974%uAC8C%20%uC785%uB825%uD558%uC5EC%20%uC8FC%uC2DC%uAE30%20%uBC14%uB78D%uB2C8%uB2E4.\n\n%uC608%29%20%23000000%2C%20%23FF0000%2C%20%23FFFFFF%2C%20%23ffffff%2C%20ffffff",
|
||||
"XE_BGColor.invalidColorCode":"%uC0C9%uC0C1%20%uCF54%uB4DC%uB97C%20%uC62C%uBC14%uB974%uAC8C%20%uC785%uB825%uD558%uC5EC%20%uC8FC%uC2DC%uAE30%20%uBC14%uB78D%uB2C8%uB2E4.\n\n%uC608%29%20%23000000%2C%20%23FF0000%2C%20%23FFFFFF%2C%20%23ffffff%2C%20ffffff","XE_Hyperlink.invalidURL":"%uC785%uB825%uD558%uC2E0%20URL%uC774%20%uC62C%uBC14%uB974%uC9C0%20%uC54A%uC2B5%uB2C8%uB2E4."};regex_handler=/<(.*?)\s+on[a-z]+\s*=(?:\s*".*?"|\s*'.*?'|[^\s>]+)(.*?)>/ig;regex_font_color=/color\s*=(?:\s*"(.*?)"|\s*'(.*?)'|([^\s>]+))/i;
|
||||
regex_font_face=/face\s*=(?:\s*"(.*?)"|\s*'(.*?)'|([^\s>]+))/i;regex_font_size=/size\s*=(?:\s*"(\d+)"|\s*'(\d+)'|(\d+))/i;regex_style=/style\s*=\s*(?:\s*"(.*?)"|\s*'(.*?)'|([^\s>]+))/i;regex_font_weight=/font-weight\s*:\s*([a-z]+);?/i;regex_font_style=/font-style\s*:\s*italic;?/i;regex_font_decoration=/text-decoration\s*:\s*([a-z -]+);?/i;regex_jquery=/jQuery\d+\s*=(\s*"\d+"|\d+)/ig;regex_quote_attr=/([\w-]+\s*=(?:\s*"[^"]+"|\s*'[^']+'))|([\w-]+)=([^\s]+)/g;"a,abbr,acronym,address,area,blockquote,br,caption,center,cite,code,col,colgroup,dd,del,dfn,div,dl,dt,em,embed,h1,h2,h3,h4,h5,h6,hr,img,ins,kbd,li,map,object,ol,p,param,pre,q,samp,span,strong,sub,sup,table,tbody,td,tfoot,th,thead,tr,tt,u,ul,var,iframe,object,param,style".split(",");
|
||||
var o="area,br,col,embed,hr,img,input,param".split(",");xe.XE_XHTMLFormatter=c.Class({name:"XE_XHTMLFormatter",$ON_MSG_APP_READY:function(){this.oApp.addConverter("WYSIWYG_TO_IR",this.TO_IR);this.oApp.addConverter("HTMLSrc_TO_IR",this.TO_IR);this.oApp.addConverter("IR_TO_HTMLSrc",this.IR_TO);this.oApp.addConverter("IR_TO_WYSIWYG",this.IR_TO)},TO_IR:function(a){var b=[];c.browser.msie&&(a=a.replace(regex_jquery,""),a=a.replace(/<(\w+) ([^>]+)>/g,function(a,b,c){return"<"+b+" "+c.replace(regex_quote_attr,
|
||||
function(a,b,c,d){return b?b:/^"/.test(d)||/"$/.test(d)?c+"="+d:c+'="'+(d||c)+'"'})+">"}));regex=/<(\/)?([:\w\/-]+)(.*?)>/ig;a=a.replace(regex,function(a,d,g,h){d=d||"";g=g.toLowerCase();h=c.trim(h||"");if(d){h=[];a="";if(!b.length)return"";do a=b.pop(),a.tag==g&&"deleted"!=a.state&&h.push("</"+a.tag+">");while(b.length&&a.tag!=g);return h.join("")}if(0<=c.inArray(g,o)){a=h.length;"br"==g&&(h="");if(!h||"/"!=h.substring(a-1,a))h+="/";return"<"+g+" "+c.trim(h)+">"}b[b.length]={tag:g,state:""};return"<"+
|
||||
var p="area,br,col,embed,hr,img,input,param".split(",");xe.XE_XHTMLFormatter=c.Class({name:"XE_XHTMLFormatter",$ON_MSG_APP_READY:function(){this.oApp.addConverter("WYSIWYG_TO_IR",this.TO_IR);this.oApp.addConverter("HTMLSrc_TO_IR",this.TO_IR);this.oApp.addConverter("IR_TO_HTMLSrc",this.IR_TO);this.oApp.addConverter("IR_TO_WYSIWYG",this.IR_TO)},TO_IR:function(a){var b=[];c.browser.msie&&(a=a.replace(regex_jquery,""),a=a.replace(/<(\w+) ([^>]+)>/g,function(a,b,c){return"<"+b+" "+c.replace(regex_quote_attr,
|
||||
function(a,b,c,d){return b?b:/^"/.test(d)||/"$/.test(d)?c+"="+d:c+'="'+(d||c)+'"'})+">"}));regex=/<(\/)?([:\w\/-]+)(.*?)>/ig;a=a.replace(regex,function(a,d,g,h){d=d||"";g=g.toLowerCase();h=c.trim(h||"");if(d){h=[];a="";if(!b.length)return"";do a=b.pop(),a.tag==g&&"deleted"!=a.state&&h.push("</"+a.tag+">");while(b.length&&a.tag!=g);return h.join("")}if(0<=c.inArray(g,p)){a=h.length;"br"==g&&(h="");if(!h||"/"!=h.substring(a-1,a))h+="/";return"<"+g+" "+c.trim(h)+">"}b[b.length]={tag:g,state:""};return"<"+
|
||||
d+g+(h?" "+h:"")+">"});if(b.length){var d="";do d=b.pop(),"deleted"!=d.state&&(a+="</"+d.tag+">");while(b.length)}return a},IR_TO:function(a){return a}});xe.XE_Extension=c.Class({name:"XE_Extension",seq:"",last_doc:"",$init:function(a,b){this.seq=b;this._assignHTMLObjects(a)},_assignHTMLObjects:function(a){this.elDropdownLayer=c("DIV.xpress_xeditor_extension_layer",a).get(0)},_removeAttrs:function(a){return a},_addEvent:function(){if("WYSIWYG"==this.oApp.getEditingMode()){var a=this.oApp.getWYSIWYGDocument(),
|
||||
b=this.seq,d=function(){var a=c(this),d=a.attr("editor_component");d&&c.isFunction(openComponent)&&(editorPrevNode=a.get(0),openComponent(d,b))};c(a).find("img,div[editor_component]").each(function(){var b=c(this);"IMG"==this.nodeName&&!b.attr("editor_component")&&b.attr("editor_component","image_link");if(this.last_doc!=a)b.dblclick(d),this.last_doc=a})}},$ON_MSG_APP_READY:function(){var a=this.oApp;a.exec("REGISTER_UI_EVENT",["extension","click","TOGGLE_EXTENSION_LAYER"]);var b=function(){a.exec("HIDE_ACTIVE_LAYER",
|
||||
[])};c("a",this.elDropdownLayer).each(function(){var a=c(this);a.attr("component_onclick_event_added")||(a.click(b),a.attr("component_onclick_event_added","Y"))})},$ON_TOGGLE_EXTENSION_LAYER:function(){this.oApp.exec("TOGGLE_TOOLBAR_ACTIVE_LAYER",[this.elDropdownLayer])},$ON_CHANGE_EDITING_MODE:function(){var a=this;setTimeout(function(){a._addEvent()},100)},$ON_PASTE_HTML:function(){var a=this;setTimeout(function(){a._addEvent()},100)},$ON_LOAD_IR_FIELD:function(){var a=this;setTimeout(function(){a._addEvent()},
|
||||
100)},$ON_SET_IR:function(){var a=this;setTimeout(function(){a._addEvent()},100)}});xe.XE_AutoSave=c.Class({name:"XE_AutoSave",form:null,textarea:null,$init:function(a,b){this.form=a.form;this.textarea=a;this._assignHTMLObjects(b)},_assignHTMLObjects:function(){this.welMessageBox=c("autosave_message")},$ON_MSG_APP_READY:function(){var a=c(this.form._saved_doc_title),b=c(this.form._saved_doc_content),a=c.trim(a.val()),b=c.trim(b.val());if(a||b)confirm(this.form._saved_doc_message.value)?(c(this.form.title).val(a),
|
||||
this.oApp.setIR(b),"function"==typeof editorGetAutoSavedDoc&&editorGetAutoSavedDoc(this.form)):editorRemoveSavedDoc();editorEnableAutoSave(this.form,c(this.form).attr("editor_sequence"));this.oApp.exec("REGISTER_HOTKEY",["ctrl+shift+s","AUTO_SAVE"])},$ON_AUTO_SAVE:function(){_editorAutoSave()}});xe.XE_FormatWithSelectUI=c.Class({name:"XE_FormatWithSelectUI",$init:function(a){this._assignHTMLObjects(a)},_assignHTMLObjects:function(a){this.elFormatSelect=c("SELECT.xpress_xeditor_ui_format_select",a).get(0)},
|
||||
$ON_MSG_APP_READY:function(){this.oApp.registerBrowserEvent(this.elFormatSelect,"change","SET_FORMAT_FROM_SELECT_UI");this.elFormatSelect.selectedIndex=0},$ON_MSG_STYLE_CHANGED:function(){var a=this.oApp.getWYSIWYGDocument().queryCommandValue("FormatBlock");if(!a)return this.elFormatSelect.selectedIndex=0;c.browser.msie&&/([0-9])/.test(a)&&(a="h"+RegExp.$1);this.elFormatSelect.value=a.toLowerCase();if(0>this.elFormatSelect.selectedIndex)this.elFormatSelect.selectedIndex=0;if(this.elFormatSelect.value!=
|
||||
b=this.seq,d=function(){var a=c(this),d=a.attr("editor_component");d&&c.isFunction(openComponent)&&(editorPrevNode=a.get(0),openComponent(d,b))};c(a).find("img,div[editor_component]").each(function(){var b=c(this);"IMG"==this.nodeName&&!b.attr("editor_component")&&b.attr("editor_component","image_link");if(this.last_doc!=a)b.unbind("dblclick.widget").bind("dblclick.widget",d),this.last_doc=a})}},$ON_MSG_APP_READY:function(){var a=this.oApp;a.exec("REGISTER_UI_EVENT",["extension","click","TOGGLE_EXTENSION_LAYER"]);
|
||||
var b=function(){a.exec("HIDE_ACTIVE_LAYER",[])};c("a",this.elDropdownLayer).each(function(){var a=c(this);a.attr("component_onclick_event_added")||(a.click(b),a.attr("component_onclick_event_added","Y"))})},$ON_TOGGLE_EXTENSION_LAYER:function(){this.oApp.exec("TOGGLE_TOOLBAR_ACTIVE_LAYER",[this.elDropdownLayer])},$ON_CHANGE_EDITING_MODE:function(){var a=this;setTimeout(function(){a._addEvent()},100)},$ON_PASTE_HTML:function(){var a=this;setTimeout(function(){a._addEvent()},100)},$ON_LOAD_IR_FIELD:function(){var a=
|
||||
this;setTimeout(function(){a._addEvent()},100)},$ON_SET_IR:function(){var a=this;setTimeout(function(){a._addEvent()},100)}});xe.XE_AutoSave=c.Class({name:"XE_AutoSave",form:null,textarea:null,$init:function(a,b){this.form=a.form;this.textarea=a;this._assignHTMLObjects(b)},_assignHTMLObjects:function(){this.welMessageBox=c("autosave_message")},$ON_MSG_APP_READY:function(){var a=c(this.form._saved_doc_title),b=c(this.form._saved_doc_content),a=c.trim(a.val()),b=c.trim(b.val());if(a||b)confirm(this.form._saved_doc_message.value)?
|
||||
(c(this.form.title).val(a),this.oApp.setIR(b),"function"==typeof editorGetAutoSavedDoc&&editorGetAutoSavedDoc(this.form)):editorRemoveSavedDoc();editorEnableAutoSave(this.form,c(this.form).attr("editor_sequence"));this.oApp.exec("REGISTER_HOTKEY",["ctrl+shift+s","AUTO_SAVE"])},$ON_AUTO_SAVE:function(){_editorAutoSave()}});xe.XE_FormatWithSelectUI=c.Class({name:"XE_FormatWithSelectUI",$init:function(a){this._assignHTMLObjects(a)},_assignHTMLObjects:function(a){this.elFormatSelect=c("SELECT.xpress_xeditor_ui_format_select",
|
||||
a).get(0)},$ON_MSG_APP_READY:function(){this.oApp.registerBrowserEvent(this.elFormatSelect,"change","SET_FORMAT_FROM_SELECT_UI");this.elFormatSelect.selectedIndex=0},$ON_MSG_STYLE_CHANGED:function(){var a=this.oApp.getWYSIWYGDocument().queryCommandValue("FormatBlock");if(!a)return this.elFormatSelect.selectedIndex=0;c.browser.msie&&/([0-9])/.test(a)&&(a="h"+RegExp.$1);this.elFormatSelect.value=a.toLowerCase();if(0>this.elFormatSelect.selectedIndex)this.elFormatSelect.selectedIndex=0;if(this.elFormatSelect.value!=
|
||||
a.toLowerCase())this.elFormatSelect.selectedIndex=0},$ON_SET_FORMAT_FROM_SELECT_UI:function(){var a=this.elFormatSelect.value;a&&(c.browser.msie&&(a="<"+a+">"),this.oApp.exec("EXECCOMMAND",["FormatBlock",!1,a]),this.oApp.exec("CHECK_STYLE_CHANGE",[]))}});xe.XE_Table=c.Class({_startSel:null,_endSel:null,$ON_MSG_APP_READY:function(){this._doc=c(this.oApp.getWYSIWYGDocument());this.$FnMouseDown=c.fnBind(this._mousedown,this);this.$FnMouseUp=c.fnBind(this._mouseup,this);this.$FnMouseMove=c.fnBind(this._mousemove,
|
||||
this);this._doc.mousedown(this.$FnMouseDown);this._endSel=this._startSel=null;this.oApp.exec("REGISTER_UI_EVENT",["merge_cells","click","MERGE_CELLS"]);this.oApp.exec("REGISTER_UI_EVENT",["split_col","click","CELL_SPLIT_BY_COL"]);this.oApp.exec("REGISTER_UI_EVENT",["split_row","click","CELL_SPLIT_BY_ROW"]);this.oApp.exec("REGISTER_HOTKEY",["ctrl+alt+m","MERGE_CELLS"]);this.$super.$ON_MSG_APP_READY()},$ON_MERGE_CELLS:function(){var a="",b=c(".xe_selected_cell",this.oApp.getWYSIWYGDocument()).filter("td,th"),
|
||||
d=this;if(b.length){this.oApp.exec("RECORD_UNDO_ACTION",["Cell:Merge"]);b.each(function(){a+=c(this).html()}).eq(0).html(a);var f=0;b.eq(0).nextAll("td,th").andSelf().filter(".xe_selected_cell").each(function(){f+=d._getSpan(this,"col")});this._getRect(b.eq(0));var e=b.eq(0).parent("tr"),g=b.eq(b.length-1).parent("tr"),h=b.parents("table").eq(0).find("tr"),e=h.index(g.get(0))-h.index(e.get(0))+this._getSpan(b.eq(b.length-1),"row");b.eq(0).attr("colSpan",f).attr("rowSpan",e);b.slice(1).remove()}},
|
||||
$ON_CELL_SPLIT_BY_ROW:function(){var a=c(".xe_selected_cell",this.oApp.getWYSIWYGDocument()).filter("td,th"),b=a.parents("table").eq(0),d=this;if(a.length){this.oApp.exec("RECORD_UNDO_ACTION",["Cell:Split By Row"]);var f=this._getRect(a.eq(0)).top,e=this._getRect(a.eq(a.length-1)).bottom;(a=b.find("td,th").filter(function(){var a=d._getRect(c(this));return!(a.bottom<=f||a.top>=e)})).filter(".xe_selected_cell").each(function(){var b=c(this),e=b.parent("tr"),f=d._getSpan(b,"row"),j=d._getRect(b),k=
|
||||
[],n=b.clone().html("<br />"),m=1,o=1;1<f?(m=Math.ceil(f/2),o=f-m,k.push(function(){b.attr("rowSpan",m)}),n.attr("rowSpan",o)):(a.filter(function(){if(b.get(0)==this)return!1;var a=c(this),a=d._getRect(a);return a.bottom<=j.top||a.top>=j.bottom?!1:!0}).each(function(){var a=c(this),b=d._getSpan(a,"row")+1;k.push(function(){a.attr("rowSpan",b)})}),c.browser.msie?e.after(e.clone().empty().get(0).outerHTML):e.after(e.clone().empty()));f=e.nextAll("tr");f.length?(e=f.eq(m-1).children("td,th").filter(function(){return d._getRect(c(this)).left>
|
||||
j.left}),c.browser.msie?e.length?e.eq(0).before(n.get(0).outerHTML):f.eq(m-1).append(n.get(0).outerHTML):e.length?e.slice(0,1).before(n):f.slice(m-1,1).append(n)):e.after(e.clone().empty().append(n));c.each(k,function(){this()})})}},$ON_CELL_SPLIT_BY_COL:function(){var a=c(".xe_selected_cell",this.oApp.getWYSIWYGDocument()).filter("td,th"),b=a.parents("table").slice(0,1),d=this;(new Date).getTime();if(a.length){this.oApp.exec("RECORD_UNDO_ACTION",["Cell:Split By Column"]);var f=a.eq(0).parent("tr"),
|
||||
e=this._getRect(f.find(".xe_selected_cell:first")).left,g=this._getRect(f.find(".xe_selected_cell:last")).right;(a=b.find("td,th").filter(function(){var a=d._getRect(c(this));return!(a.right<=e||a.left>=g)})).filter(".xe_selected_cell").each(function(){var b=c(this),e=d._getSpan(b,"col"),f=b.clone().html("<br />");if(1<e){var g=Math.ceil(e/2),e=e-g;b.attr("colSpan",g);f.attr("colSpan",e)}else{var k=d._getRect(b);a.filter(function(){if(b.get(0)==this)return!1;var a=c(this),a=d._getRect(a);return a.right<=
|
||||
k.left||a.left>=k.right?!1:!0}).each(function(){var a=c(this);a.attr("colSpan",d._getSpan(a,"col")+1)});f.attr("colSpan",1)}c.browser.msie?b.after(f.get(0).outerHTML):b.after(f)})}},$ON_CHECK_STYLE_CHANGE:function(){var a=this.oApp,b=this._startSel&&this._startSel.is(".xe_selected_cell")?"ENABLE_UI":"DISABLE_UI";c.each(["merge_cells","split_col","split_row"],function(){a.exec(b,[this])})},_mousedown:function(a){var b=c(a.target).parents().andSelf().filter("td,th,table"),d=this.oApp,f=this;c("td.xe_selected_cell",
|
||||
this.oApp.getWYSIWYGDocument()).removeClass("xe_selected_cell");this._endSel=this._startSel=null;b.length&&this._isLeftClicked(a.button)&&setTimeout(function(){b=d.getSelection().cloneRange();b.collapseToStart();b=c(b.startContainer).parents().andSelf().filter("td,th").eq(0);if(!b.length)return f._removeAllListener()||!0;f._getRect(f._startSel=b);f._doc.bind("mousemove",f.$FnMouseMove);f._doc.bind("mouseup",f.$FnMouseUp)},0)},_mouseup:function(){this._removeAllListener();this._startSel=this._endSel=
|
||||
null},_mousemove:function(a){var b=c(a.target).parents().andSelf().filter("td,th").eq(0),d=this;if(b.length&&this._isLeftClicked(a.button)&&(this._endSel||b.get(0)!=this._startSel.get(0))&&!(this._endSel&&b.get(0)==this._endSel.get(0))){this._getRect(this._endSel=b);var f=Math.min(this._startSel.rect.top,this._endSel.rect.top),e=Math.min(this._startSel.rect.left,this._endSel.rect.left),g=Math.max(this._startSel.rect.bottom,this._endSel.rect.bottom),h=Math.max(this._startSel.rect.right,this._endSel.rect.right),
|
||||
a=b.parents("table").find("td,th").removeClass("xe_selected_cell"),b=c();do b.each(function(){var a=d._getRect(c(this));if(a.right>h)h=a.right;if(a.left<e)e=a.left;if(a.top<f)f=a.top;if(a.bottom>g)g=a.bottom}),a=a.filter(":not(.xe_selected_cell)"),b=a.filter(function(){var a=d._getRect(c(this));return a.right<=e||a.left>=h||a.bottom<=f||a.top>=g?!1:!0}).addClass("xe_selected_cell");while(b.length);c.browser.mozilla||setTimeout(function(){var a=d.oApp.getSelection();d._startSel&&(d._startSel.get(0).firstChild||
|
||||
d=this;if(b.length){this.oApp.exec("RECORD_UNDO_ACTION",["Cell:Merge"]);b.each(function(){a+=c(this).html()}).eq(0).html(a);var e=0;b.eq(0).nextAll("td,th").andSelf().filter(".xe_selected_cell").each(function(){e+=d._getSpan(this,"col")});this._getRect(b.eq(0));var f=b.eq(0).parent("tr"),g=b.eq(b.length-1).parent("tr"),h=b.parents("table").eq(0).find("tr"),f=h.index(g.get(0))-h.index(f.get(0))+this._getSpan(b.eq(b.length-1),"row");b.eq(0).attr("colSpan",e).attr("rowSpan",f);b.slice(1).remove()}},
|
||||
$ON_CELL_SPLIT_BY_ROW:function(){var a=c(".xe_selected_cell",this.oApp.getWYSIWYGDocument()).filter("td,th"),b=a.parents("table").eq(0),d=this;if(a.length){this.oApp.exec("RECORD_UNDO_ACTION",["Cell:Split By Row"]);var e=this._getRect(a.eq(0)).top,f=this._getRect(a.eq(a.length-1)).bottom;(a=b.find("td,th").filter(function(){var a=d._getRect(c(this));return!(a.bottom<=e||a.top>=f)})).filter(".xe_selected_cell").each(function(){var b=c(this),e=b.parent("tr"),f=d._getSpan(b,"row"),j=d._getRect(b),n=
|
||||
[],m=b.clone().html("<br />"),l=1,o=1;1<f?(l=Math.ceil(f/2),o=f-l,n.push(function(){b.attr("rowSpan",l)}),m.attr("rowSpan",o)):(a.filter(function(){if(b.get(0)==this)return!1;var a=c(this),a=d._getRect(a);return a.bottom<=j.top||a.top>=j.bottom?!1:!0}).each(function(){var a=c(this),b=d._getSpan(a,"row")+1;n.push(function(){a.attr("rowSpan",b)})}),c.browser.msie?e.after(e.clone().empty().get(0).outerHTML):e.after(e.clone().empty()));f=e.nextAll("tr");f.length?(e=f.eq(l-1).children("td,th").filter(function(){return d._getRect(c(this)).left>
|
||||
j.left}),c.browser.msie?e.length?e.eq(0).before(m.get(0).outerHTML):f.eq(l-1).append(m.get(0).outerHTML):e.length?e.slice(0,1).before(m):f.slice(l-1,1).append(m)):e.after(e.clone().empty().append(m));c.each(n,function(){this()})})}},$ON_CELL_SPLIT_BY_COL:function(){var a=c(".xe_selected_cell",this.oApp.getWYSIWYGDocument()).filter("td,th"),b=a.parents("table").slice(0,1),d=this;(new Date).getTime();if(a.length){this.oApp.exec("RECORD_UNDO_ACTION",["Cell:Split By Column"]);var e=a.eq(0).parent("tr"),
|
||||
f=this._getRect(e.find(".xe_selected_cell:first")).left,g=this._getRect(e.find(".xe_selected_cell:last")).right;(a=b.find("td,th").filter(function(){var a=d._getRect(c(this));return!(a.right<=f||a.left>=g)})).filter(".xe_selected_cell").each(function(){var b=c(this),e=d._getSpan(b,"col"),f=b.clone().html("<br />");if(1<e){var g=Math.ceil(e/2),e=e-g;b.attr("colSpan",g);f.attr("colSpan",e)}else{var m=d._getRect(b);a.filter(function(){if(b.get(0)==this)return!1;var a=c(this),a=d._getRect(a);return a.right<=
|
||||
m.left||a.left>=m.right?!1:!0}).each(function(){var a=c(this);a.attr("colSpan",d._getSpan(a,"col")+1)});f.attr("colSpan",1)}c.browser.msie?b.after(f.get(0).outerHTML):b.after(f)})}},$ON_CHECK_STYLE_CHANGE:function(){var a=this.oApp,b=this._startSel&&this._startSel.is(".xe_selected_cell")?"ENABLE_UI":"DISABLE_UI";c.each(["merge_cells","split_col","split_row"],function(){a.exec(b,[this])})},_mousedown:function(a){var b=c(a.target).parents().andSelf().filter("td,th,table"),d=this.oApp,e=this;c("td.xe_selected_cell",
|
||||
this.oApp.getWYSIWYGDocument()).removeClass("xe_selected_cell");this._endSel=this._startSel=null;b.length&&this._isLeftClicked(a.button)&&setTimeout(function(){b=d.getSelection().cloneRange();b.collapseToStart();b=c(b.startContainer).parents().andSelf().filter("td,th").eq(0);if(!b.length)return e._removeAllListener()||!0;e._getRect(e._startSel=b);e._doc.bind("mousemove",e.$FnMouseMove);e._doc.bind("mouseup",e.$FnMouseUp)},0)},_mouseup:function(){this._removeAllListener();this._startSel=this._endSel=
|
||||
null},_mousemove:function(a){var b=c(a.target).parents().andSelf().filter("td,th").eq(0),d=this;if(b.length&&this._isLeftClicked(a.button)&&(this._endSel||b.get(0)!=this._startSel.get(0))&&!(this._endSel&&b.get(0)==this._endSel.get(0))){this._getRect(this._endSel=b);var e=Math.min(this._startSel.rect.top,this._endSel.rect.top),f=Math.min(this._startSel.rect.left,this._endSel.rect.left),g=Math.max(this._startSel.rect.bottom,this._endSel.rect.bottom),h=Math.max(this._startSel.rect.right,this._endSel.rect.right),
|
||||
a=b.parents("table").find("td,th").removeClass("xe_selected_cell"),b=c();do b.each(function(){var a=d._getRect(c(this));if(a.right>h)h=a.right;if(a.left<f)f=a.left;if(a.top<e)e=a.top;if(a.bottom>g)g=a.bottom}),a=a.filter(":not(.xe_selected_cell)"),b=a.filter(function(){var a=d._getRect(c(this));return a.right<=f||a.left>=h||a.bottom<=e||a.top>=g?!1:!0}).addClass("xe_selected_cell");while(b.length);c.browser.mozilla||setTimeout(function(){var a=d.oApp.getSelection();d._startSel&&(d._startSel.get(0).firstChild||
|
||||
d._startSel.text(" "),a.selectNode(d._startSel.get(0).firstChild),a.collapseToStart(),a.select())},0);return!1}},_removeAllListener:function(){this._doc.unbind("mousemove",this.$FnMouseMove);this._doc.unbind("mouseup",this.$FnMouseUp)},_isLeftClicked:function(a){return c.browser.msie?!!(a&1):0==a},_getRect:function(a){var b=a.get(0);a.rect={};a.rect.top=b.offsetTop;a.rect.left=b.offsetLeft;a.rect.bottom=a.rect.top+b.offsetHeight;a.rect.right=a.rect.left+b.offsetWidth;return a.rect},_getSpan:function(a,
|
||||
b){var d=parseInt(c(a).attr(b+"span"));return isNaN(d)?1:d}}).extend(xe.XE_Table)})(jQuery);window.xe||(xe={});xe.Editors=[];
|
||||
function editorStart_xe(c,k,m,o,a,b,d,f){function e(){try{var a=p.contentWindow.document;if("about:blank"==a.location)throw"blank";j.registerPlugin(new xe.XE_EditingArea_WYSIWYG(p));j.registerPlugin(new xe.XpressRangeManager(p));j.registerPlugin(new xe.XE_ExecCommand(p));if(d&&!a.body.style.fontFamily)a.body.style.fontFamily=d;if(f&&!a.body.style.fontSize)a.body.style.fontSize=f;j.run()}catch(b){setTimeout(e,0)}}"undefined"==typeof a&&(a="white");"undefined"==typeof b&&(b="xeStyle");"undefined"==
|
||||
typeof d&&(d="");"undefined"==typeof f&&(f="");var g=request_uri+"modules/editor/styles/"+b+"/editor.html",b=jQuery("#xpress-editor-"+c),g=jQuery('<iframe id="editor_iframe_'+c+'" allowTransparency="true" frameborder="0" src="'+g+'" scrolling="yes" style="width:100%;height:'+o+'px">'),h=jQuery('<textarea rows="10" cols="20" class="input_syntax '+a+'" style="display:none"></textarea>'),a=b.get(0).form;a.setAttribute("editor_sequence",c);b.css("display","none");var l="";0<jQuery("input[name=content]",
|
||||
a).size()&&(l=jQuery("input[name=content]",a).val().replace(/src=\"files\/attach/g,'src="'+request_uri+"files/attach"),jQuery("#xpress-editor-"+c).val(l));b.hide().css("width","99%").before(g).after(h);var j=new xe.XpressCore,p=g.get(0),b=b.get(0),g=h.get(0),h=jQuery(".xpress-editor",a).get(0);j.getFrame=function(){return p};j.getContent=function(){editorGetContentTextarea_xe(c)};l=a[m].value;xFF&&!l&&(l="<br />");l=editorReplacePath(l);a[m].value=l;jQuery("#xpress-editor-"+c).val(l);editorRelKeys[c]=
|
||||
[];editorRelKeys[c].primary=a[k];editorRelKeys[c].content=a[m];editorRelKeys[c].func=editorGetContentTextarea_xe;editorRelKeys[c].editor=j;editorRelKeys[c].pasteHTML=function(a){j.exec("PASTE_HTML",[a])};xe.Editors[c]=j;j.registerPlugin(new xe.CorePlugin(null));j.registerPlugin(new xe.XE_PreservTemplate(jQuery("#xpress-editor-"+c).val()));j.registerPlugin(new xe.StringConverterManager);j.registerPlugin(new xe.XE_EditingAreaManager("WYSIWYG",b,{nHeight:parseInt(o),nMinHeight:205},null,h));j.registerPlugin(new xe.XE_EditingArea_HTMLSrc(g));
|
||||
function editorStart_xe(c,l,o,p,a,b,d,e){function f(){try{var a=n.contentWindow.document;if("about:blank"==a.location)throw"blank";j.registerPlugin(new xe.XE_EditingArea_WYSIWYG(n));j.registerPlugin(new xe.XpressRangeManager(n));j.registerPlugin(new xe.XE_ExecCommand(n));if(d&&!a.body.style.fontFamily)a.body.style.fontFamily=d;if(e&&!a.body.style.fontSize)a.body.style.fontSize=e;j.run()}catch(b){setTimeout(f,0)}}"undefined"==typeof a&&(a="white");"undefined"==typeof b&&(b="xeStyle");"undefined"==
|
||||
typeof d&&(d="");"undefined"==typeof e&&(e="");var g=request_uri+"modules/editor/styles/"+b+"/editor.html",b=jQuery("#xpress-editor-"+c),g=jQuery('<iframe id="editor_iframe_'+c+'" allowTransparency="true" frameborder="0" src="'+g+'" scrolling="yes" style="width:100%;height:'+p+'px">'),h=jQuery('<textarea rows="10" cols="20" class="input_syntax '+a+'" style="display:none"></textarea>'),a=b.get(0).form;a.setAttribute("editor_sequence",c);b.css("display","none");var k="";0<jQuery("input[name=content]",
|
||||
a).size()&&(k=jQuery("input[name=content]",a).val().replace(/src=\"files\/attach/g,'src="'+request_uri+"files/attach"),jQuery("#xpress-editor-"+c).val(k));b.hide().css("width","100%").before(g).after(h);var j=new xe.XpressCore,n=g.get(0),b=b.get(0),g=h.get(0),h=jQuery(".xpress-editor",a).get(0);j.getFrame=function(){return n};j.getContent=function(){editorGetContentTextarea_xe(c)};k=a[o].value;xFF&&!k&&(k="<br />");k=editorReplacePath(k);a[o].value=k;jQuery("#xpress-editor-"+c).val(k);editorRelKeys[c]=
|
||||
[];editorRelKeys[c].primary=a[l];editorRelKeys[c].content=a[o];editorRelKeys[c].func=editorGetContentTextarea_xe;editorRelKeys[c].editor=j;editorRelKeys[c].pasteHTML=function(a){j.exec("PASTE_HTML",[a])};xe.Editors[c]=j;j.registerPlugin(new xe.CorePlugin(null));j.registerPlugin(new xe.XE_PreservTemplate(jQuery("#xpress-editor-"+c).val()));j.registerPlugin(new xe.StringConverterManager);j.registerPlugin(new xe.XE_EditingAreaManager("WYSIWYG",b,{nHeight:parseInt(p),nMinHeight:205},null,h));j.registerPlugin(new xe.XE_EditingArea_HTMLSrc(g));
|
||||
j.registerPlugin(new xe.XE_EditingAreaVerticalResizer(h));j.registerPlugin(new xe.Utils);j.registerPlugin(new xe.DialogLayerManager);j.registerPlugin(new xe.ActiveLayerManager);j.registerPlugin(new xe.Hotkey);j.registerPlugin(new xe.XE_WYSIWYGStyler);j.registerPlugin(new xe.XE_WYSIWYGStyleGetter);j.registerPlugin(new xe.MessageManager(xe.XpressCore.oMessageMap));j.registerPlugin(new xe.XE_Toolbar(h));j.registerPlugin(new xe.XE_XHTMLFormatter);j.registerPlugin(new xe.XE_GET_WYSYWYG_MODE(c));jQuery("ul.extra1").length&&
|
||||
(j.registerPlugin(new xe.XE_ColorPalette(h)),j.registerPlugin(new xe.XE_FontColor(h)),j.registerPlugin(new xe.XE_BGColor(h)),j.registerPlugin(new xe.XE_Quote(h)),j.registerPlugin(new xe.XE_FontNameWithSelectUI(h)),j.registerPlugin(new xe.XE_FontSizeWithSelectUI(h)),j.registerPlugin(new xe.XE_LineHeightWithSelectUI(h)),j.registerPlugin(new xe.XE_UndoRedo),j.registerPlugin(new xe.XE_Table(h)),j.registerPlugin(new xe.XE_Hyperlink(h)),j.registerPlugin(new xe.XE_FormatWithSelectUI(h)),j.registerPlugin(new xe.XE_SCharacter(h)));
|
||||
jQuery("ul.extra2").length&&j.registerPlugin(new xe.XE_Extension(h,c));jQuery("ul.extra3").length&&j.registerPlugin(new xe.XE_EditingModeToggler(h));!jQuery.browser.msie&&!jQuery.browser.opera&&j.registerPlugin(new xe.XE_WYSIWYGEnterKey(p));(s=a._saved_doc_title)&&j.registerPlugin(new xe.XE_AutoSave(b,h));e();return j}
|
||||
function editorGetContentTextarea_xe(c){c=xe.Editors[c]||null;if(!c)return"";c=c.getIR();if(!jQuery.trim(c.replace(/( |<\/?(p|br|span|div)([^>]+)?>)/ig,"")))return"";c=c.replace(/<br ?\/?>$/i,"");if(1024>c.length){var k="#text,A,BR,IMG,EM,STRONG,SPAN,BIG,CITE,CODE,DD,DFN,HR,INS,KBD,LINK,Q,SAMP,SMALL,SUB,SUP,TT".split(","),m=!0,o=jQuery("<div>"+c+"</div>").eq(0).contents();jQuery.each(o,function(){3!=this.nodeType&&-1==jQuery.inArray(this.nodeName,k)&&(m=!1)});m&&(c="<p>"+c+"</p>")}c=c.replace(/src\s?=\s?(["']?)(?:\.\.\/)+(files\/attach\/)/ig,
|
||||
function(a,b,c){return"src="+(b||"")+c});c=c.replace(/\<(\/)?([A-Z]+)([^>]*)\>/ig,function(a,b,c,f){f=f?f.replace(/ ([A-Z]+?)\=/ig,function(a,b){b=b.toLowerCase();return" "+b+"="}):"";c=c.toLowerCase();b||(b="");return"<"+b+c+f+">"});return c=c.replace("<br>","<br />")}function editorGetIframe(c){return jQuery("iframe#editor_iframe_"+c).get(0)}function editorReplaceHTML(c,k){var k=editorReplacePath(k),m=parseInt(c.id.replace(/^.*_/,""),10);editorRelKeys[m].pasteHTML(k)}
|
||||
function editorReplacePath(c){return c=c.replace(/\<([^\>\<]*)(src=|href=|url\()("|\')*([^"\'\)]+)("|\'|\))*(\s|>)*/ig,function(c,m,o,a,b,d,f){"url("==o?(a="",d=")"):("undefined"==typeof a&&(a='"'),"undefined"==typeof d&&(d='"'),"undefined"==typeof f&&(f=""));b=jQuery.trim(b).replace(/^\.\//,"");return/^(http\:|https\:|ftp\:|telnet\:|mms\:|mailto\:|\/|\.\.|\#)/i.test(b)?c:"<"+m+o+a+request_uri+b+d+f})}
|
||||
function editorGetAutoSavedDoc(c){var k=[];k.mid=current_mid;k.editor_sequence=c.getAttribute("editor_sequence");setTimeout(function(){exec_xml("editor","procEditorLoadSavedDocument",k,function(c){editorRelKeys[k.editor_sequence].primary.value=c.document_srl;"object"==typeof uploadSettingObj[k.editor_sequence]&&editorUploadInit(uploadSettingObj[k.editor_sequence],!0)},"error,message,editor_sequence,title,content,document_srl".split(","))},0)}
|
||||
jQuery("ul.extra2").length&&j.registerPlugin(new xe.XE_Extension(h,c));jQuery("ul.extra3").length&&j.registerPlugin(new xe.XE_EditingModeToggler(h));!jQuery.browser.msie&&!jQuery.browser.opera&&j.registerPlugin(new xe.XE_WYSIWYGEnterKey(n));(s=a._saved_doc_title)&&j.registerPlugin(new xe.XE_AutoSave(b,h));f();return j}
|
||||
function editorGetContentTextarea_xe(c){c=xe.Editors[c]||null;if(!c)return"";c=c.getIR();if(!jQuery.trim(c.replace(/( |<\/?(p|br|span|div)([^>]+)?>)/ig,"")))return"";c=c.replace(/<br ?\/?>$/i,"");if(1024>c.length){var l="#text,A,BR,IMG,EM,STRONG,SPAN,BIG,CITE,CODE,DD,DFN,HR,INS,KBD,LINK,Q,SAMP,SMALL,SUB,SUP,TT".split(","),o=!0,p=jQuery("<div>"+c+"</div>").eq(0).contents();jQuery.each(p,function(){3!=this.nodeType&&-1==jQuery.inArray(this.nodeName,l)&&(o=!1)});o&&(c="<p>"+c+"</p>")}c=c.replace(/src\s?=\s?(["']?)(?:\.\.\/)+(files\/attach\/)/ig,
|
||||
function(a,b,c){return"src="+(b||"")+c});c=c.replace(/\<(\/)?([A-Z]+)([^>]*)\>/ig,function(a,b,c,e){e=e?e.replace(/ ([A-Z]+?)\=/ig,function(a,b){b=b.toLowerCase();return" "+b+"="}):"";c=c.toLowerCase();b||(b="");return"<"+b+c+e+">"});return c=c.replace("<br>","<br />")}function editorGetIframe(c){return jQuery("iframe#editor_iframe_"+c).get(0)}function editorReplaceHTML(c,l){var l=editorReplacePath(l),o=parseInt(c.id.replace(/^.*_/,""),10);editorRelKeys[o].pasteHTML(l)}
|
||||
function editorReplacePath(c){return c=c.replace(/\<([^\>\<]*)(src=|href=|url\()("|\')*([^"\'\)]+)("|\'|\))*(\s|>)*/ig,function(c,o,p,a,b,d,e){"url("==p?(a="",d=")"):("undefined"==typeof a&&(a='"'),"undefined"==typeof d&&(d='"'),"undefined"==typeof e&&(e=""));b=jQuery.trim(b).replace(/^\.\//,"");return/^(http\:|https\:|ftp\:|telnet\:|mms\:|mailto\:|\/|\.\.|\#)/i.test(b)?c:"<"+o+p+a+request_uri+b+d+e})}
|
||||
function editorGetAutoSavedDoc(c){var l=[];l.mid=current_mid;l.editor_sequence=c.getAttribute("editor_sequence");setTimeout(function(){exec_xml("editor","procEditorLoadSavedDocument",l,function(c){editorRelKeys[l.editor_sequence].primary.value=c.document_srl;"object"==typeof uploadSettingObj[l.editor_sequence]&&editorUploadInit(uploadSettingObj[l.editor_sequence],!0)},"error,message,editor_sequence,title,content,document_srl".split(","))},0)}
|
||||
xe.XE_GET_WYSYWYG_MODE=jQuery.Class({name:"XE_GET_WYSYWYG_MODE",$init:function(c){this.editor_sequence=c},$ON_CHANGE_EDITING_MODE:function(c){editorMode[this.editor_sequence]="HTMLSrc"==c?"html":"wysiwyg"}});xe.XE_PreservTemplate=jQuery.Class({name:"XE_PreservTemplate",isRun:!1,$BEFORE_SET_IR:function(c){if(!this.isRun&&!c)return this.isRun=!0,!1}});
|
||||
xe.XE_Preview=jQuery.Class({name:"XE_Preview",elPreviewButton:null,$init:function(c){this._assignHTMLObjects(c)},_assignHTMLObjects:function(c){this.elPreviewButton=jQuery("BUTTON.xpress_xeditor_preview_button",c)},$ON_MSG_APP_READY:function(){this.oApp.registerBrowserEvent(this.elPreviewButton.get(0),"click","EVENT_PREVIEW",[])},$ON_EVENT_PREVIEW:function(){}});
|
||||
function editorStartTextarea(c,k,m){var o=xGetElementById("editor_"+c),a=xGetElementById("htm_"+c).value;o.form.setAttribute("editor_sequence",c);o.style.width="99%";editorRelKeys[c]=[];editorRelKeys[c].primary=o.form[m];editorRelKeys[c].content=o.form[k];editorRelKeys[c].func=editorGetContentTextarea;c=o.form[k].value;a&&(c=c.replace(/<br([^>]*)>/ig,"\n"),"br"!=a&&(c=c.replace(/</g,"<"),c=c.replace(/>/g,">"),c=c.replace(/"/g,'"'),c=c.replace(/&/g,"&")));o.value=c}
|
||||
function editorGetContentTextarea(c){var k=xGetElementById("editor_"+c),c=xGetElementById("htm_"+c).value,k=k.value.trim();c&&("br"!=c&&(k=k.replace(/&/g,"&"),k=k.replace(/</g,"<"),k=k.replace(/>/g,">"),k=k.replace(/\"/g,""")),k=k.replace(/(\r\n|\n)/g,"<br />"));return k};
|
||||
|
|
|
|||
|
|
@ -165,7 +165,9 @@ function editorStart(editor_sequence, primary_key, content_key, editor_height, f
|
|||
|
||||
// 위젯 감시를 위한 더블클릭 이벤트 걸기
|
||||
try {
|
||||
xAddEventListener(iframe_obj.contentWindow.document,'dblclick',editorSearchComponent);
|
||||
jQuery(iframe_obj.contentWindow.document)
|
||||
.unbind('dblclick.widget')
|
||||
.bind('dblclick.widget', editorSearchComponent);
|
||||
} catch(e) {
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -153,16 +153,16 @@
|
|||
<value xml:lang="vi"><![CDATA[Dung lượng file đính kèm]]></value>
|
||||
</item>
|
||||
<item name="allowed_filetypes">
|
||||
<value xml:lang="ko"><![CDATA[허용 확장자]]></value>
|
||||
<value xml:lang="en"><![CDATA[Allowed Extensions]]></value>
|
||||
<value xml:lang="jp"><![CDATA[添付可能な拡張子]]></value>
|
||||
<value xml:lang="zh-CN"><![CDATA[可用扩展名]]></value>
|
||||
<value xml:lang="zh-TW"><![CDATA[允許檔案類型]]></value>
|
||||
<value xml:lang="fr"><![CDATA[Extensions consentis]]></value>
|
||||
<value xml:lang="ru"><![CDATA[Разрешенные расширения]]></value>
|
||||
<value xml:lang="es"><![CDATA[Tipos de archivos permitidos]]></value>
|
||||
<value xml:lang="tr"><![CDATA[İzin Verilmiş Uzantılar]]></value>
|
||||
<value xml:lang="vi"><![CDATA[Những định dạng cho phép]]></value>
|
||||
<value xml:lang="ko"><![CDATA[허용한 확장자만 첨부할 수 있습니다.(관리자는 제외)]]></value>
|
||||
<value xml:lang="en"><![CDATA[Only allowed extentsions can be attached. (Exclude Administrators)]]></value>
|
||||
<value xml:lang="jp"><![CDATA[ここで指定された種類のファイルのみ添付できます。(管理者は制限無し)]]></value>
|
||||
<value xml:lang="zh-CN"><![CDATA[只允许上传指定的扩展名。 (管理员不受此限制)]]></value>
|
||||
<value xml:lang="zh-TW"><![CDATA[設定允許上傳的檔案類型。 (管理員不受此限制)]]></value>
|
||||
<value xml:lang="fr"><![CDATA[Extensions consentis seulement peuvent etre attaches. (Exclure Administrateurs)]]></value>
|
||||
<value xml:lang="ru"><![CDATA[Только файлы с разрешенными расширениями могут быть вложены. (Исключая администраторов)]]></value>
|
||||
<value xml:lang="es"><![CDATA[Puede definir las extensiones de los archivos permitidos. (exceptuando el administrador)]]></value>
|
||||
<value xml:lang="tr"><![CDATA[Sadece izin verilen uzantılar iliştirilebilir. (Yöneticilerin tercihleri sınırlandırılmaz)]]></value>
|
||||
<value xml:lang="vi"><![CDATA[Chỉ được phép đính kèm những File có đuôi được liệt kê trong danh sách. (Ngoại trừ Administrators)]]></value>
|
||||
</item>
|
||||
<item name="enable_download_group">
|
||||
<value xml:lang="ko"><![CDATA[다운로드 가능 그룹]]></value>
|
||||
|
|
@ -232,16 +232,16 @@
|
|||
<value xml:lang="vi"><![CDATA[Giới hạn dung lượng tối đa cho tất cả các File đính kèm trong một bài viết. (Ngoại trừ Administrators)]]></value>
|
||||
</item>
|
||||
<item name="about_allowed_filetypes">
|
||||
<value xml:lang="ko"><![CDATA[허용한 확장자만 첨부할 수 있습니다. "*.확장자"로 지정할 수 있고 ";" 으로 여러 개 지정이 가능합니다. 예) *.* or *.jpg;*.gif; (관리자는 제외)]]></value>
|
||||
<value xml:lang="en"><![CDATA[Only allowed extentsions can be attached. To allow an extension, use "*.[extention]". To allow multiple extensions, use ";" between each extension. ex) *.* or *.jpg;*.gif; (Exclude Administrators)]]></value>
|
||||
<value xml:lang="jp"><![CDATA[ここで指定された種類のファイルのみ添付できます。"*.拡張子"で指定し、 ";"で区切って任意の拡張子を追加して指定できます。 (管理者は制限無し) ex) *.* or *.jpg;*.gif; ]]></value>
|
||||
<value xml:lang="zh-CN"><![CDATA[只允许上传指定的扩展名。 可以用"*.扩展名"来指定或用 ";"来 区分多个扩展名 例) *.* or *.jpg;*.gif; (管理员不受此限制)]]></value>
|
||||
<value xml:lang="zh-TW"><![CDATA[設定允許上傳的檔案類型。可以用"*.副檔名"來指定或用分號";"來區隔多個副檔名。 例) *.* or *.jpg; *.gif; (管理員不受此限制)]]></value>
|
||||
<value xml:lang="fr"><![CDATA[Extensions consentis seulement peuvent etre attaches. Pour consentir une extension, utilisez "*.[extention]". Pour consentir plusieurs extensions, utilisez ";" entre chaque extension. ex) *.* ou *.jpg;*.gif; (Exclure Administrateurs)]]></value>
|
||||
<value xml:lang="ru"><![CDATA[Только файлы с разрешенными расширениями могут быть вложены. Чтобы разрешить расширение, ипользуйте "*.расширение". Чтобы разрешить несколько расширений, используйте ";" между ними. например: *.* или *.jpg;*.gif; (Исключая администраторов)]]></value>
|
||||
<value xml:lang="es"><![CDATA[Puede definir las extensiones de los archivos permitidos. Para permitir una extensión use "*.extensión". Para permitir más de una extensión use ";". ej) *.* o *.jpg;*.gif;etc. (exceptuando el administrador)]]></value>
|
||||
<value xml:lang="tr"><![CDATA[Sadece izin verilen uzantılar iliştirilebilir. Bir uzantıya izin vermek için, "*.[uzantı]" komutunu kullanınız. Birden fazla eklentiye izin vermek için, her uzantının arasına ";" koyunuz. örn.) *.* veya *.jpg;*.gif; (Yöneticilerin tercihleri sınırlandırılmaz)]]></value>
|
||||
<value xml:lang="vi"><![CDATA[Chỉ được phép đính kèm những File có đuôi được liệt kê trong danh sách. Để thêm những dạng File được phép đính kèm, bạn sử dụng "*.[đuôi]". Để cho phép nhiều dạng đuôi File hãy đặt dấu ";" vào giữa các dạng đuôi. Ví dụ: *.* (Cho phép tất cả) hay *.jpg;*.gif; (Ngoại trừ Administrators)]]></value>
|
||||
<value xml:lang="ko"><![CDATA["*.확장자"로 지정할 수 있고 ";" 으로 여러 개 지정이 가능합니다. 예) *.* or *.jpg;*.gif;]]></value>
|
||||
<value xml:lang="en"><![CDATA[To allow an extension, use "*.[extention]". To allow multiple extensions, use ";" between each extension. ex) *.* or *.jpg;*.gif; ]]></value>
|
||||
<value xml:lang="jp"><![CDATA["*.拡張子"で指定し、 ";"で区切って任意の拡張子を追加して指定できます。ex) *.* or *.jpg;*.gif; ]]></value>
|
||||
<value xml:lang="zh-CN"><![CDATA[可以用"*.扩展名"来指定或用 ";"来 区分多个扩展名 例) *.* or *.jpg;*.gif;]]></value>
|
||||
<value xml:lang="zh-TW"><![CDATA[可以用"*.副檔名"來指定或用分號";"來區隔多個副檔名。 例) *.* or *.jpg; *.gif;]]></value>
|
||||
<value xml:lang="fr"><![CDATA[Pour consentir une extension, utilisez "*.[extention]". Pour consentir plusieurs extensions, utilisez ";" entre chaque extension. ex) *.* ou *.jpg;*.gif;]]></value>
|
||||
<value xml:lang="ru"><![CDATA[Чтобы разрешить расширение, ипользуйте "*.расширение". Чтобы разрешить несколько расширений, используйте ";" между ними. например: *.* или *.jpg;*.gif;]]></value>
|
||||
<value xml:lang="es"><![CDATA[Para permitir una extensión use "*.extensión". Para permitir más de una extensión use ";". ej) *.* o *.jpg;*.gif;etc.]]></value>
|
||||
<value xml:lang="tr"><![CDATA[Bir uzantıya izin vermek için, "*.[uzantı]" komutunu kullanınız. Birden fazla eklentiye izin vermek için, her uzantının arasına ";" koyunuz. örn.) *.* veya *.jpg;*.gif; ]]></value>
|
||||
<value xml:lang="vi"><![CDATA[Để thêm những dạng File được phép đính kèm, bạn sử dụng "*.[đuôi]". Để cho phép nhiều dạng đuôi File hãy đặt dấu ";" vào giữa các dạng đuôi. Ví dụ: *.* (Cho phép tất cả) hay *.jpg;*.gif;]]></value>
|
||||
</item>
|
||||
<item name="cmd_delete_checked_file">
|
||||
<value xml:lang="ko"><![CDATA[선택항목 삭제]]></value>
|
||||
|
|
|
|||
|
|
@ -37,8 +37,10 @@
|
|||
<p class="a"><input id="attachSize" type="text" name="allowed_attach_size" value="{$config->allowed_attach_size}" style="width:40px" /> MB</p>
|
||||
</li>
|
||||
<li>
|
||||
<p class="q"><label for="allowedFiletypes">{$lang->about_allowed_filetypes}</label></p>
|
||||
<p class="a"><input id="allowedFiletypes" type="text" name="allowed_filetypes" value="{$config->allowed_filetypes}" /></p>
|
||||
<p class="q"><label for="allowedFiletypes">{$lang->allowed_filetypes}</label></p>
|
||||
<p class="a"><input id="allowedFiletypes" type="text" name="allowed_filetypes" value="{$config->allowed_filetypes}" />
|
||||
<p>{$lang->about_allowed_filetypes}</p>
|
||||
</p>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="btnArea">
|
||||
|
|
|
|||
|
|
@ -137,7 +137,7 @@
|
|||
function procImporterAdminPreProcessing() {
|
||||
// Get the target xml file to import
|
||||
$xml_file = Context::get('xml_file');
|
||||
// Get a type of the target
|
||||
// Get a type of the target
|
||||
$type = Context::get('type');
|
||||
// Extract and cache information from the xml file
|
||||
$oExtract = new extract();
|
||||
|
|
@ -172,7 +172,7 @@
|
|||
$category_filename = sprintf('%s/%s', $oExtract->cache_path, 'category.xml');
|
||||
FileHandler::writeFile($category_filename, $buff);
|
||||
|
||||
|
||||
|
||||
// Guestbook information
|
||||
$output = $oExtract->set($xml_file, '', '', '', '');
|
||||
if ($output->toBool()) {
|
||||
|
|
@ -291,12 +291,15 @@
|
|||
if(!$cur) $cur = 0;
|
||||
// Create the xmlParser object
|
||||
$oXmlParser = new XmlParser();
|
||||
// Create objects for importing member information
|
||||
// Create objects for importing member information
|
||||
$this->oMemberController = &getController('member');
|
||||
$this->oMemberModel = &getModel('member');
|
||||
// Get a default member group
|
||||
$default_group = $this->oMemberModel->getDefaultGroup();
|
||||
$default_group_srl = $default_group->group_srl;
|
||||
// Get information of the Webmaster
|
||||
$oModuleModel = &getModel('module');
|
||||
$member_config = $oModuleModel->getModuleConfig('member');
|
||||
// Open an index file
|
||||
$f = fopen($index_file,"r");
|
||||
// Pass if already read
|
||||
|
|
@ -351,6 +354,7 @@
|
|||
if(!$obj->last_login) $obj->last_login = $obj->regdate;
|
||||
// Get a member_srl
|
||||
$obj->member_srl = getNextSequence();
|
||||
$obj->list_order = -1 * $obj->member_srl;
|
||||
// List extra vars
|
||||
$extra_vars = $obj->extra_vars;
|
||||
unset($obj->extra_vars);
|
||||
|
|
@ -362,6 +366,24 @@
|
|||
if(!$nick_output->toBool()) $obj->nick_name .= '_'.$obj->member_srl;
|
||||
// Add a member
|
||||
$output = executeQuery('member.insertMember', $obj);
|
||||
|
||||
if($output->toBool() && !($obj->password)){
|
||||
// Send a mail telling the user to reset his password.
|
||||
$oMail = new Mail();
|
||||
$oMail->setTitle("Password update for your " . getFullSiteUrl() . " account");
|
||||
$webmaster_name = $member_config->webmaster_name?$member_config->webmaster_name:'Webmaster';
|
||||
$oMail->setContent("Dear $obj->user_name, <br /><br />
|
||||
We recently migrated our phpBB forum to XpressEngine. Since you password was encrypted we could not migrate it too, so please reset it by following this link:
|
||||
<a href='" . getFullSiteUrl() . "/?act=dispMemberFindAccount' >" . getFullSiteUrl() . "?act=dispMemberFindAccount</a>. You need to enter you email address and hit the 'Find account' button. You will then receive an email with a new, generated password that you can change after login. <br /><br />
|
||||
|
||||
Thank you for your understanding,<br />
|
||||
{$webmaster_name}"
|
||||
);
|
||||
$oMail->setSender($webmaster_name, $member_config->webmaster_email);
|
||||
$oMail->setReceiptor( $obj->user_name, $obj->email);
|
||||
$oMail->send();
|
||||
}
|
||||
|
||||
// add group join/image name-mark-signiture and so on if a new member successfully added
|
||||
if($output->toBool()) {
|
||||
// Join to the default group
|
||||
|
|
@ -438,12 +460,24 @@
|
|||
$sender_args->user_id = $obj->sender;
|
||||
$sender_output = executeQuery('member.getMemberInfo',$sender_args);
|
||||
$sender_srl = $sender_output->data->member_srl;
|
||||
if(!$sender_srl){
|
||||
unset($sender_args);
|
||||
$sender_args->email_address = $obj->sender;
|
||||
$sender_output = executeQuery('member.getMemberInfoByEmailAddress',$sender_args);
|
||||
$sender_srl = $sender_output->data->member_srl;
|
||||
}
|
||||
if(!$sender_srl) continue;
|
||||
|
||||
$receiver_args->user_id = $obj->receiver;
|
||||
if(!$obj->receiver) continue;
|
||||
$receiver_output = executeQuery('member.getMemberInfo',$receiver_args);
|
||||
$receiver_srl = $receiver_output->data->member_srl;
|
||||
if(!$receiver_srl){
|
||||
unset($receiver_args);
|
||||
$receiver_args->email_address = $obj->receiver;
|
||||
$receiver_output = executeQuery('member.getMemberInfoByEmailAddress',$receiver_args);
|
||||
$receiver_srl = $receiver_output->data->member_srl;
|
||||
}
|
||||
if(!$receiver_srl) continue;
|
||||
// Message to save into sender's message box
|
||||
$sender_args->sender_srl = $sender_srl;
|
||||
|
|
@ -497,7 +531,7 @@
|
|||
$category_file = preg_replace('/index$/i', 'category.xml', $index_file);
|
||||
if(file_exists($category_file)) {
|
||||
$buff = FileHandler::readFile($category_file);
|
||||
|
||||
|
||||
// Create the xmlParser object
|
||||
$xmlDoc = $this->oXmlParser->loadXmlFile($category_file);
|
||||
|
||||
|
|
@ -514,7 +548,7 @@
|
|||
|
||||
$obj = null;
|
||||
$obj->title = $category;
|
||||
$obj->module_srl = $module_srl;
|
||||
$obj->module_srl = $module_srl;
|
||||
if($parent) $obj->parent_srl = $match_sequence[$parent];
|
||||
|
||||
$output = $oDocumentController->insertCategory($obj);
|
||||
|
|
@ -535,7 +569,7 @@
|
|||
if($output->data) {
|
||||
foreach($output->data as $key => $val) $extra_keys[$val->eid] = true;
|
||||
}
|
||||
|
||||
|
||||
if(!$cur) $cur = 0;
|
||||
// Open an index file
|
||||
$f = fopen($index_file,"r");
|
||||
|
|
@ -589,7 +623,7 @@
|
|||
}
|
||||
|
||||
$xmlDoc = $this->oXmlParser->parse($buff);
|
||||
|
||||
|
||||
$category = base64_decode($xmlDoc->post->category->body);
|
||||
if($category_titles[$category]) $obj->category_srl = $category_titles[$category];
|
||||
|
||||
|
|
@ -643,7 +677,7 @@
|
|||
if(!$args->tag) continue;
|
||||
$output = executeQuery('tag.insertTag', $args);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
// Add extra variables
|
||||
if(count($extra_vars)) {
|
||||
|
|
@ -864,7 +898,7 @@
|
|||
}
|
||||
|
||||
if($started) $buff .= $str;
|
||||
// If it ends with </attach>, handle attachements
|
||||
// If it ends with </attach>, handle attachements
|
||||
if(trim($str) == '</attach>') {
|
||||
$xmlDoc = $this->oXmlParser->parse($buff.$str);
|
||||
|
||||
|
|
@ -923,12 +957,12 @@
|
|||
$file_obj->sid = md5(rand(rand(1111111,4444444),rand(4444445,9999999)));
|
||||
$file_obj->isvalid = 'Y';
|
||||
$output = executeQuery('file.insertFile', $file_obj);
|
||||
|
||||
|
||||
if($output->toBool()) {
|
||||
$uploaded_count++;
|
||||
$tmp_obj = null;
|
||||
$tmp_obj->source_filename = $file_obj->source_filename;
|
||||
if($file_obj->direct_download == 'Y') $files[$file_obj->source_filename] = $file_obj->uploaded_filename;
|
||||
if($file_obj->direct_download == 'Y') $files[$file_obj->source_filename] = $file_obj->uploaded_filename;
|
||||
else $files[$file_obj->source_filename] = getUrl('','module','file','act','procFileDownload','file_srl',$file_obj->file_srl,'sid',$file_obj->sid);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -515,7 +515,7 @@ Hãy nhập đường dẫn cho File chứa Data trên Host dưới dạng http:
|
|||
<item name="about_importer">
|
||||
<value xml:lang="ko"><![CDATA[다른 프로그램의 데이터를 XE 데이터로 이전할 수 있습니다. 이전을 위해서는 <a href="http://svn.xpressengine.com/zeroboard_xe/migration_tools/" onclick="winopen(this.href);return false;">XML Exporter</a>를 이용해서 원하는 데이터를 XML파일로 생성 후 업로드해주셔야 합니다.]]></value>
|
||||
<value xml:lang="en"><![CDATA[Data Importer will help you import Zeroboard4, Zeroboard5 Beta or other program's data into XE.
|
||||
In order to import, you first have to use <a href="http://svn.xpressengine.net/migration/" onclick="winopen(this.href);return false;">XML Exporter</a> to convert the data you want into XML File.]]></value>
|
||||
In order to import, you first have to use <a href="http://code.google.com/p/xe-migration/" onclick="winopen(this.href);return false;">XML Exporter</a> to convert the data you want into XML File.]]></value>
|
||||
<value xml:lang="jp"><![CDATA[ゼロボード4、zb5betaまたは他のプログラムの書き込みデータをXEのデータに変換することができます。
|
||||
変換するためには、<a href="http://svn.xpressengine.com/zeroboard_xe/migration_tools/" onclick="winopen(this.href);return false;">XML Exporter</a>を利用して変換したい書き込みデータをXMLファイルで作成してアップロードしてください。]]></value>
|
||||
<value xml:lang="zh-CN"><![CDATA[不仅可以导入Zeroboard 4,Zb5beta的数据,也可以把其他程序数据导入到XE当中。
|
||||
|
|
@ -529,7 +529,7 @@ Pour transférer, vous devez utiliser <a href="http://svn.xpressengine.com/zerob
|
|||
<value xml:lang="es"><![CDATA[Es posible trasferir los datos de Zeroboard4, zb5beta o de otros programas a XE.
|
||||
Para la transferencia debe utilizar <a href="http://svn.xpressengine.com/zeroboard_xe/migration_tools/" onclick="winopen(this.href);return false;">XML Exporter</a> para transformar los datos en archivo XML, y luego subir ese archivo.]]></value>
|
||||
<value xml:lang="tr"><![CDATA[Veri Alıcısı XE'ye, Zeroboard4, Zeroboard5 Beta veya başka programların verilerini aktarmada yardımcı olacaktır.
|
||||
İçe aktarımı gerçekleştirebilmek için öncelikle <a href="http://svn.xpressengine.net/migration/" onclick="winopen(this.href);return false;">XML DışAktarımcı</a>'yı kullanıp istediğiniz veriyi XML türüne çevirmelisiniz.]]></value>
|
||||
İçe aktarımı gerçekleştirebilmek için öncelikle <a href="http://code.google.com/p/xe-migration/" onclick="winopen(this.href);return false;">XML DışAktarımcı</a>'yı kullanıp istediğiniz veriyi XML türüne çevirmelisiniz.]]></value>
|
||||
<value xml:lang="vi"><![CDATA[Bạn có thể chuyển Data từ Zeroboard4, Zeroboard5 Beta hay Data của những mã nguồn khác vào Data của XE.
|
||||
Để hiểu rõ hơn công việc này, bạn có thể tham khảo cách chuyển đổi Data của bạn vào XE khi bạn đã Upload chúng tại <a href="http://svn.xpressengine.com/zeroboard_xe/migration_tools/" onclick="winopen(this.href);return false;">XML Exporter</a>.]]></value>
|
||||
</item>
|
||||
|
|
|
|||
|
|
@ -106,9 +106,10 @@
|
|||
$oModuleController = &getController('module');
|
||||
$output = $oModuleController->insertModuleConfig('integration_search',$args);
|
||||
|
||||
$this->setMessage('success_updated', 'info');
|
||||
if(!in_array(Context::getRequestMethod(),array('XMLRPC','JSON'))) {
|
||||
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispIntegration_searchAdminSkinInfo');
|
||||
header('location:'.$returnUrl);
|
||||
$this->setRedirectUrl($returnUrl);
|
||||
return;
|
||||
}
|
||||
else $output;
|
||||
|
|
|
|||
|
|
@ -78,6 +78,9 @@
|
|||
}
|
||||
Context::set('skin_info', $skin_info);
|
||||
Context::set('skin_vars', $skin_vars); //maybe not used
|
||||
|
||||
$config = $oModuleModel->getModuleConfig('integration_search');
|
||||
Context::set('module_info', unserialize($config->skin_vars));
|
||||
|
||||
$security = new Security();
|
||||
$security->encodeHTML('skin_info...');
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
<!--%import("is.js")-->
|
||||
|
||||
<div id="spot">
|
||||
<form action="{getUrl()}" method="post" class="search" id="fo_is">
|
||||
<form action="{getUrl()}" method="post" class="search" id="fo_is" no-error-return-url="true" >
|
||||
<input type="hidden" name="mid" value="{$mid}" />
|
||||
<input type="hidden" name="act" value="IS" />
|
||||
<input type="hidden" name="where" value="{$where}" />
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
<actions>
|
||||
<action name="dispMemberInfo" type="view" standalone="true" />
|
||||
<action name="dispMemberSignUpForm" type="view" standalone="true" />
|
||||
<action name="dispMemberModifyEmailAddress" type="view" />
|
||||
<action name="dispMemberModifyInfo" type="view" standalone="true" />
|
||||
<action name="dispMemberModifyPassword" type="view" standalone="true" />
|
||||
<action name="dispMemberLoginForm" type="view" standalone="true" />
|
||||
|
|
@ -46,6 +47,7 @@
|
|||
<action name="procMemberLogout" type="controller" standalone="true" />
|
||||
<action name="procMemberCheckValue" type="controller" standalone="true" />
|
||||
<action name="procMemberInsert" type="controller" standalone="true" ruleset="@insertMember" />
|
||||
<action name="procMemberModifyEmailAddress" type="controller" ruleset="modifyEmailAddress" />
|
||||
<action name="procMemberModifyInfo" type="controller" standalone="true" ruleset="@insertMember" />
|
||||
<action name="procMemberModifyPassword" type="controller" standalone="true" ruleset="modifyPassword" />
|
||||
<action name="procMemberLeave" type="controller" standalone="true" ruleset="leaveMember" />
|
||||
|
|
@ -67,10 +69,11 @@
|
|||
<action name="procMemberFindAccount" type="controller" standalone="true" />
|
||||
<action name="procMemberFindAccountByQuestion" type="controller" standalone="true" />
|
||||
<action name="procMemberAuthAccount" type="controller" standalone="true" />
|
||||
<action name="procMemberAuthEmailAddress" type="controller" />
|
||||
<action name="procMemberUpdateAuthMail" type="controller" standalone="true" />
|
||||
<action name="procMemberResendAuthMail" type="controller" standalone="true" ruleset="resendAuthMail" />
|
||||
|
||||
<action name="procMemberAdminInsert" type="controller" standalone="true" ruleset="@insertAdminMember" />
|
||||
<action name="procMemberAdminInsert" type="controller" standalone="true" ruleset="insertAdminMember" />
|
||||
<action name="procMemberAdminDelete" type="controller" standalone="true" />
|
||||
<action name="procMemberAdminInsertConfig" type="controller" standalone="true" ruleset="insertConfig" />
|
||||
<action name="procMemberAdminInsertGroup" type="controller" standalone="true" ruleset="insertGroup" />
|
||||
|
|
|
|||
|
|
@ -863,6 +863,14 @@
|
|||
<value xml:lang="tr"><![CDATA[Kaydol]]></value>
|
||||
<value xml:lang="vi"><![CDATA[Đăng kí]]></value>
|
||||
</item>
|
||||
<item name="cmd_modify_member_email_address">
|
||||
<value xml:lang="ko"><![CDATA[이메일 주소 변경]]></value>
|
||||
<value xml:lang="en"><![CDATA[Change Email Address]]></value>
|
||||
</item>
|
||||
<item name="about_modify_member_email_address">
|
||||
<value xml:lang="ko"><![CDATA[사용하시는 이메일 주소를 변경할 수 있습니다.]]></value>
|
||||
<value xml:lang="en"><![CDATA[You could change EmailAddress.]]></value>
|
||||
</item>
|
||||
<item name="cmd_modify_member_info">
|
||||
<value xml:lang="ko"><![CDATA[회원정보 변경]]></value>
|
||||
<value xml:lang="en"><![CDATA[Change Member Info]]></value>
|
||||
|
|
@ -925,6 +933,9 @@
|
|||
<value xml:lang="tr"><![CDATA[Etkinleştirme Maili Talebinde Bulun]]></value>
|
||||
<value xml:lang="vi"><![CDATA[Xác nhận lại Email]]></value>
|
||||
</item>
|
||||
<item name="cmd_send_auth_new_emaill_address">
|
||||
<value xml:lang="ko"><![CDATA[신규 이메일로 인증 메일 발송]]></value>
|
||||
</item>
|
||||
<item name="cmd_member_list">
|
||||
<value xml:lang="ko"><![CDATA[회원 목록]]></value>
|
||||
<value xml:lang="en"><![CDATA[Member List]]></value>
|
||||
|
|
@ -1170,6 +1181,9 @@
|
|||
<value xml:lang="tr"><![CDATA[XE Hesap Etkinleştirmesi]]></value>
|
||||
<value xml:lang="vi"><![CDATA[Thông tin đăng kí thành viên tại Website http://4all.kr]]></value>
|
||||
</item>
|
||||
<item name="title_modify_email_address">
|
||||
<value xml:lang="ko"><![CDATA[이메일주소 변경 요청 확인 메일입니다.]]></value>
|
||||
</item>
|
||||
<item name="msg_confirm_account_info">
|
||||
<value xml:lang="ko"><![CDATA[가입하신 계정 정보는 아래와 같습니다.]]></value>
|
||||
<value xml:lang="en"><![CDATA[This is your account information:]]></value>
|
||||
|
|
@ -1193,6 +1207,9 @@
|
|||
<value xml:lang="tr"><![CDATA[Hesabınızı etkinleştirmek için takip eden linke tıklayınız.]]></value>
|
||||
<value xml:lang="vi"><![CDATA[Bấm vào đường Link này để hoàn tất việc đăng kí.]]></value>
|
||||
</item>
|
||||
<item name="msg_confirm_email_address_change">
|
||||
<value xml:lang="ko"><![CDATA[아래 링크를 클릭하시면 이메일 주소가 %s으로 변경됩니다.]]></value>
|
||||
</item>
|
||||
<item name="msg_auth_mail_sent">
|
||||
<value xml:lang="ko"><![CDATA[%s 메일로 인증 정보를 담은 메일이 발송되었습니다. 메일을 확인하세요.]]></value>
|
||||
<value xml:lang="en"><![CDATA[The activation mail has been sent to %s. Please check your mail.]]></value>
|
||||
|
|
@ -1216,6 +1233,9 @@
|
|||
<value xml:lang="tr"><![CDATA[%s adresine etkinleştirme maili gönderdik. Lütfen mailinizi kontrol ediniz.]]></value>
|
||||
<value xml:lang="vi"><![CDATA[Chúng tôi đã gửi Email xác nhận đến %s. Xin vui lòng bấm vào Link đi kèm trong Email để hoàn tất việc đăng kí!]]></value>
|
||||
</item>
|
||||
<item name="msg_invalid_modify_email_auth_key">
|
||||
<value xml:lang="ko"><![CDATA[잘못된 이메일 변경 요청입니다.<br />이메일 변경요청을 다시 하시거나 사이트 관리자에게 문의해주세요.]]></value>
|
||||
</item>
|
||||
<item name="msg_invalid_auth_key">
|
||||
<value xml:lang="ko"><![CDATA[잘못된 계정 인증 요청입니다.<br />아이디/비밀번호 찾기를 다시 하시거나 사이트 관리자에게 계정 정보를 문의해주세요.]]></value>
|
||||
<value xml:lang="en"><![CDATA[This is an invalid request of verification.<br />Please retry finding account info or contact the administrator.]]></value>
|
||||
|
|
@ -2395,4 +2415,7 @@ Bạn có thể quản lý thành viên bằng cách tạo những nhóm mới,
|
|||
<value xml:lang="ko"><![CDATA[회원 설정]]></value>
|
||||
<value xml:lang="en"><![CDATA[Member Configuration]]></value>
|
||||
</item>
|
||||
<item name="msg_success_modify_email_address">
|
||||
<value xml:lang="ko"><![CDATA[이메일 주소가 정상적으로 변경되었습니다. 변경된 이메일 주소로 로그인 가능합니다.]]></value>
|
||||
</item>
|
||||
</lang>
|
||||
|
|
|
|||
|
|
@ -222,7 +222,7 @@
|
|||
$args->signupForm = $signupForm;
|
||||
|
||||
// create Ruleset
|
||||
$this->_createSignupRuleset($signupForm);
|
||||
$this->_createSignupRuleset($signupForm, $args->agreement);
|
||||
$this->_createLoginRuleset($args->identifier);
|
||||
$this->_createFindAccountByQuestion($args->identifier);
|
||||
}
|
||||
|
|
@ -236,9 +236,8 @@
|
|||
}
|
||||
}
|
||||
|
||||
function _createSignupRuleset($signupForm){
|
||||
function _createSignupRuleset($signupForm, $agreement = null){
|
||||
$xml_file = './files/ruleset/insertMember.xml';
|
||||
$admin_xml_file = './files/ruleset/insertAdmintMember.xml';
|
||||
$buff = '<?xml version="1.0" encoding="utf-8"?>'
|
||||
.'<ruleset version="1.5.0">'
|
||||
.'<customrules>'
|
||||
|
|
@ -247,6 +246,10 @@
|
|||
.'</ruleset>';
|
||||
|
||||
$fields = array();
|
||||
|
||||
if ($agreement){
|
||||
$fields[] = '<field name="accept_agreement"><if test="$act == \'procMemberInsert\'" attr="required" value="true" /></field>';
|
||||
}
|
||||
foreach($signupForm as $formInfo){
|
||||
if ($formInfo->required || $formInfo->mustRequired){
|
||||
if($formInfo->type == 'tel' || $formInfo->type == 'kr_zip'){
|
||||
|
|
@ -255,12 +258,14 @@
|
|||
$fields[] = '<field name="password"><if test="$act == \'procMemberInsert\'" attr="required" value="true" /><if test="$act == \'procMemberInsert\'" attr="length" value="3:20" /></field>';
|
||||
$fields[] = '<field name="password2"><if test="$act == \'procMemberInsert\'" attr="required" value="true" /><if test="$act == \'procMemberInsert\'" attr="equalto" value="password" /></field>';
|
||||
}else if($formInfo->name == 'find_account_question'){
|
||||
$fields[100] = '<field name="find_account_question" required="true" />';
|
||||
$fields[101] = '<field name="find_account_answer" required="true" length=":250"/>';
|
||||
$fields[] = '<field name="find_account_question"><if test="$act != \'procMemberAdminInsert\'" attr="required" value="true" /></field>';
|
||||
$fields[] = '<field name="find_account_answer"><if test="$act != \'procMemberAdminInsert\'" attr="required" value="true" /><if test="$act != \'procMemberAdminInsert\'" attr="length" value=":250" /></field>';
|
||||
}else if($formInfo->name == 'email_address'){
|
||||
$fields[] = sprintf('<field name="%s" required="true" rule="email"/>', $formInfo->name);
|
||||
}else if($formInfo->name == 'user_id'){
|
||||
$fields[] = sprintf('<field name="%s" required="true" rule="userid" length="3:20" />', $formInfo->name);
|
||||
}else if(strpos($formInfo->name, 'image') !== false){
|
||||
$fields[] = sprintf('<field name="%s"><if test="$act != \'procMemberAdminInsert\' && $__%s_exist != \'true\'" attr="required" value="true" /></field>', $formInfo->name, $formInfo->name);
|
||||
}else{
|
||||
$fields[] = sprintf('<field name="%s" required="true" />', $formInfo->name);
|
||||
}
|
||||
|
|
@ -271,21 +276,9 @@
|
|||
FileHandler::writeFile($xml_file, $xml_buff);
|
||||
unset($xml_buff);
|
||||
|
||||
$adminFields = $fields;
|
||||
$adminFields[100] = '<field name="find_account_question" />';
|
||||
$adminFields[101] = '<field name="find_account_answer" length=":250"/>';
|
||||
|
||||
$xml_buff = sprintf($buff, implode('', $adminFields));
|
||||
FileHandler::writeFile($admin_xml_file, $xml_buff);
|
||||
unset($xml_buff);
|
||||
|
||||
$validator = new Validator($xml_file);
|
||||
$validator->setCacheDir('files/cache');
|
||||
$validator->getJsPath();
|
||||
|
||||
$adminValidator = new Validator($admin_xml_file);
|
||||
$adminValidator->setCacheDir('files/cache');
|
||||
$adminValidator->getJsPath();
|
||||
}
|
||||
|
||||
function _createLoginRuleset($identifier){
|
||||
|
|
|
|||
|
|
@ -222,13 +222,16 @@
|
|||
$functionName = 'doDeleteImageMark';
|
||||
}
|
||||
if($target->src){
|
||||
$inputTag = sprintf('<p class="a"><span id="%s"><img src="%s" alt="%s" /> <button type="button" class="text" onclick="%s(%d);return false;">%s</button></span></p>'
|
||||
$inputTag = sprintf('<p class="a"><input type="hidden" name="__%s_exist" value="true" /><span id="%s"><img src="%s" alt="%s" /> <button type="button" class="text" onclick="%s(%d);return false;">%s</button></span></p>'
|
||||
,$formInfo->name
|
||||
,$formInfo->name.'tag'
|
||||
,$target->src
|
||||
,$formInfo->title
|
||||
,$functionName
|
||||
,$memberInfo['member_srl']
|
||||
,$lang->cmd_delete);
|
||||
}else{
|
||||
$inputTag = sprintf('<input type="hidden" name="__%s_exist" value="false" />', $formInfo->name);
|
||||
}
|
||||
$inputTag .= sprintf('<p class="a"><input type="file" name="%s" id="%s" value="" /> <span class="desc">%s : %dpx, %s : %dpx</span></p>'
|
||||
,$formInfo->name
|
||||
|
|
|
|||
|
|
@ -1995,6 +1995,7 @@
|
|||
$pointModuleConfig = $oModuleModel->getModuleConfig('point');
|
||||
$pointGroup = $pointModuleConfig->point_group;
|
||||
|
||||
$levelGroup = array();
|
||||
if(is_array($pointGroup) && count($pointGroup)>0)
|
||||
{
|
||||
$levelGroup = array_flip($pointGroup);
|
||||
|
|
@ -2017,5 +2018,91 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
function procMemberModifyEmailAddress(){
|
||||
if(!Context::get('is_logged')) return $this->stop('msg_not_logged');
|
||||
|
||||
$member_info = Context::get('logged_info');
|
||||
$newEmail = Context::get('email_address');
|
||||
|
||||
if(!$newEmail) return $this->stop('msg_invalid_request');
|
||||
|
||||
$oMemberModel = &getModel('member');
|
||||
$member_srl = $oMemberModel->getMemberSrlByEmailAddress($newEmail);
|
||||
if($member_srl) return new Object(-1,'msg_exists_email_address');
|
||||
|
||||
$auth_args->user_id = $newEmail;
|
||||
$auth_args->member_srl = $member_info->member_srl;
|
||||
$auth_args->auth_key = md5(rand(0, 999999));
|
||||
$auth_args->new_password = 'XE_change_emaill_address';
|
||||
|
||||
$output = executeQuery('member.insertAuthMail', $auth_args);
|
||||
if (!$output->toBool()) {
|
||||
$oDB->rollback();
|
||||
return $output;
|
||||
}
|
||||
|
||||
$oModuleModel = &getModel('module');
|
||||
$member_config = $oModuleModel->getModuleConfig('member');
|
||||
|
||||
$tpl_path = sprintf('%sskins/%s', $this->module_path, $member_config->skin);
|
||||
if(!is_dir($tpl_path)) $tpl_path = sprintf('%sskins/%s', $this->module_path, 'default');
|
||||
|
||||
global $lang;
|
||||
|
||||
$memberInfo[$lang->email_address] = $member_info->email_address;
|
||||
$memberInfo[$lang->nick_name] = $member_info->nick_name;
|
||||
|
||||
Context::set('memberInfo', $memberInfo);
|
||||
|
||||
Context::set('newEmail', $newEmail);
|
||||
|
||||
$auth_url = getFullUrl('','module','member','act','procMemberAuthEmailAddress','member_srl',$member_info->member_srl, 'auth_key',$auth_args->auth_key);
|
||||
Context::set('auth_url', $auth_url);
|
||||
|
||||
$oTemplate = &TemplateHandler::getInstance();
|
||||
$content = $oTemplate->compile($tpl_path, 'confirm_member_new_email');
|
||||
|
||||
$oMail = new Mail();
|
||||
$oMail->setTitle( Context::getLang('title_modify_email_address') );
|
||||
$oMail->setContent($content);
|
||||
$oMail->setSender( $member_config->webmaster_name?$member_config->webmaster_name:'webmaster', $member_config->webmaster_email);
|
||||
$oMail->setReceiptor( $member_info->nick_name, $newEmail );
|
||||
$result = $oMail->send();
|
||||
|
||||
$msg = sprintf(Context::getLang('msg_confirm_mail_sent'), $newEmail);
|
||||
$this->setMessage($msg);
|
||||
|
||||
if(!in_array(Context::getRequestMethod(),array('XMLRPC','JSON'))) {
|
||||
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'mid', Context::get('mid'), 'act', '');
|
||||
header('location:'.$returnUrl);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
function procMemberAuthEmailAddress(){
|
||||
$member_srl = Context::get('member_srl');
|
||||
$auth_key = Context::get('auth_key');
|
||||
if(!$member_srl || !$auth_key) return $this->stop('msg_invalid_request');
|
||||
|
||||
// Test logs for finding password by user_id and authkey
|
||||
$args->member_srl = $member_srl;
|
||||
$args->auth_key = $auth_key;
|
||||
$output = executeQuery('member.getAuthMail', $args);
|
||||
if(!$output->toBool() || $output->data->auth_key != $auth_key) return $this->stop('msg_invalid_modify_email_auth_key');
|
||||
|
||||
$newEmail = $output->data->user_id;
|
||||
$args->email_address = $newEmail;
|
||||
list($args->email_id, $args->email_host) = explode('@', $newEmail);
|
||||
|
||||
$output = executeQuery('member.updateMemberEmailAddress', $args);
|
||||
if(!$output->toBool()) return $this->stop($output->getMessage());
|
||||
|
||||
// Remove all values having the member_srl and new_password equal to 'XE_change_emaill_address' from authentication table
|
||||
executeQuery('member.deleteAuthChangeEmailAddress',$args);
|
||||
|
||||
// Notify the result
|
||||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
$this->setTemplateFile('msg_success_modify_email_address');
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -366,5 +366,14 @@
|
|||
|
||||
$this->setTemplateFile('resend_auth_mail');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 이메일 주소를 기본 로그인 계정 사용시 이메일 주소 변경을 위한 화면 추가
|
||||
**/
|
||||
function dispMemberModifyEmailAddress(){
|
||||
if(!Context::get('is_logged')) return $this->stop('msg_not_logged');
|
||||
|
||||
$this->setTemplateFile('modify_email_address');
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
9
modules/member/queries/deleteAuthChangeEmailAddress.xml
Normal file
9
modules/member/queries/deleteAuthChangeEmailAddress.xml
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<query id="deleteAuthChangeEmailAddress" action="delete">
|
||||
<tables>
|
||||
<table name="member_auth_mail" />
|
||||
</tables>
|
||||
<conditions>
|
||||
<condition operation="equal" column="member_srl" var="member_srl" notnull="notnull" />
|
||||
<condition operation="equal" column="new_password" default="XE_change_emaill_address" notnull="notnull" pipe="and" />
|
||||
</conditions>
|
||||
</query>
|
||||
13
modules/member/queries/updateMemberEmailAddress.xml
Normal file
13
modules/member/queries/updateMemberEmailAddress.xml
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<query id="updateMemberEmailAddress" action="update">
|
||||
<tables>
|
||||
<table name="member" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="email_address" var="email_address" notnull="notnull" />
|
||||
<column name="email_id" var="email_id" notnull="notnull" />
|
||||
<column name="email_host" var="email_host" notnull="notnull" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="member_srl" var="member_srl" notnull="notnull" filter="number" />
|
||||
</conditions>
|
||||
</query>
|
||||
13
modules/member/ruleset/insertAdminMember.xml
Normal file
13
modules/member/ruleset/insertAdminMember.xml
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ruleset version="1.5.0">
|
||||
<customrules>
|
||||
</customrules>
|
||||
<fields>
|
||||
<field name="email_address" required="true" rule="email" />
|
||||
<field name="password">
|
||||
<if test="!$member_srl" attr="required" value="true" />
|
||||
<if test="!$member_srl" attr="length" value="3:20" />
|
||||
</field>
|
||||
<field name="nick_name" required="true" />
|
||||
</fields>
|
||||
</ruleset>
|
||||
8
modules/member/ruleset/modifyEmailAddress.xml
Normal file
8
modules/member/ruleset/modifyEmailAddress.xml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ruleset version="1.5.0">
|
||||
<customrules>
|
||||
</customrules>
|
||||
<fields>
|
||||
<field name="email_address" required="true" rule="email" />
|
||||
</fields>
|
||||
</ruleset>
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
{$lang->msg_confirm_account_info}<br />
|
||||
<hr noshade="noshade" />
|
||||
<ul>
|
||||
<li>Site : <a href="{getUrl()}" target="_blank">{getUrl()}</a></li>
|
||||
<li loop="$memberInfo=>$name,$value">{$name} : {$value}</li>
|
||||
</ul>
|
||||
<hr noshade="noshade" />
|
||||
{sprintf($lang->msg_confirm_email_address_change, $newEmail)}<br />
|
||||
<a href="{$auth_url}">{$auth_url}</a>
|
||||
|
|
@ -112,6 +112,6 @@
|
|||
.xm input.text,
|
||||
.xm button.text{border:0;overflow:visible;padding:0;margin:0 4px 0 0;color:#33a;background:none;text-decoration:underline}
|
||||
/* Agreement */
|
||||
.xm .agreement{ margin:1em 0}
|
||||
.xm .agreement .text{ margin:1em 0}
|
||||
.xm .agreement .confirm{ margin:1em 0}
|
||||
.xm .agreement{margin:1em 0}
|
||||
.xm .agreement .text{height:200px;overflow:auto;margin:1em 0}
|
||||
.xm .agreement .confirm{margin:1em 0}
|
||||
|
|
|
|||
|
|
@ -21,19 +21,19 @@
|
|||
{@$title = $extend_form_list[$formInfo->member_join_form_srl]->column_title}
|
||||
{@$orgValue = $extend_form_list[$formInfo->member_join_form_srl]->value}
|
||||
<!--@if($formInfo->type=='tel')-->
|
||||
{@$value = htmlspecialchars($orgValue[0])}
|
||||
{@$value = $orgValue[0]}
|
||||
<!--@if($orgValue[1])-->-<!--@end-->
|
||||
{@$value .= htmlspecialchars($orgValue[1])}
|
||||
{@$value .= $orgValue[1]}
|
||||
<!--@if($orgValue[2])-->-<!--@end-->
|
||||
{@$value .= htmlspecialchars($orgValue[2])}
|
||||
{@$value .= $orgValue[2]}
|
||||
<!--@elseif($formInfo->type=='kr_zip')-->
|
||||
{@$value = htmlspecialchars($orgValue[0])}<!--@if($orgValue[1]&&$orgValue[0])--><br /><!--@end-->{@$value .= htmlspecialchars($orgValue[1])}
|
||||
{@$value = $orgValue[0]}<!--@if($orgValue[1]&&$orgValue[0])--><br /><!--@end-->{@$value .= $orgValue[1]}
|
||||
<!--@elseif($formInfo->type=='checkbox' && is_array($orgValue))-->
|
||||
{@$value = htmlspecialchars(implode(", ",$orgValue))}
|
||||
{@$value = implode(", ",$orgValue)}
|
||||
<!--@elseif($formInfo->type=='date')-->
|
||||
{@$value = zdate($orgValue, "Y-m-d")}
|
||||
<!--@else-->
|
||||
{@$value = nl2br(htmlspecialchars($orgValue))}
|
||||
{@$value = nl2br($orgValue)}
|
||||
<!--@end-->
|
||||
<!--@end-->
|
||||
|
||||
|
|
@ -60,12 +60,9 @@
|
|||
</table>
|
||||
</div>
|
||||
<div class="btnArea" cond="$memberInfo['member_srl'] == $logged_info->member_srl">
|
||||
<span class="btn" cond="$member_config->identifier == 'email_address'"><a href="{getUrl('act', 'dispMemberModifyEmailAddress')}">{$lang->cmd_modify_member_email_address}</a></span>
|
||||
<span class="btn"><a href="{getUrl('act','dispMemberModifyInfo','member_srl','')}">{$lang->cmd_modify_member_info}</a></span>
|
||||
<!--@if($logged_info->is_openid)-->
|
||||
<span class="btn"><a href="{getUrl('act','dispMemberOpenIDLeave','member_srl','')}">{$lang->cmd_leave}</a></span>
|
||||
<!--@else-->
|
||||
<span class="btn"><a href="{getUrl('act','dispMemberModifyPassword','member_srl','')}">{$lang->cmd_modify_member_password}</a></span>
|
||||
<span class="btn"><a href="{getUrl('act','dispMemberLeave','member_srl','')}">{$lang->cmd_leave}</a></span>
|
||||
<!--@end-->
|
||||
</div>
|
||||
<include target="./common_footer.html" />
|
||||
|
|
|
|||
21
modules/member/skins/default/modify_email_address.html
Normal file
21
modules/member/skins/default/modify_email_address.html
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<include target="./common_header.html" />
|
||||
<div cond="$XE_VALIDATOR_MESSAGE" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
|
||||
<p>{$XE_VALIDATOR_MESSAGE}</p>
|
||||
</div>
|
||||
<form ruleset="modifyEmailAddress" class="form" action="./" method="post">
|
||||
<input type="hidden" name="module" value="member" />
|
||||
<input type="hidden" name="act" value="procMemberModifyEmailAddress" />
|
||||
<input type="hidden" name="success_return_url" value="{getRequestUriByServerEnviroment()}" />
|
||||
<h1 class="h1">{$lang->cmd_modify_member_email_address}</h1>
|
||||
<p>{$lang->about_modify_member_email_address}</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p class="q"><label for="email_address">{$lang->email_address}</label></p>
|
||||
<p class="a"><input type="text" id="email_address" name="email_address" value="" /></p>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="btnArea">
|
||||
<span class="btn"><input type="submit" value="{$lang->cmd_send_auth_new_emaill_address}" /></span>
|
||||
</div>
|
||||
</form>
|
||||
<include target="./common_footer.html" />
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
xe.lang.groupDeleteMessage = '{$lang->msg_group_delete}';
|
||||
xe.lang.multilingual = '{$lang->cmd_set_multilingual}';
|
||||
xe.lang.modify = '{$lang->cmd_modify}';
|
||||
xe.lang.delete = '{$lang->cmd_delete}';
|
||||
xe.lang.deleteMSG = '{$lang->cmd_delete}';
|
||||
</script>
|
||||
<style type="text/css">
|
||||
._imageMarkButton img { max-height:16px }
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
<div cond="$XE_VALIDATOR_MESSAGE" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
|
||||
<p>{$XE_VALIDATOR_MESSAGE}</p>
|
||||
</div>
|
||||
<form action="./" class="form" ruleset="@insertAdminMember" method="post" enctype="multipart/form-data">
|
||||
<form action="./" class="form" ruleset="insertAdminMember" method="post" enctype="multipart/form-data">
|
||||
<input type="hidden" name="module" value="member" />
|
||||
<input type="hidden" name="act" value="procMemberAdminInsert" />
|
||||
<input type="hidden" name="member_srl" value="{$member_srl}" />
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ jQuery(function ($){
|
|||
var group_srl = $(event.target).attr('href').substr(1);
|
||||
if(!confirm(xe.lang.groupDeleteMessage)) return;
|
||||
|
||||
if (group_srl.indexOf("new") > 0){
|
||||
if (group_srl.indexOf("new") >= 0){
|
||||
$target.remove();
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,8 +30,8 @@
|
|||
<tr>
|
||||
<th scope="col">{$lang->email}</th>
|
||||
<th scope="col" loop="$usedIdentifiers=>$name,$title">{$title}</th>
|
||||
<th scope="col">{$lang->signup_date}</th>
|
||||
<th scope="col">{$lang->last_login}</th>
|
||||
<th scope="col"><a href="{getUrl('', 'module', 'admin', 'act', 'dispMemberAdminList')}">{$lang->signup_date}</a></th>
|
||||
<th scope="col"><a href="{getUrl('', 'module', 'admin', 'act', 'dispMemberAdminList', 'sort_index', 'last_login', 'sort_order', 'asc')}">{$lang->last_login}</a></th>
|
||||
<th scope="col" class="text">{$lang->member_group}</th>
|
||||
<th scope="col">{$lang->status}</th>
|
||||
<th scope="col">{$lang->cmd_view}</th>
|
||||
|
|
@ -45,8 +45,8 @@
|
|||
<tr>
|
||||
<th scope="col">{$lang->email}</th>
|
||||
<th scope="col" loop="$usedIdentifiers=>$name,$title">{$title}</th>
|
||||
<th scope="col">{$lang->signup_date}</th>
|
||||
<th scope="col">{$lang->last_login}</th>
|
||||
<th scope="col"><a href="{getUrl('', 'module', 'admin', 'act', 'dispMemberAdminList')}">{$lang->signup_date}</a></th>
|
||||
<th scope="col"><a href="{getUrl('', 'module', 'admin', 'act', 'dispMemberAdminList', 'sort_index', 'last_login', 'sort_order', 'asc')}">{$lang->last_login}</a></th>
|
||||
<th scope="col" class="text">{$lang->member_group}</th>
|
||||
<th scope="col">{$lang->status}</th>
|
||||
<th scope="col">{$lang->cmd_view}</th>
|
||||
|
|
|
|||
4
modules/member/tpl/msg_success_modify_email_address.html
Normal file
4
modules/member/tpl/msg_success_modify_email_address.html
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
<script type="text/javascript">
|
||||
alert("{$lang->msg_success_modify_email_address}");
|
||||
location.href="{getUrl()}";
|
||||
</script>
|
||||
|
|
@ -556,4 +556,20 @@ Menu không phải là người quản lý, nhiệm vụ của nó chỉ là li
|
|||
<value xml:lang="tr"><![CDATA[Sadece resim dosyaları kaydedilebilir.]]></value>
|
||||
<value xml:lang="vi"><![CDATA[Chỉ được phép sử dụng File hình ảnh.]]></value>
|
||||
</item>
|
||||
<item name="cType">
|
||||
<value xml:lang="ko"><![CDATA[모듈 또는 URL]]></value>
|
||||
<value xml:lang="en"><![CDATA[Module or URL]]></value>
|
||||
</item>
|
||||
<item name="module_type">
|
||||
<value xml:lang="ko"><![CDATA[모듈 선택]]></value>
|
||||
<value xml:lang="en"><![CDATA[Select Module]]></value>
|
||||
</item>
|
||||
<item name="create_menu_url">
|
||||
<value xml:lang="ko"><![CDATA[모듈 아이디 생성]]></value>
|
||||
<value xml:lang="en"><![CDATA[Create Module ID]]></value>
|
||||
</item>
|
||||
<item name="select_menu_url">
|
||||
<value xml:lang="ko"><![CDATA[모듈 아이디 선택]]></value>
|
||||
<value xml:lang="en"><![CDATA[Select Module ID]]></value>
|
||||
</item>
|
||||
</lang>
|
||||
|
|
|
|||
|
|
@ -5,5 +5,19 @@
|
|||
<fields>
|
||||
<field name="menu_srl" required="true" rule="number" />
|
||||
<field name="menu_name" required="true" />
|
||||
<field name="cType" required="true" />
|
||||
<field name="module_type">
|
||||
<if test="$cType == 'CREATE' || $cType == 'SELECT'" attr="required" value="true" />
|
||||
</field>
|
||||
<field name="create_menu_url">
|
||||
<if test="$cType == 'CREATE'" attr="required" value="true" />
|
||||
</field>
|
||||
<field name="select_menu_url">
|
||||
<if test="$cType == 'SELECT'" attr="required" value="true" />
|
||||
</field>
|
||||
<field name="menu_url">
|
||||
<if test="$cType == 'URL'" attr="required" value="true" />
|
||||
</field>
|
||||
<field name="menu_open_window" required="true" />
|
||||
</fields>
|
||||
</ruleset>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,12 @@
|
|||
/* NHN (developers@xpressengine.com) */
|
||||
jQuery(function($){
|
||||
|
||||
// get add/edit menu title
|
||||
var $lang = $('#editMenu h2:first span');
|
||||
xe.lang.add_menu = $lang.eq(0).text();
|
||||
xe.lang.edit_menu = $lang.eq(1).text();
|
||||
$lang.empty();
|
||||
|
||||
$('form.siteMap')
|
||||
.delegate('li:not(.placeholder)', 'dropped.st', function() {
|
||||
var $this = $(this), $pkey, $mkey, is_child;
|
||||
|
|
@ -13,7 +19,7 @@ $('form.siteMap')
|
|||
} else {
|
||||
$pkey.val('0');
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
var editForm = $('#editForm');
|
||||
var menuSrl = null;
|
||||
|
|
@ -40,7 +46,7 @@ $('form.siteMap')
|
|||
{
|
||||
var menuItem = obj.menu_item;
|
||||
menuUrl = menuItem.url;
|
||||
editForm.find('.h2').html('Edit Menu');
|
||||
editForm.find('.h2').text(xe.lang.edit_menu);
|
||||
editForm.find('input[name=menu_srl]').val(menuItem.menu_srl);
|
||||
editForm.find('input[name=menu_item_srl]').val(menuItem.menu_item_srl);
|
||||
editForm.find('input[name=parent_srl]').val(menuItem.parent_srl);
|
||||
|
|
@ -137,7 +143,7 @@ $('form.siteMap')
|
|||
|
||||
resetEditForm();
|
||||
|
||||
editForm.find('.h2').html('Add Menu');
|
||||
editForm.find('.h2').text(xe.lang.add_menu);
|
||||
editForm.find('input[name=menu_srl]').val($this.closest('form').find('input[name=menu_srl]:first').val());
|
||||
editForm.find('input[name=parent_srl]').val($this.parent().prevAll('input._item_key').val());
|
||||
});
|
||||
|
|
@ -195,15 +201,20 @@ $('form.siteMap')
|
|||
var module = $('#kModule').val();
|
||||
if(module == 'WIDGET' || module == 'ARTICLE' || module == 'OUTSIDE') module = 'page';
|
||||
|
||||
var midList = ret_obj.module_list[module].list;
|
||||
var htmlBuffer = "";
|
||||
for(x in midList)
|
||||
if(ret_obj.module_list[module] != undefined)
|
||||
{
|
||||
var midObject = midList[x];
|
||||
htmlBuffer += '<option value="'+midObject.mid+'"';
|
||||
if(menuUrl == midObject.mid) htmlBuffer += ' selected ';
|
||||
htmlBuffer += '>'+midObject.browser_title+'</option>';
|
||||
var midList = ret_obj.module_list[module].list;
|
||||
for(x in midList)
|
||||
{
|
||||
var midObject = midList[x];
|
||||
htmlBuffer += '<option value="'+midObject.mid+'"';
|
||||
if(menuUrl == midObject.mid) htmlBuffer += ' selected ';
|
||||
htmlBuffer += '>'+midObject.mid+'('+midObject.browser_title+')</option>';
|
||||
}
|
||||
}
|
||||
else htmlBuffer = '';
|
||||
|
||||
selectModuleLayer.find('select').html(htmlBuffer);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ xe.lang.confirm_delete = "{$lang->confirm_delete}";
|
|||
<input type="hidden" name="menu_srl" value="" />
|
||||
<input type="hidden" name="menu_item_srl" value="{$menu_info->menu_srl}" />
|
||||
<input type="hidden" name="parent_srl" value="{$menu_info->menu_srl}" />
|
||||
<h2 class="h2"></h2>
|
||||
<h2 class="h2"><span>{$lang->add_menu}</span><span>{$lang->edit_menu}</span></h2>
|
||||
<ul>
|
||||
<li>
|
||||
<p class="q"><label for="name">{$lang->menu_name}({$lang->browser_title}) <em>*</em></label></p>
|
||||
|
|
|
|||
|
|
@ -993,4 +993,16 @@ Le module [Administration des Modules] montera tous les modules installés et vo
|
|||
<value xml:lang="ko"><![CDATA[시작 모듈은 삭제할 수 없습니다.]]></value>
|
||||
<value xml:lang="en"><![CDATA[Cannot delete a start module.]]></value>
|
||||
</item>
|
||||
<item name="attribute_name">
|
||||
<value xml:lang="ko"><![CDATA[변수명]]></value>
|
||||
<value xml:lang="en"><![CDATA[Attribute name]]></value>
|
||||
</item>
|
||||
<item name="attribute_value">
|
||||
<value xml:lang="ko"><![CDATA[값]]></value>
|
||||
<value xml:lang="en"><![CDATA[Attribute value]]></value>
|
||||
</item>
|
||||
<item name="cmd_add">
|
||||
<value xml:lang="ko"><![CDATA[추가]]></value>
|
||||
<value xml:lang="en"><![CDATA[Add]]></value>
|
||||
</item>
|
||||
</lang>
|
||||
|
|
|
|||
|
|
@ -720,7 +720,13 @@
|
|||
$logged_info = Context::get('logged_info');
|
||||
if($logged_info->is_admin !='Y' && !$logged_info->is_site_admin) return new Object(-1, 'msg_not_permitted');
|
||||
|
||||
$vars = Context::gets('comment','addfile','filter');
|
||||
$vars = Context::gets('addfile','filter');
|
||||
$attributes = Context::getRequestVars();
|
||||
foreach($attributes as $key => $value){
|
||||
if(!(strpos($key, 'attribute_name') === false)) $vars->comment = $vars->comment.';'.$value;
|
||||
if(!(strpos($key, 'attribute_value') ===false)) $vars->comment = $vars->comment.':'.$value;
|
||||
}
|
||||
$vars->comment = substr($vars->comment, 1);
|
||||
$module_filebox_srl = Context::get('module_filebox_srl');
|
||||
|
||||
$ext = strtolower(substr(strrchr($vars->addfile['name'],'.'),1));
|
||||
|
|
|
|||
|
|
@ -1436,16 +1436,52 @@
|
|||
}
|
||||
|
||||
function getModuleFileBoxList(){
|
||||
$oModuleModel = &getModel('module');
|
||||
|
||||
$args->page = Context::get('page');
|
||||
$args->list_count = 5;
|
||||
$args->page_count = 5;
|
||||
return executeQuery('module.getModuleFileBoxList', $args);
|
||||
$output = executeQuery('module.getModuleFileBoxList', $args);
|
||||
$output = $oModuleModel->unserializeAttributes($output);
|
||||
return $output;
|
||||
}
|
||||
|
||||
function unserializeAttributes($module_filebox_list)
|
||||
{
|
||||
if(is_array($module_filebox_list))
|
||||
{
|
||||
foreach($module_filebox_list->data as $item)
|
||||
{
|
||||
$attributes = explode(';', $item->comment);
|
||||
foreach($attributes as $attribute){
|
||||
$values = explode(':', $attribute);
|
||||
if((count($values) % 2) ==1) {
|
||||
for($i=2;$i<count($values);$i++){
|
||||
$values[1].=":".$values[$i];
|
||||
}
|
||||
}
|
||||
$atts[$values[0]]=$values[1];
|
||||
}
|
||||
$item->attributes = $atts;
|
||||
unset($atts);
|
||||
}
|
||||
}
|
||||
return $module_filebox_list;
|
||||
}
|
||||
|
||||
function getFileBoxListHtml()
|
||||
{
|
||||
$logged_info = Context::get('logged_info');
|
||||
if($logged_info->is_admin !='Y' && !$logged_info->is_site_admin) return new Object(-1, 'msg_not_permitted');
|
||||
$link = parse_url($_SERVER["HTTP_REFERER"]);
|
||||
$link_params = explode('&',$link['query']);
|
||||
foreach ($link_params as $param){
|
||||
$param = explode("=",$param);
|
||||
if($param[0] == 'selected_widget') $selected_widget = $param[1];
|
||||
}
|
||||
$oWidgetModel = &getModel('widget');
|
||||
if($selected_widget) $widget_info = $oWidgetModel->getWidgetInfo($selected_widget);
|
||||
Context::set('allow_multiple', $widget_info->extra_var->images->allow_multiple);
|
||||
|
||||
$oModuleModel = &getModel('module');
|
||||
$output = $oModuleModel->getModuleFileBoxList();
|
||||
|
|
@ -1473,12 +1509,21 @@
|
|||
* @brief Return ruleset cache file path
|
||||
* @param module, act
|
||||
**/
|
||||
function getValidatorFilePath($module, $ruleset) {
|
||||
function getValidatorFilePath($module, $ruleset, $mid=null) {
|
||||
// load dynamic ruleset xml file
|
||||
if (strpos($ruleset, '@') !== false){
|
||||
$rulsetFile = str_replace('@', '', $ruleset);
|
||||
$xml_file = sprintf('./files/ruleset/%s.xml', $rulsetFile);
|
||||
return FileHandler::getRealPath($xml_file);
|
||||
}else if (strpos($ruleset, '#') !== false){
|
||||
$rulsetFile = str_replace('#', '', $ruleset).'.'.$mid;
|
||||
$xml_file = sprintf('./files/ruleset/%s.xml', $rulsetFile);
|
||||
if (is_readable($xml_file))
|
||||
return FileHandler::getRealPath($xml_file);
|
||||
else{
|
||||
$ruleset = str_replace('#', '', $ruleset);
|
||||
}
|
||||
|
||||
}
|
||||
// Get a path of the requested module. Return if not exists.
|
||||
$class_path = ModuleHandler::getModulePath($module);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,7 @@
|
|||
<!--%load_js_plugin("filebox")-->
|
||||
<div cond="$XE_VALIDATOR_MESSAGE" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
|
||||
<p>{$XE_VALIDATOR_MESSAGE}</p>
|
||||
</div>
|
||||
<h1 class="h1">{$lang->menu_gnb_sub['filebox']}</h1>
|
||||
<div class="fileBox">
|
||||
<form action="" class="portlet form" method="post" enctype="multipart/form-data">
|
||||
|
|
@ -8,12 +11,18 @@
|
|||
<input type="hidden" name="filter" value="{$filter}" />
|
||||
<input type="hidden" name="input" value="{$input}" />
|
||||
<h2>{$lang->upload_file}</h2>
|
||||
<span class="more"><a href="#fileUp" class="tgAnchor" data-effect="slide" data-duration="200">{$lang->cmd_show_hide}</a></span>
|
||||
<div class="tgContent" id="fileUp">
|
||||
<p>
|
||||
<label for="fileDescription">{$lang->description}</label> <input type="text" name="comment" id="fileDescription" /><br />
|
||||
<label for="file">{$lang->file}</label> <input type="file" name="addfile" id="file"/>
|
||||
</p>
|
||||
<div class="tgContent">
|
||||
<ul id="fileUp">
|
||||
<li>
|
||||
<label for="attribute_name1" style="display: inline;">{$lang->attribute_name} </label> <input type="text" class="notmulti" name="attribute_name1" id="attribute_name1" />
|
||||
<label for="attribute_value1" style="display: inline; font-weight:bold">{$lang->attribute_value} </label> <input type="text" class="notmulti" name="attribute_value1" id="attribute_value1" />
|
||||
<button type="button" class="text __addBtn" onclick="addRow('fileUp');">{$lang->cmd_add}</button>
|
||||
<button type="button" class="text __deleteBtn" onclick="clearRow(this);">{$lang->cmd_delete}</button>
|
||||
</li>
|
||||
<li>
|
||||
<label for="file" style="display: inline">{$lang->file}</label> <input type="file" name="addfile" id="file"/>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="btnArea">
|
||||
<span class="btn"><input type="submit" value="{$lang->cmd_save}" /></span>
|
||||
</div>
|
||||
|
|
@ -22,7 +31,9 @@
|
|||
<form action="" class="form">
|
||||
<ul>
|
||||
<li loop="$filebox_list=>$key,$val">
|
||||
<p class="q">{$val->comment}</p>
|
||||
<!--@foreach($val->attributes as $key => $value)-->
|
||||
<p class="q">{$key} : {$value}</p>
|
||||
<!--@end-->
|
||||
<p class="a">
|
||||
<!--@if($val->fileextension=='swf')-->
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,13 @@
|
|||
<p cond="!$filebox_list">등록된 파일이 없습니다.</p>
|
||||
<p cond="!$filebox_list">Not a registered file.</p>
|
||||
<ul cond="$filebox_list" class="lined">
|
||||
<li loop="$filebox_list=>$key,$fileInfo">
|
||||
<a href="#" class="select"><img class="filebox_item" src="{$fileInfo->filename}" title="{$fileInfo->comment}" /></a>
|
||||
<span>{$fileInfo->comment}</span>
|
||||
<!--@if(!$allow_multiple)--><a href="#" class="select"><!--@end--><img class="filebox_item" src="{$fileInfo->filename}" /><!--@if(!$allow_multiple)--></a><!--@end-->
|
||||
<!--@if($allow_multiple)--><input class="select_checkbox" type="checkbox" name="{$fileInfo->filename}" id="{$fileInfo->filename}"><!--@end-->
|
||||
<!--@foreach($fileInfo->attributes as $key => $value)-->
|
||||
<p class="q">{$key} : {$value}</p>
|
||||
<!--@end-->
|
||||
</li>
|
||||
<!--@if($allow_multiple)--><li><a href="#" class="select">Select</a></li><!--@end-->
|
||||
</ul>
|
||||
<div class="pagination" cond="$page_navigation">
|
||||
<a href="#" class="direction" page="1">« FIRST</a>
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
<form action="./" method="post" onsubmit="return procFilter(this, insert_grant)" id="fo_obj" class="form">
|
||||
<input type="hidden" name="module_srl" value="{$module_srl}" />
|
||||
<input type="hidden" name="admin_member" value="<!--@foreach($admin_member as $key => $val)-->{$val->user_id},<!--@end-->" />
|
||||
<input type="hidden" name="admin_member" value="<!--@foreach($admin_member as $key => $val)--><!--@if($member_config->identifier == 'email_address')-->{$val->email_address},<!--@else-->{$val->user_id},<!--@end--><!--@end-->" />
|
||||
|
||||
<h3 class="h3">{$lang->module_admin}</h3>
|
||||
<p>{$lang->about_admin_id}</p>
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
<p class="a">
|
||||
<select name="_admin_member" multiple="multiple" size="{count($admin_member)?count($admin_member):1}" style="width:290px">
|
||||
<!--@foreach($admin_member as $key => $val)-->
|
||||
<option value="{$val->user_id}">{$val->nick_name} (<!--@if($member_config->identifier=='email_address')-->{$val->email_address}<!--@else-->{$val->user_id}<!--@end-->)</option>
|
||||
<option value="<!--@if($member_config->identifier=='email_address')-->{$val->email_address}<!--@else-->{$val->user_id}<!--@end-->">{$val->nick_name} (<!--@if($member_config->identifier=='email_address')-->{$val->email_address}<!--@else-->{$val->user_id}<!--@end-->)</option>
|
||||
<!--@end-->
|
||||
</select>
|
||||
<br />
|
||||
|
|
|
|||
|
|
@ -9,11 +9,11 @@
|
|||
</permissions>
|
||||
<actions>
|
||||
<action name="dispPageIndex" type="view" index="true" />
|
||||
<action name="dispPageAdminContent" type="view" admin_index="true" standalone="true" />
|
||||
<action name="dispPageAdminGrantInfo" type="view" standalone="true" />
|
||||
<action name="dispPageAdminInfo" type="view" standalone="true" setup_index="true" />
|
||||
<action name="dispPageAdminPageAdditionSetup" type="view" standalone="true" />
|
||||
<action name="dispPageAdminInsert" type="view" standalone="true" />
|
||||
<action name="dispPageAdminContent" type="view" admin_index="true" menu_name="page" menu_index="true" />
|
||||
<action name="dispPageAdminGrantInfo" type="view" menu_name="page" />
|
||||
<action name="dispPageAdminInfo" type="view" setup_index="true" menu_name="page" />
|
||||
<action name="dispPageAdminPageAdditionSetup" type="view" menu_name="page" />
|
||||
<action name="dispPageAdminInsert" type="view" menu_name="page" />
|
||||
<action name="dispPageAdminDelete" type="view" standalone="true" />
|
||||
<action name="dispPageAdminContentModify" type="view" standalone="true" />
|
||||
<action name="dispPageAdminAddContent" type="view" standalone="true" />
|
||||
|
|
@ -29,4 +29,19 @@
|
|||
<action name="procPageAdminAddContent" type="controller" standalone="true" />
|
||||
<action name="procPageAdminArticleDocumentInsert" type="controller" standalone="true" />
|
||||
</actions>
|
||||
<menus>
|
||||
<menu name="page" type="all">
|
||||
<title xml:lang="en">Page</title>
|
||||
<title xml:lang="ko">페이지</title>
|
||||
<title xml:lang="zh-CN">Page</title>
|
||||
<title xml:lang="jp">Page</title>
|
||||
<title xml:lang="es">Page</title>
|
||||
<title xml:lang="ru">Page</title>
|
||||
<title xml:lang="fr">Page</title>
|
||||
<title xml:lang="zh-TW">Page</title>
|
||||
<title xml:lang="vi">Page</title>
|
||||
<title xml:lang="mn">Page</title>
|
||||
<title xml:lang="tr">Page</title>
|
||||
</menu>
|
||||
</menus>
|
||||
</module>
|
||||
|
|
|
|||
|
|
@ -170,4 +170,8 @@ Nếu chọn là mặc định, nó sẽ là trang chủ của Website.]]></valu
|
|||
<value xml:lang="ko"><![CDATA[페이지 관리]]></value>
|
||||
<value xml:lang="en"><![CDATA[Manage of page]]></value>
|
||||
</item>
|
||||
<item name="page_delete_warning">
|
||||
<value xml:lang="ko"><![CDATA[페이지를 삭제할 때 파일도 함께 삭제합니다]]></value>
|
||||
<value xml:lang="en"><![CDATA[If you delete a page, the files of the page will be removed also.]]></value>
|
||||
</item>
|
||||
</lang>
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue